- postprocessorThe name of the postprocessor
C++ Type:PostprocessorName
Description:The name of the postprocessor
CumulativeValuePostprocessor

The CumulativeValuePostprocessor has not been documented. The content listed below should be used as a starting point for documenting the class, which includes the typical automatic documentation associated with a MooseObject; however, what is contained is ultimately determined by what is necessary to make the documentation clear for users.
# CumulativeValuePostprocessor
!syntax description /Postprocessors/CumulativeValuePostprocessor
## Overview
!! Replace these lines with information regarding the CumulativeValuePostprocessor object.
## Example Input File Syntax
!! Describe and include an example of how to use the CumulativeValuePostprocessor object.
!syntax parameters /Postprocessors/CumulativeValuePostprocessor
!syntax inputs /Postprocessors/CumulativeValuePostprocessor
!syntax children /Postprocessors/CumulativeValuePostprocessor
!syntax description /Postprocessors/CumulativeValuePostprocessor
Input Parameters
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:NONE INITIAL LINEAR NONLINEAR TIMESTEP_END TIMESTEP_BEGIN FINAL CUSTOM TRANSFER
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.
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
Options:
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).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Options:
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Options:
Description:Set the enabled status of the MooseObject.
- force_preauxFalseForces the GeneralUserObject to be executed in PREAUX
Default:False
C++ Type:bool
Options:
Description:Forces the GeneralUserObject to be executed in PREAUX
- outputsVector of output names were you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector
Options:
Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Options:
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i
- modules/combined/test/tests/sliding_block/in_and_out/constraint/frictionless_penalty_contact_line_search.i
- modules/navier_stokes/test/tests/ins/lid_driven/ad_lid_driven_stabilized.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_first/small.i
- modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_first/finite_rr.i
- modules/contact/test/tests/bouncing-block-contact/tied-nodes.i
- test/tests/multiapps/grid-sequencing/vi-fine-alone.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_first/small.i
- modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-fb-tangential-lm-mortar-disp.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_first/finite_rr.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_first/finite_rr.i
- modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-mortar-disp.i
- test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i
- modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-lm-mortar-disp.i
- modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_second/finite_rr.i
- modules/combined/test/tests/mortar_tm/2d/ad_frictionless_fir/finite_rr.i
- modules/combined/test/tests/mortar_tm/2d/ad_frictionless_fir/small.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_first/finite.i
- modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-nodal-disp.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_first/finite.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_first/finite_noaction.i
- test/tests/multiapps/grid-sequencing/vi-coarser.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_second/finite.i
- modules/combined/test/tests/sliding_block/in_and_out/constraint/frictional_lm.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_second/small.i
- modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_first/small.i
- modules/contact/test/tests/bouncing-block-contact/frictionless-mortar-min-lm-mortar-disp.i
- test/tests/geomsearch/patch_update_strategy/always-grid-sequence.i
- modules/combined/test/tests/mortar_tm/2d/ad_frictionless_sec/finite.i
- modules/combined/test/tests/mortar_tm/2d/ad_frictionless_fir/finite.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_first/finite_noaction.i
- test/tests/nodalkernels/constraint_enforcement/vi-bounding.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_second/small.i
- modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i
- modules/navier_stokes/test/tests/ins/lid_driven/lid_driven_stabilized.i
- modules/contact/test/tests/bouncing-block-contact/frictionless-mortar-fb-lm-mortar-disp.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_second/finite_rr.i
- modules/contact/test/tests/bouncing-block-contact/frictional-mortar-fb-lm-mortar-disp.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_second/finite.i
- modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-mortar-disp.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_second/finite_noaction.i
- modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_second/finite.i
- modules/combined/test/tests/mortar_tm/2d/ad_frictionless_sec/finite_rr.i
- modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-nodal-disp.i
- modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_second/small.i
- test/tests/nodalkernels/constraint_enforcement/upper-and-lower-bound.i
- modules/combined/test/tests/mortar_tm/2drz/frictionless_second/finite_rr.i
- modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_first/finite.i
- test/tests/multiapps/grid-sequencing/vi-coarse.i
- modules/combined/test/tests/sliding_block/in_and_out/constraint/sm/frictionless_penalty_contact_line_search_sm.i
- test/tests/multiapps/grid-sequencing/vi-fine.i
- modules/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i
- modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-fb-tangential-lm-mortar-action.i
- modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i
- modules/combined/test/tests/mortar_tm/2d/frictionless_second/finite_noaction.i
- modules/combined/test/tests/mortar_tm/2d/ad_frictionless_sec/small.i
modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the slave block and the top of the
# master block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarsest mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
file = level0.e
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
[../]
[./tangential_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalNodalLMMechanicalContact
slave = 10
master = 20
variable = normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
[../]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_lm]
type = TangentialMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = normal_lm
friction_coefficient = .1
ncp_function_type = fb
[]
[tangential_x]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
num_steps = 3
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
nl_abs_tol = 1e-10
num_grids = 5
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
sync_times = '15'
sync_only = true
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/sliding_block/in_and_out/constraint/frictionless_penalty_contact_line_search.i
# This is a benchmark test that checks constraint based frictionless
# contact using the penalty method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2. The gold file is run
# on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
value = -t
[../]
[./horizontal_movement]
type = ParsedFunction
value = -0.04*sin(4*t)+0.02
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[./tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlinear_its
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
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'
petsc_options = '-ksp_monitor_true_residual'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = 'contact'
contact_line_search_ltol = .5
contact_line_search_allowed_lambda_cuts = 0
l_max_its = 100
nl_max_its = 20
dt = 0.1
end_time = 3
# num_steps = 30
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
slave = 3
master = 2
model = frictionless
penalty = 1e+7
formulation = penalty
system = constraint
normal_smoothing_distance = 0.1
[../]
[]
modules/navier_stokes/test/tests/ins/lid_driven/ad_lid_driven_stabilized.i
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
p = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
transient_term = false
integrate_p_by_parts = true
alpha = .1
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
value = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
file_base = lid_driven_stabilized_out
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_first/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./corner]
type = ExtraNodesetGenerator
input = block_rename
coord = '0 -10.0'
new_boundary = point
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = corner
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeLinearElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_first/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[../]
[./plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/tied-nodes.i
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
file = long-bottom-block-symmetric-single-element.e
[]
[Variables]
[./disp_x]
scaling = 2
[../]
[./disp_y]
scaling = 3
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSTieNode
slave = 10
master = 20
variable = disp_x
master_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSTieNode
slave = 10
master = 20
variable = disp_y
master_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = DirichletBC
variable = disp_y
boundary = 30
value = 0
[../]
[./topx]
type = DirichletBC
variable = disp_x
boundary = 30
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dtmin = 1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
checkpoint = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
test/tests/multiapps/grid-sequencing/vi-fine-alone.i
l=10
nx=80
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[bounds]
type = BoundsAux
variable = bounds
bounded_variable = u
upper = ${l}
lower = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_first/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeLinearElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-fb-tangential-lm-mortar-disp.i
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the slave block and the top of the
# master block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[./file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[../]
[]
[Variables]
[./disp_x]
block = '1 2'
# order = SECOND
[../]
[./disp_y]
block = '1 2'
# order = SECOND
[../]
[./frictional_normal_lm]
block = 3
# family = MONOMIAL
# order = CONSTANT
[../]
[./frictional_tangential_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[frictional_normal_lm]
type = NormalNodalLMMechanicalContact
slave = 10
master = 20
variable = frictional_normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
[../]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = frictional_normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = frictional_normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[frictional_tangential_lm]
type = TangentialMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = frictional_tangential_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = frictional_normal_lm
friction_coefficient = .1
ncp_function_type = fb
[]
[tangential_x]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = frictional_tangential_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = frictional_tangential_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
# [./Predictor]
# type = SimplePredictor
# scale = 1.0
# [../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
# checkpoint = true
# [./dofmap]
# type = DOFMap
# execute_on = 'initial'
# [../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_first/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[../]
[./plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_first/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-mortar-disp.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = 10
master = 20
variable = normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = 'fb'
[../]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./time_derivative]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Problem]
type = FEProblem
coord_type = RZ
rz_coord_axis = X
[]
[Executioner]
type = Transient
scheme = implicit-euler
[./TimeStepper]
type = ConstantDT
dt = 0.01
[../]
start_time = 0.0
num_steps = 2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
[./nonlin_it]
type = NumNonlinearIterations
[../]
[./cumulative_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlin_it
[../]
[]
[Outputs]
csv = true
[]
modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-lm-mortar-disp.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
[../]
[./tangential_lm]
block = 3
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalNodalLMMechanicalContact
master = 20
slave = 10
variable = normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
[]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_lm]
type = TangentialNodalLMMechanicalContact
master = 20
slave = 10
variable = tangential_lm
master_variable = disp_x
disp_y = disp_y
contact_pressure = normal_lm
ncp_function_type = min
mu = .1
[]
[tangential_x]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exodus]
type = Exodus
sync_times = '0 5 10 15 20 25 30 35 40 45 50'
file_base = frictional-nodal-min-lm-mortar-disp_out
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_second/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[../]
[./plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/ad_frictionless_fir/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
use_automatic_differentiation = true
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/ad_frictionless_fir/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_first/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-nodal-disp.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = 10
master = 20
variable = normal_lm
master_variable = disp_x
disp_y = disp_y
[../]
[./disp_x]
type = NormalNodalMechanicalContact
slave = 10
master = 20
variable = disp_x
master_variable = disp_x
lambda = normal_lm
component = x
[../]
[./disp_y]
type = NormalNodalMechanicalContact
slave = 10
master = 20
variable = disp_y
master_variable = disp_y
lambda = normal_lm
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_first/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_first/finite_noaction.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_noaction'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[./slave]
input = block_sidesets
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_slave_subdomain'
[../]
[./master]
input = slave
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_master_subdomain'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./frictionless_normal_lm]
order = ${order}
block = 'frictionless_slave_subdomain'
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = block_left
master = plank_right
variable = frictionless_normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
use_displaced_mesh = true
[../]
[./normal_x]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[./normal_y]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
test/tests/multiapps/grid-sequencing/vi-coarser.i
l=10
nx=20
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[bounds]
type = BoundsAux
variable = bounds
bounded_variable = u
upper = ${l}
lower = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_second/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = iteration
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
l_max_its = 30
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/sliding_block/in_and_out/constraint/frictional_lm.i
[Mesh]
patch_size = 80
[file]
type = FileMeshGenerator
file = sliding_elastic_blocks_2d.e
[]
[slave]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = '30'
[]
[master]
input = slave
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[Variables]
[normal_lm]
block = '30'
[]
[tangential_lm]
block = '30'
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
block = '1 2'
[../]
[]
[Materials]
[./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'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 15
dt = 0.1
dtmin = 0.01
l_max_its = 30
nl_max_its = 20
line_search = 'none'
timestep_tolerance = 1e-6
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
sync_times = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'
[out]
type = Exodus
sync_only = true
[]
[dof]
execute_on = 'initial'
type = DOFMap
[]
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
value = -t
[../]
[./horizontal_movement]
type = ParsedFunction
value = -0.04*sin(4*t)+0.02
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = 3
master = 2
variable = normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
use_displaced_mesh = true
c = 1e6 # relative scale difference between pressure and gap
[../]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = '2'
slave_boundary = '3'
master_subdomain = '20'
slave_subdomain = '30'
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = '2'
slave_boundary = '3'
master_subdomain = '20'
slave_subdomain = '30'
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_lm]
type = TangentialMortarLMMechanicalContact
master_boundary = '2'
slave_boundary = '3'
master_subdomain = '20'
slave_subdomain = '30'
variable = tangential_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = normal_lm
friction_coefficient = .4
ncp_function_type = fb
c = 1000 # relative scale difference between pressure and velocity
[]
[tangential_x]
type = TangentialMortarMechanicalContact
master_boundary = '2'
slave_boundary = '3'
master_subdomain = '20'
slave_subdomain = '30'
variable = tangential_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
master_boundary = '2'
slave_boundary = '3'
master_subdomain = '20'
slave_subdomain = '30'
variable = tangential_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[lin]
type = NumLinearIterations
[]
[cum_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '30'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_second/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./corner]
type = ExtraNodesetGenerator
input = block_rename
coord = '0 -10.0'
new_boundary = point
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = corner
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeLinearElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_first/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./corner]
type = ExtraNodesetGenerator
input = block_rename
coord = '0 -10.0'
new_boundary = point
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = corner
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[../]
[./swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictionless-mortar-min-lm-mortar-disp.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
ncp_function_type = 'min'
[]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
test/tests/geomsearch/patch_update_strategy/always-grid-sequence.i
[Mesh]
type = FileMesh
file = long_range_coarse.e
dim = 2
patch_update_strategy = always
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
solution_variables = 'u'
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./linear_field]
[../]
[./receiver]
# The field to transfer into
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./elemental_reciever]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 1
extra_vector_tags = 'ref'
[../]
[]
[AuxKernels]
[./linear_in_y]
# This just gives us something to transfer that varies in y so we can ensure the transfer is working properly...
type = FunctionAux
variable = linear_field
function = y
execute_on = initial
[../]
[./right_to_left]
type = GapValueAux
variable = receiver
paired_variable = linear_field
paired_boundary = rightleft
execute_on = timestep_end
boundary = leftright
[../]
[./y_displacement]
type = FunctionAux
variable = disp_y
function = t
execute_on = 'linear timestep_begin'
block = left
[../]
[./elemental_right_to_left]
type = GapValueAux
variable = elemental_reciever
paired_variable = linear_field
paired_boundary = rightleft
boundary = leftright
[../]
[]
[BCs]
[./top]
type = FunctionDirichletBC
variable = u
boundary = 'lefttop righttop'
function = 't'
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 'leftbottom rightbottom'
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
num_grids = 2
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[total_nl]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
modules/combined/test/tests/mortar_tm/2d/ad_frictionless_sec/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = ADFunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/ad_frictionless_fir/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_first/finite_noaction.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_noaction'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[./slave]
input = block_sidesets
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_slave_subdomain'
[../]
[./master]
input = slave
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_master_subdomain'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./frictionless_normal_lm]
order = ${order}
block = 'frictionless_slave_subdomain'
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = block_left
master = plank_right
variable = frictionless_normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
use_displaced_mesh = true
[../]
[./normal_x]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[./normal_y]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
test/tests/nodalkernels/constraint_enforcement/vi-bounding.i
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[bounds]
type = BoundsAux
variable = bounds
bounded_variable = u
upper = ${l}
lower = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_second/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeLinearElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i
starting_point = .5
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1
[]
[Mesh]
file = square-blocks-no-offset.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${starting_point}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
slave = 10
master = 20
variable = disp_x
master_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
slave = 10
master = 20
variable = disp_y
master_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./topx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 30
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} - t'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
dtmin = 1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -ksp_monitor_true_residual -snes_view'
petsc_options_iname = '-mat_mffd_err -pc_type -pc_hypre_type'
petsc_options_value = '1e-5 hypre boomeramg'
l_max_its = 30
nl_max_its = 20
line_search = 'project'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'nonlinear'
[]
print_linear_residuals = false
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
modules/navier_stokes/test/tests/ins/lid_driven/lid_driven_stabilized.i
[GlobalParams]
gravity = '0 0 0'
laplace = true
integrate_p_by_parts = true
family = LAGRANGE
order = FIRST
# There are multiple types of stabilization possible in incompressible
# Navier Stokes. The user can specify supg = true to apply streamline
# upwind petrov-galerkin stabilization to the momentum equations. This
# is most useful for high Reynolds numbers, e.g. when inertial effects
# dominate over viscous effects. The user can also specify pspg = true
# to apply pressure stabilized petrov-galerkin stabilization to the mass
# equation. PSPG is a form of Galerkin Least Squares. This stabilization
# allows equal order interpolations to be used for pressure and velocity.
# Finally, the alpha parameter controls the amount of stabilization.
# For PSPG, decreasing alpha leads to increased accuracy but may induce
# spurious oscillations in the pressure field. Some numerical experiments
# suggest that alpha between .1 and 1 may be optimal for accuracy and
# robustness.
supg = true
pspg = true
alpha = 1e-1
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
elem_type = QUAD4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
p = p
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
p = p
component = 0
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
p = p
component = 1
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
value = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
modules/contact/test/tests/bouncing-block-contact/frictionless-mortar-fb-lm-mortar-disp.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
ncp_function_type = 'fb'
[]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_second/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictional-mortar-fb-lm-mortar-disp.i
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the slave block and the top of the
# master block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
# order = SECOND
[../]
[./disp_y]
block = '1 2'
# order = SECOND
[../]
[./normal_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[./tangential_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
ncp_function_type = fb
[]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_lm]
type = TangentialMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = normal_lm
friction_coefficient = .1
ncp_function_type = fb
[]
[tangential_x]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
# [./Predictor]
# type = SimplePredictor
# scale = 1.0
# [../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
# checkpoint = true
# [./dofmap]
# type = DOFMap
# execute_on = 'initial'
# [../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_second/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-min-lm-mortar-disp.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = 10
master = 20
variable = normal_lm
master_variable = disp_x
disp_y = disp_y
[../]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_second/finite_noaction.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_noaction'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[./slave]
input = block_sidesets
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_slave_subdomain'
[../]
[./master]
input = slave
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_master_subdomain'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./frictionless_normal_lm]
order = ${order}
block = 'frictionless_slave_subdomain'
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = block_left
master = plank_right
variable = frictionless_normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
use_displaced_mesh = true
[../]
[./normal_x]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[./normal_y]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_second/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/ad_frictionless_sec/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
use_automatic_differentiation = true
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = ADFunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-fb-lm-nodal-disp.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./disp_x]
block = '1 2'
[../]
[./disp_y]
block = '1 2'
[../]
[./normal_lm]
block = 3
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = 10
master = 20
variable = normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = 'fb'
[../]
[./disp_x]
type = NormalNodalMechanicalContact
slave = 10
master = 20
variable = disp_x
master_variable = disp_x
lambda = normal_lm
component = x
[../]
[./disp_y]
type = NormalNodalMechanicalContact
slave = 10
master = 20
variable = disp_y
master_variable = disp_y
lambda = normal_lm
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_second/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./corner]
type = ExtraNodesetGenerator
input = block_rename
coord = '0 -10.0'
new_boundary = point
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = corner
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[../]
[./swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
test/tests/nodalkernels/constraint_enforcement/upper-and-lower-bound.i
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm_upper]
[]
[lm_lower]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[NodalKernels]
[upper_bound]
type = UpperBoundNodalKernel
variable = lm_upper
v = u
exclude_boundaries = 'left right'
upper_bound = 10
[]
[forces_from_upper]
type = CoupledForceNodalKernel
variable = u
v = lm_upper
coef = -1
[]
[lower_bound]
type = LowerBoundNodalKernel
variable = lm_lower
v = u
exclude_boundaries = 'left right'
lower_bound = 0
[]
[forces_from_lower]
type = CoupledForceNodalKernel
variable = u
v = lm_lower
coef = 1
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_upper_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_upper
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[active_lower_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_lower
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
modules/combined/test/tests/mortar_tm/2drz/frictionless_second/finite_rr.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[../]
[./plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2drz/ad_frictionless_first/finite.i
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.9 9.2 0
1.21 9.5 0
0.9 10.0 0
0.61 9.5 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'block'
[../]
[./plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[./swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[../]
[./swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
test/tests/multiapps/grid-sequencing/vi-coarse.i
l=10
nx=40
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[bounds]
type = BoundsAux
variable = bounds
bounded_variable = u
upper = ${l}
lower = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[./coarser]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarser.i
[../]
[]
[Transfers]
[./mesh_function_begin]
type = MultiAppMeshFunctionTransfer
direction = from_multiapp
multi_app = coarser
source_variable = u
variable = u
execute_on = timestep_begin
[../]
[]
modules/combined/test/tests/sliding_block/in_and_out/constraint/sm/frictionless_penalty_contact_line_search_sm.i
# This is a benchmark test that checks constraint based frictionless
# contact using the penalty method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2. The gold file is run
# on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
value = -t
[../]
[./horizontal_movement]
type = ParsedFunction
value = -0.04*sin(4*t)+0.02
[../]
[]
[SolidMechanics]
[./solid]
disp_x = disp_x
disp_y = disp_y
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[./tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlinear_its
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = Elastic
formulation = NonlinearPlaneStrain
block = 1
disp_y = disp_y
disp_x = disp_x
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./right]
type = Elastic
formulation = NonlinearPlaneStrain
block = 2
disp_y = disp_y
disp_x = disp_x
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-ksp_monitor_true_residual'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = 'contact'
contact_line_search_ltol = .5
contact_line_search_allowed_lambda_cuts = 0
l_max_its = 100
nl_max_its = 20
dt = 0.1
end_time = 3
# num_steps = 30
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
slave = 3
master = 2
model = frictionless
penalty = 1e+7
formulation = penalty
system = constraint
normal_smoothing_distance = 0.1
[../]
[]
test/tests/multiapps/grid-sequencing/vi-fine.i
l=10
nx=80
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[bounds]
type = BoundsAux
variable = bounds
bounded_variable = u
upper = ${l}
lower = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[./coarse]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarse.i
[../]
[]
[Transfers]
[./mesh_function_begin]
type = MultiAppMeshFunctionTransfer
direction = from_multiapp
multi_app = coarse
source_variable = u
variable = u
execute_on = timestep_begin
[../]
[]
modules/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
file = long-bottom-block-no-lower-d.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
slave = 10
master = 20
variable = disp_x
master_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
slave = 10
master = 20
variable = disp_y
master_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
checkpoint = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-fb-tangential-lm-mortar-action.i
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the slave block and the top of the
# master block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[./original_file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[../]
# These sidesets need to be deleted because the contact action adds them automatically. For this
# particular mesh, the new IDs will be identical to the deleted ones and will conflict if we don't
# remove the original ones.
[./delete_3]
type = BlockDeletionGenerator
input = original_file_mesh
block_id = 3
[../]
[./revised_file_mesh]
type = BlockDeletionGenerator
input = delete_3
block_id = 4
[../]
[]
[Variables]
[./disp_x]
block = '1 2'
# order = SECOND
[../]
[./disp_y]
block = '1 2'
# order = SECOND
[../]
[]
[Contact]
[frictional]
mesh = revised_file_mesh
master = 20
slave = 10
formulation = mortar
system = constraint
model = coulomb
friction_coefficient = 0.1
[]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
hide = 'contact_pressure nodal_area_frictional penetration'
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_slave_subdomain
execute_on = 'nonlinear timestep_end'
[]
[]
modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the slave block and the top of the
# master block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
# order = SECOND
[../]
[./disp_y]
block = '1 2'
# order = SECOND
[../]
[./normal_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[./tangential_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
ncp_function_type = min
[]
[normal_x]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_lm]
type = TangentialMortarLMMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_x
slave_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = normal_lm
friction_coefficient = .1
ncp_function_type = min
[]
[tangential_x]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
master_boundary = 20
slave_boundary = 10
master_subdomain = 4
slave_subdomain = 3
variable = tangential_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
modules/combined/test/tests/mortar_tm/2d/frictionless_second/finite_noaction.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_noaction'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[./slave]
input = block_sidesets
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_slave_subdomain'
[../]
[./master]
input = slave
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_master_subdomain'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./frictionless_normal_lm]
order = ${order}
block = 'frictionless_slave_subdomain'
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
[../]
[]
[Constraints]
[./lm]
type = NormalNodalLMMechanicalContact
slave = block_left
master = plank_right
variable = frictionless_normal_lm
master_variable = disp_x
disp_y = disp_y
ncp_function_type = min
use_displaced_mesh = true
[../]
[./normal_x]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[./normal_y]
type = NormalMortarMechanicalContact
master_boundary = plank_right
slave_boundary = block_left
master_subdomain = frictionless_master_subdomain
slave_subdomain = frictionless_slave_subdomain
variable = frictionless_normal_lm
slave_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
modules/combined/test/tests/mortar_tm/2d/ad_frictionless_sec/small.i
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[./plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
[../]
[./plank_sidesets]
type = RenameBoundaryGenerator
input = plank
old_boundary_id = '0 1 2 3'
new_boundary_name = 'plank_bottom plank_right plank_top plank_left'
[../]
[./plank_id]
type = SubdomainIDGenerator
input = plank_sidesets
subdomain_id = 1
[../]
[./block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
[../]
[./block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block_id = '1 2'
new_block_name = 'plank block'
[../]
[./block_sidesets]
type = SideSetsFromPointsGenerator
input = block_rename
points = '0.6 7.7 0
0.91 8.0 0
0.6 8.5 0
0.31 8.0 0'
new_boundary = 'block_bottom block_right block_top block_left'
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[./disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[../]
[]
[Modules/TensorMechanics/Master]
[./action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[../]
[]
[Contact]
[./frictionless]
mesh = block_sidesets
master = plank_right
slave = block_left
formulation = mortar
system = constraint
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[../]
[./right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[../]
[./right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[../]
[]
[Materials]
[./plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[../]
[./block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[../]
[./stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[./nl_its]
type = NumNonlinearIterations
[../]
[./total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[../]
[./l_its]
type = NumLinearIterations
[../]
[./total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[../]
[./contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_slave_subdomain
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[../]
[./max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[../]
[./min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[../]
[./max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[../]
[./min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[../]
[]
[Outputs]
exodus = true
file_base = ${name}
[./comp]
type = CSV
show = 'contact'
[../]
[./out]
type = CSV
file_base = '${name}_out'
[../]
[]
[Debug]
show_var_residual_norms = true
[]