- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
- sidesetsThe sidesets from which to create the new block
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The sidesets from which to create the new block
LowerDBlockFromSidesetGenerator
Adds lower dimensional elements on the specified sidesets.
Overview
This mesh generator accepts a list of sidesets and creates a lower dimensional block of elements along those sides. The order of the newly create lower dimensional element block will match the order of the parent elements (e.g. first order for first order parents, second order for second order parents).
Element sides are not explicitly meshed in MOOSE/libMesh, i.e. no shape functions live on the lower dimensional sides. To run kernels on lower dimensional manifolds they need to be explicitly meshed. That can be accomplished in a mesh generation tool like Cubit, or using this MeshGenerator.
In 3D simulations, the appropriate 2D elements (for 2D simulations, 1D elements) will be meshed in at selected side sets (boundaries).
Coupling between side and volume meshes
The newly-generated lower dimensional side elements will share nodes with the higher dimensional volume's elements. Coupling to the variables from volume elements "just works".
Coupling in the other direction is not as straight forward. The lower dimensional variables exist on some nodes of the adjacent volume elements. The volume kernels will run on the volume quadrature points at which tapered off values from the adjacent edges can be found. Use at your own risk.
Input Parameters
- new_block_idThe lower dimensional block id to create
C++ Type:unsigned short
Controllable:No
Description:The lower dimensional block id to create
- new_block_nameThe lower dimensional block name to create (optional)
C++ Type:SubdomainName
Controllable:No
Description:The lower dimensional block name to create (optional)
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (test/tests/bcs/ad_coupled_lower_value/together.i)
- (test/tests/bcs/ad_coupled_lower_value/test.i)
- (test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-aux-kernel.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_radiation_test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/fv_modular_gap_heat_transfer_mortar_radiation_conduction.i)
- (modules/contact/test/tests/mortar_cartesian_lms/cylinder_friction_cartesian_pg.i)
- (test/tests/userobjects/mortar_user_object/test.i)
- (test/tests/mortar/3d-periodic/periodic.i)
- (test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity-vcp.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light-function.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction.i)
- (test/tests/userobjects/mortar_user_object/displaced_test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_mortar.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_simple3d.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_tight_slip.i)
- (test/tests/mortar/convergence-studies/fv-gap-conductance/gap-conductance.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d-rz/small.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_aux2d.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
- (test/tests/mortar/continuity-2d-non-conforming/soln-continuity.i)
- (modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_mortar_only_czm.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d_pg.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-function.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple3d.i)
- (test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless-3d.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
- (modules/solid_mechanics/test/tests/j_integral/j_integral_2d_block_restrict.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
- (modules/combined/examples/mortar/mortar_gradient.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction_function.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d_pg.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_checker2d.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_pg.i)
- (test/tests/meshgenerators/lower_d_block_generator/ids.i)
- (test/tests/meshgenerators/sideset_extruder_generator/external_generators.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_backup.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction.i)
- (test/tests/meshgenerators/block_deletion_generator/preserve_exteriors.i)
- (modules/contact/test/tests/mortar_aux_kernels/frictional-mortar-3d-status.i)
- (test/tests/mortar/aux-gap/mismatch.i)
- (modules/contact/test/tests/3d-mortar-contact/half_sphere_nodal_geometry.i)
- (test/tests/mortar/aux-gap/gap.i)
- (test/tests/mortar/continuity-2d-conforming/equalgradient.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple2d.i)
- (test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
- (modules/combined/examples/mortar/eigenstrain.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
- (modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_2d.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d_flip.i)
- (modules/contact/test/tests/mortar_cartesian_lms/cylinder_friction_cartesian_vcp.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_separate.i)
- (test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
- (test/tests/auxkernels/lower_d_var/lower-d-aux-var.i)
- (test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-material.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
- (test/tests/mortar/convergence-studies/continuity-3d/continuity.i)
- (modules/contact/test/tests/mortar_cartesian_lms/cylinder_friction_cartesian.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action_lowerd_exists.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_simple2d.i)
- (test/tests/mortar/continuity-2d-non-conforming/soln-continuity-pg.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_tet.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple3d.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_mortar_displaced.i)
- (modules/contact/test/tests/sliding_block/edge_dropping/two_equal_blocks_slide_2d.i)
- (test/tests/preconditioners/vcp/vcp_test.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction-3d.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
- (test/tests/meshgenerators/block_deletion_generator/delete_interior_parents.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
- (test/tests/preconditioners/vcp/no_condense_test.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/testperiodicsole.i)
- (modules/contact/test/tests/pdass_problems/ironing.i)
- (test/tests/mortar/displaced-gap-conductance-2d-non-conforming/gap-conductance.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_sphere_hex.i)
- (test/tests/meshgenerators/lower_d_block_generator/refine-error.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar.i)
- (modules/contact/test/tests/cohesive_zone_model/mortar_czm.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_sphere_hex.i)
- (test/tests/meshgenerators/lower_d_block_generator/names.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
- (test/tests/mortar/continuity-2d-conforming/conforming-2nd-order.i)
- (modules/porous_flow/test/tests/aux_kernels/element_normal_2D_3D.i)
- (test/tests/mortar/mortar-q-points/test.i)
- (modules/contact/test/tests/pdass_problems/ironing_penalty_al.i)
- (modules/combined/test/tests/nodal_patch_recovery/npr_with_lower_domains.i)
- (test/tests/mortar/convergence-studies/solution-continuity/continuity.i)
- (test/tests/mortar/continuity-2d-non-conforming/sequencing-stateful-soln-continuity.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced.i)
- (test/tests/mortar/periodic-value/periodic.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction.i)
- (modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_2d_pg.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/no_multiapp.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_test_nochange.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_non_conforming_tet.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/small.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_split.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_checker2d.i)
- (modules/contact/test/tests/sliding_block/edge_dropping/two_equal_blocks_slide_3d.i)
- (test/tests/mortar/convergence-studies/gap-conductance/gap-conductance.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_checker2d.i)
- (modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_3d_pg.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_adaptivity.i)
- (modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_compare.i)
- (modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_3d.i)
- (test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple2d.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
- (modules/contact/test/tests/pdass_problems/ironing_penalty.i)
- (test/tests/mortar/continuity-2d-conforming/conforming.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_aux.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-al.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple3d.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d.i)
- (modules/contact/test/tests/cohesive_zone_model/mortar_czm_analysis.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_tet.i)
- (modules/combined/test/tests/stateful_mortar_constraints/stateful_mortar_npr.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-penalty.i)
- (test/tests/mortar/coincident-nodes/test.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_vcp.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-penalty.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy.i)
- (modules/solid_mechanics/test/tests/jacobian_damper/block_restriction.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_mixed.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_verbose.i)
- (test/tests/mortar/periodic_segmental_constraint/testperiodicsole.i)
- (modules/porous_flow/test/tests/aux_kernels/element_normal_1D_2D.i)
(test/tests/bcs/ad_coupled_lower_value/together.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[lower_d]
type = LowerDBlockFromSidesetGenerator
input = square
new_block_name = 'lower'
sidesets = 'top right'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
block = 0
[]
[]
[AuxVariables]
[lower]
block = 'lower'
initial_condition = 10
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
block = 0
[]
[]
[BCs]
[dirichlet]
type = ADDirichletBC
variable = u
boundary = 'left'
value = 0
[]
[neumann]
type = ADCoupledLowerValue
variable = u
boundary = 'right'
lower_d_var = lower
[]
[]
[Executioner]
type = Steady
residual_and_jacobian_together = true
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/ad_coupled_lower_value/test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[../]
[lower_d]
type = LowerDBlockFromSidesetGenerator
input = square
new_block_name = 'lower'
sidesets = 'top right'
[]
[]
[Variables]
[./u]
block = 0
[../]
[lower]
block = 'lower'
[]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
block = 0
[../]
[]
[NodalKernels]
[time]
type = TimeDerivativeNodalKernel
variable = lower
block = lower
[]
[growth]
type = ConstantRate
rate = 1
variable = lower
block = lower
[]
[]
[BCs]
[./dirichlet]
type = DirichletBC
variable = u
boundary = 'left bottom'
value = 0
[../]
[./neumann]
type = ADCoupledLowerValue
variable = u
boundary = 'right top'
lower_d_var = lower
[../]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-aux-kernel.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[aux_var]
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[flux_modifier]
type = StatefulAuxLowerD
variable = 'aux_var'
coupled_variable = 'lambda'
boundary = '1'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceAuxKernel
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
auxkernel_variable = 'aux_var'
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_radiation_test.i)
#
# This test replicates the legacy heat transfter test
# gap_heat_transfer_radiation/gap_heat_transfer_radiation_test.i
# The flux post processors give 3.753945e+01
#
[Mesh]
[file]
type = FileMeshGenerator
file = gap_heat_transfer_radiation_test.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '200'
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = '300'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '200 200'
[]
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
scaling = 1e-8
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
scaling = 1e-1
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temp
block = '1 2'
[]
[]
[BCs]
[temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[]
[temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[]
[]
[UserObjects]
[radiative]
type = GapFluxModelRadiative
secondary_emissivity = 0.5
primary_emissivity = 0.5
temperature = temp
boundary = 3
[]
[simple]
type = GapFluxModelSimple
k = 0.09187557
temperature = temp
boundary = 3
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 300
secondary_boundary = 2
secondary_subdomain = 200
gap_flux_models = 'simple radiative'
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 10000000.0
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 1.0
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/fv_modular_gap_heat_transfer_mortar_radiation_conduction.i)
[Mesh]
inactive = 'translate'
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[translate]
type = TransformGenerator
transform = translate
input = primary
vector_value = '1 0 0'
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
type = MooseVariableFVReal
block = '1 2'
[]
[lm]
order = CONSTANT
family = MONOMIAL
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADGenericFunctorMaterial
block = 1
prop_names = 'thermal_conductivity'
prop_values = '0.01'
[]
[right]
type = ADGenericFunctorMaterial
block = 2
prop_names = 'thermal_conductivity'
prop_values = '0.005'
[]
[]
[FVKernels]
[hc]
type = FVDiffusion
variable = temp
block = '1 2'
coeff = 'thermal_conductivity'
[]
[]
[UserObjects]
[radiation]
type = FunctorGapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
[]
[conduction]
type = FunctorGapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
ghost_higher_d_neighbors = true
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = FVDirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/cylinder_friction_cartesian_pg.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_coarser.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
converge_on = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e-5
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e-5
[]
[]
[AuxVariables]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master]
[all]
incremental = false
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
strain = SMALL
add_variables = false
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff1_stress]
type = ComputeLinearElasticStress
block = '1'
[]
[stuff2_stress]
type = ComputeLinearElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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'
petsc_options_value = 'lu NONZERO 1e-12'
line_search = 'none'
nl_abs_tol = 1e-7
l_max_its = 5
nl_rel_tol = 1e-09
start_time = -0.1
end_time = 0.3 # 3.5
l_tol = 1e-8
dt = 0.1
dtmin = 0.001
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[x_disp]
type = NodalValueSampler
variable = disp_x
boundary = '3 4'
sort_by = id
[]
[y_disp]
type = NodalValueSampler
variable = disp_y
boundary = '3 4'
sort_by = id
[]
[lm_x]
type = NodalValueSampler
variable = lm_x
boundary = '3'
sort_by = id
[]
[lm_y]
type = NodalValueSampler
variable = lm_y
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[console]
type = Console
max_rows = 5
[]
[chkfile]
type = CSV
show = 'x_disp y_disp lm_x lm_y'
file_base = cylinder_friction_check
create_final_symlink = true
execute_on = 'FINAL'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
lm_x = lm_x
lm_y = lm_y
variable = lm_x
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = false
mu = 0.4
c_t = 1.0e6
c = 1.0e6
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[x]
type = CartesianMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = false
[]
[y]
type = CartesianMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = false
[]
[]
(test/tests/userobjects/mortar_user_object/test.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Problem]
solve = false
[]
[UserObjects]
[weighted_gap_uo]
type = TestWeightedGapUserObject
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
weighted_gap_aux_var = "gap2"
execute_on = 'linear nonlinear timestep_end'
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[gap2]
block = '10'
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
[]
[gap2]
type = GetMortarGapUOValue
variable = gap2
boundary = 1
weighted_gap_uo = weighted_gap_uo
execute_on = 'linear nonlinear timestep_end'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/3d-periodic/periodic.i)
[Mesh]
[file]
type = FileMeshGenerator
file = flow_test.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '1'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '2'
[]
[]
[Variables]
[u]
block = 'bottom middle top'
[]
[lm]
block = 'secondary'
use_dual = true
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
block = 'bottom middle top'
[]
[force]
type = BodyForce
variable = u
block = 'bottom middle'
function = 'x - y'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
value = 1
boundary = 'around'
[]
[]
[Constraints]
[ev]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = top
secondary_boundary = bottom
primary_subdomain = 12
secondary_subdomain = 11
delta = 0.1
periodic = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity-vcp.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = '10'
order = FIRST
use_dual = true
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lambda'
primary_variable = 'T'
preconditioner = 'AMG'
is_lm_coupling_diagonal = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = ' -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' NONZERO 1e-15'
[]
[Outputs]
file_base = 'dual-soln-continuity_out'
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.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}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
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}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[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 = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
converge_on = 'disp_x disp_y temp'
[]
[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)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[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
strain = FINITE
extra_vector_tags = 'ref'
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
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'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
nl_abs_tol = 1e-13
[]
[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_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
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]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light-function.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
[]
[Functions]
# x: Contact pressure
# y: Magnitude of tangential relative velocity
# z: Temperature (to be implemented)
[mu_function]
type = ParsedFunction
expression = '0.3 + 0.5 * 2.17^(-x/100) - 10.0 * y'
[]
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.02
displacements = 'disp_x disp_y disp_z'
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
c = 1e5
c_t = 1.0e5
newmark_beta = 0.25
newmark_gamma = 0.5
interpolate_normals = false
correct_edge_dropping = true
capture_tolerance = 1e-04
function_friction = mu_function
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_top'
function = '0.1*t'
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-0.1*t'
[]
[]
[Executioner]
type = Transient
end_time = .04
dt = .02
dtmin = .001
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO '
nl_rel_tol = 5e-13
nl_abs_tol = 5e-13
line_search = 'basic'
[TimeIntegrator]
type = NewmarkBeta
gamma = 0.5
beta = 0.25
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
coord_type = RZ
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[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 = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_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)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[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
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[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'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[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_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
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]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 10.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = conduction
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/userobjects/mortar_user_object/displaced_test.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
displacements = 'disp_x disp_y'
[]
[Problem]
solve = false
[]
[UserObjects]
[weighted_gap_uo]
type = TestWeightedGapUserObject
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
weighted_gap_aux_var = "gap2"
execute_on = 'linear nonlinear timestep_end'
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[gap2]
block = '10'
[]
[disp_x]
block = 'left right'
[]
[disp_y]
block = 'left right'
[]
[]
[ICs]
[disp_x]
block = 'left'
type = ConstantIC
value = '-1e-2'
variable = disp_x
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
use_displaced_mesh = true
[]
[gap2]
type = GetMortarGapUOValue
variable = gap2
boundary = 1
weighted_gap_uo = weighted_gap_uo
execute_on = 'linear nonlinear timestep_end'
[]
[]
[Postprocessors]
[gap]
type = ElementAverageValue
block = 10
variable = gap
execute_on = 'timestep_end'
force_postaux = true
[]
[gap2]
type = ElementAverageValue
block = 10
variable = gap2
execute_on = 'timestep_end'
force_postaux = true
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_mortar.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Materials]
[./left]
type = HeatConductionMaterial
block = 1
thermal_conductivity = 1000
specific_heat = 1
[../]
[./right]
type = HeatConductionMaterial
block = 2
thermal_conductivity = 500
specific_heat = 1
[../]
[]
[Kernels]
[./hc]
type = HeatConduction
variable = temp
use_displaced_mesh = false
block = '1 2'
[../]
[]
[Constraints]
[./ced]
type = GapConductanceConstraint
variable = lm
secondary_variable = temp
k = 100
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-11
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[./lm3]
order = FIRST
family = LAGRANGE
block = secondary_back
[../]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[mortarbf]
type = EqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
variable = lm3
correct_edge_dropping = true
[]
[periodicbf]
type = PeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm3
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
solve_type = NEWTON
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 6
nz = 6
xmin = -1
xmax = -0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 8
nz = 8
xmin = 0.5
xmax = 1
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = 'left_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = 'right_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 1
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = '1'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 'left_right'
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 'left_right'
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 'right_left'
primary_subdomain = 'primary_lower'
secondary_boundary = 'left_right'
secondary_subdomain = 'secondary_lower'
gap_flux_models = 'radiation conduction'
gap_geometry_type = PLATE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = 'right_right' # outer RPV
coefficient = ${outer_htc}
T_infinity = ${outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 'left_right'
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 'right_left'
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'left_right'
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'right_left'
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 1
[]
[convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = 'right_right' # outer RVP
T_fluid = ${outer_Tinf}
htc = ${outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(convective_out - ptot) / ptot'
pp_names = 'convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'left_right right_left'
variable = temp
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_tight_slip.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[dual_var]
use_dual = true
block = '10001'
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'basic'
nl_abs_tol = 1e-13
nl_rel_tol = 1e-11
nl_max_its = 75
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.1 # 3.5
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e5
secondary_variable = disp_x
friction_coefficient = 0.4
penetration_tolerance = 1e-7
slip_tolerance = 1e-8
penalty_friction = 1e6
penalty_multiplier = 10
use_physical_gap = true
aux_lm = dual_var
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(test/tests/mortar/convergence-studies/fv-gap-conductance/gap-conductance.i)
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = 'lb_bottom lb_right lb_top lb_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3'
new_boundary = '100 101 102 103'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
included_subdomains = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
included_subdomains = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
included_subdomains = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
included_subdomains = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[T]
block = 'left_block right_block'
type = MooseVariableFVReal
[]
[lambda]
block = 'secondary_lower'
family = MONOMIAL
order = CONSTANT
[]
[]
[FVBCs]
[neumann]
type = FVFunctionDirichletBC
function = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[]
[]
[FVKernels]
[conduction]
type = FVDiffusion
variable = T
block = 'left_block right_block'
coeff = 1
[]
[sink]
type = FVReaction
variable = T
block = 'left_block right_block'
[]
[forcing_function]
type = FVBodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = ''
[]
[exact_soln_primal]
type = ParsedFunction
expression = ''
[]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[mms_secondary]
type = ParsedFunction
expression = ''
[]
[mms_primary]
type = ParsedFunction
expression = ''
[]
[]
[Constraints]
[mortar]
type = GapHeatConductanceTest
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
secondary_gap_conductance = 1
primary_gap_conductance = 1
secondary_mms_function = mms_secondary
primary_mms_function = mms_primary
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d-rz/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
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[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 = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[Problem]
coord_type = RZ
[]
[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)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[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
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[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'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[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_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
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]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
use_displaced_mesh = true
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_aux2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 4
ny = 4
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 1'
execute_on = initial #timestep_end
[]
[epsilon]
type = FunctionScalarAux
variable = epsilon
function = '-1 -1'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
compute_scalar_residuals = false
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
compute_scalar_residuals = false
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_coarser.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[penalty_normal_pressure]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_one]
order = FIRST
family = LAGRANGE
[]
[tangential_vel_one]
order = FIRST
family = LAGRANGE
[]
[weighted_gap]
order = FIRST
family = LAGRANGE
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[react_x]
[]
[react_y]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Kernels]
[TensorMechanics]
use_displaced_mesh = true
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
[]
[]
[AuxKernels]
[penalty_normal_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_tangential_vel_auxk]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
[]
[penalty_weighted_gap_auxk]
type = PenaltyMortarUserObjectAux
variable = weighted_gap
user_object = friction_uo
contact_quantity = normal_gap
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[react_x]
type = TagVectorAux
vector_tag = 'ref'
v = 'disp_x'
variable = 'react_x'
[]
[react_y]
type = TagVectorAux
vector_tag = 'ref'
v = 'disp_y'
variable = 'react_y'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = react_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = react_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = react_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = react_y
boundary = 4
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff1_strain]
type = ComputeFiniteStrain
block = '1'
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_strain]
type = ComputeFiniteStrain
block = '2 3 4 5 6 7'
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 '
' 1e-5'
line_search = 'none'
nl_abs_tol = 1e-14
nl_rel_tol = 1e-10
start_time = 0.0
end_time = 0.3 # 3.5
l_tol = 1e-4
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[x_disp]
type = NodalValueSampler
variable = disp_x
boundary = '3'
sort_by = id
[]
[y_disp]
type = NodalValueSampler
variable = disp_y
boundary = '3'
sort_by = id
[]
[cont_press]
type = NodalValueSampler
variable = penalty_normal_pressure
boundary = '3'
sort_by = id
[]
[friction]
type = NodalValueSampler
variable = penalty_frictional_pressure
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[console]
type = Console
max_rows = 5
[]
[chkfile]
type = CSV
show = 'x_disp y_disp cont_press friction'
file_base = cylinder_friction_penalty_check
create_final_symlink = true
execute_on = 'FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.4 # with 2.0 works
secondary_variable = disp_x
penalty = 5e9
penalty_friction = 1e7
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = sphere3D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
# [gap_conductance]
# order = CONSTANT
# family = MONOMIAL
# []
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
# [AuxKernels]
# [gap_cond]
# type = MaterialRealAux
# property = gap_conductance
# variable = gap_conductance
# boundary = 2
# []
# []
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
(test/tests/mortar/continuity-2d-non-conforming/soln-continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = SECOND
[../]
[./lambda]
block = '10'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_mortar_only_czm.i)
[Mesh]
[base]
type = GeneratedMeshGenerator
dim = 2
xmax = 1.1
ymax = 1
xmin = -0.1
nx = 1
ny = 1
[]
[rename_base]
type = RenameBoundaryGenerator
input = base
old_boundary = 'top bottom left right'
new_boundary = 'top_base bottom_base left_base right_base'
[]
[base_id]
type = SubdomainIDGenerator
input = rename_base
subdomain_id = 1
[]
[top]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 1
ny = 1
[]
[rename_top]
type = RenameBoundaryGenerator
input = top
old_boundary = 'top bottom left right'
new_boundary = '100 101 102 103'
[]
[top_id]
type = SubdomainIDGenerator
input = rename_top
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'base_id top_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '-0.1 0 0'
input = top_node
new_boundary = bottom_node
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'top_base'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '101'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
generate_output = 'vonmises_stress'
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = 100
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = 100
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_base
variable = disp_y
value = 0
preset = true
[]
[]
[Materials]
[normal_strength]
type = GenericConstantMaterial
prop_names = 'normal_strength'
prop_values = '1e3'
[]
[shear_strength]
type = GenericConstantMaterial
prop_names = 'shear_strength'
prop_values = '7.5e2'
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 150
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.1
end_time = 1.0
dtmin = 0.1
[]
[Outputs]
exodus = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
correct_edge_dropping = true
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.0 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 0e4
use_physical_gap = true
# bilinear model parameters
normal_strength = 'normal_strength'
shear_strength = 'shear_strength'
penalty_stiffness = 200
power_law_parameter = 0.1
GI_c = 123
GII_c = 54
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
[]
[c_x]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 1
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '0.1 * t'
[]
[vertical_movement]
type = ConstantFunction
value = '0.0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
interpolate_normals = false
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-5 NONZERO 1e-10'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-6
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'id'
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d_pg.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Constraints]
[friction]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
mu = 0.4
c = 1e4
c_t = 1.0e4
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-14 1e-5'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-12
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 1300
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 3.5
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e7
penetration_tolerance = 1e-12
use_physical_gap = true
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-function.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[Functions]
# x: Contact pressure
# y: Magnitude of tangential relative velocity
# z: Temperature (to be implemented)
[mu_function]
type = ParsedFunction
expression = '0.3 + (0.7 - 0.3) * 2.17^(-0.5/y) - x/10000'
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[friction]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
# mu = 0.4
function_friction = mu_function
c = 1e4
c_t = 1.0e6
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top_top'
function = '0.1*t'
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .05
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-14 1e-5'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-12
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbf]
type = PenaltyEqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbf]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
(test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[aux_var]
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[flux_modifier]
type = StatefulAuxLowerD
variable = 'aux_var'
coupled_variable = 'lambda'
boundary = '1'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = MONOMIAL
order = CONSTANT
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceAuxKernel
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
auxkernel_variable = 'aux_var'
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Problem]
# error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
lm_var_x = lm_x
lm_var_y = lm_y
lm_var_z = lm_z
component = 'NORMAL'
boundary = 'top_bottom'
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-5 NONZERO 1e-10'
end_time = 1
dt = .5
dtmin = .01
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = secondary_lower
variable = normal_lm
sort_by = 'id'
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = '1e-5 NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/solid_mechanics/test/tests/j_integral/j_integral_2d_block_restrict.i)
#This tests the J-Integral evaluation capability.
#This is a 2d plane strain model
#The analytic solution for J1 is 2.434. This model
#converges to that solution with a refined mesh.
#Reference: National Agency for Finite Element Methods and Standards (U.K.):
#Test 1.1 from NAFEMS publication "Test Cases in Linear Elastic Fracture
#Mechanics" R0020.
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[input_mesh]
type = FileMeshGenerator
file = crack2d.e
[]
[add_dummy_block]
type = LowerDBlockFromSidesetGenerator
input = input_mesh
sidesets = 700
new_block_name = 'lowerd_dummy'
new_block_id = '2'
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[AuxVariables]
[SED]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[]
[Functions]
[rampConstant]
type = PiecewiseLinear
x = '0. 1.'
y = '0. 1.'
scale_factor = -1e2
[]
[]
[DomainIntegral]
integrals = JIntegral
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '4.0 4.5 5.0 5.5 6.0'
radius_outer = '4.5 5.0 5.5 6.0 6.5'
output_q = false
incremental = true
block = '1'
symmetry_plane = 1
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
block = '1'
[]
[]
[AuxKernels]
[SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
block = '1'
[]
[]
[BCs]
[crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 700
value = 0.0
[]
[Pressure]
[Side1]
boundary = 400
function = rampConstant
[]
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = '1'
[]
[elastic_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 20
nl_rel_tol = 1e-12
nl_abs_tol = 1e-5
l_tol = 1e-2
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = 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 = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/combined/examples/mortar/mortar_gradient.i)
#
# Compare a diffusion equation with (c) and without (v) periodic gradient
# constraints and a ramped sloped initial condition and value-periodic diffusion (p)
# without a slope.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
[]
[secondary_x]
input = gen
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10
new_block_name = "secondary_x"
[]
[primary_x]
input = secondary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = 12
new_block_name = "primary_x"
[]
[secondary_y]
input = primary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '0'
new_block_id = 11
new_block_name = "secondary_y"
[]
[primary_y]
input = secondary_y
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 13
new_block_name = "primary_y"
[]
[]
[Functions]
[./init_slope]
# slope with a concentration spike close to the lower interface
type = ParsedFunction
expression = 'if(x>0.4 & x<0.6 & y>0.1 & y<0.3, 3+y, y)'
[../]
[./init_flat]
# no-slope and the same spike
type = ParsedFunction
expression = 'if(x>0.4 & x<0.6 & y>0.1 & y<0.3, 3, 0)'
[../]
[]
[Variables]
# gradient constrained concentration
[./c]
order = FIRST
family = LAGRANGE
block = 0
[./InitialCondition]
type = FunctionIC
function = init_slope
[../]
[../]
# unconstrained concentrarion
[./v]
order = FIRST
family = LAGRANGE
block = 0
[./InitialCondition]
type = FunctionIC
function = init_slope
[../]
[../]
# flat value periodic diffusion
[./p]
order = FIRST
family = LAGRANGE
block = 0
[./InitialCondition]
type = FunctionIC
function = init_flat
[../]
[../]
# Lagrange multipliers for gradient component in the horizontal directon
[./lm_left_right_x]
order = FIRST
family = LAGRANGE
block = "secondary_x"
[../]
[./lm_left_right_y]
order = FIRST
family = LAGRANGE
block = "secondary_x"
[../]
# Lagrange multipliers for gradient component in the vertical directon
[./lm_up_down_x]
order = FIRST
family = LAGRANGE
block = "secondary_y"
[../]
[./lm_up_down_y]
order = FIRST
family = LAGRANGE
block = "secondary_y"
[../]
[]
[Kernels]
# the gradient constrained concentration
[./diff]
type = Diffusion
variable = c
block = 0
[../]
[./dt]
type = TimeDerivative
variable = c
block = 0
[../]
# the un-constrained concentration
[./diff2]
type = Diffusion
variable = v
block = 0
[../]
[./dt2]
type = TimeDerivative
variable = v
block = 0
[../]
# the value periodic concentration
[./diff3]
type = Diffusion
variable = p
block = 0
[../]
[./dt3]
type = TimeDerivative
variable = p
block = 0
[../]
[]
[Constraints]
[./equaly_grad_x]
type = EqualGradientConstraint
variable = lm_up_down_x
component = 0
secondary_variable = c
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./equaly_grad_y]
type = EqualGradientConstraint
variable = lm_up_down_y
component = 1
secondary_variable = c
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./equalx_grad_x]
type = EqualGradientConstraint
variable = lm_left_right_x
component = 0
secondary_variable = c
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./equalx_grad_y]
type = EqualGradientConstraint
variable = lm_left_right_y
component = 1
secondary_variable = c
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[]
[BCs]
# DiffusionFluxBC is the surface term in the weak form of the Diffusion equation
[./surface]
type = DiffusionFluxBC
boundary = 'top bottom left right'
variable = c
[../]
[./surface2]
type = DiffusionFluxBC
boundary = 'top bottom left right'
variable = v
[../]
# for the value periodic diffusion we skip the surface term and apply value PBCs
[./Periodic]
[./up_down]
variable = p
primary = 0
secondary = 2
translation = '0 1 0'
[../]
[./left_right]
variable = p
primary = 1
secondary = 3
translation = '-1 0 0'
[../]
[../]
[]
[AuxVariables]
[./diff_constraint]
block = 0
[../]
[./diff_periodic]
block = 0
[../]
[./diff_slope]
block = 0
[../]
[./slope]
block = 0
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[]
[AuxKernels]
# difference between the constrained and unconstrained sloped diffusions
[./diff_constraint]
type = ParsedAux
variable = diff_constraint
expression = 'c-v'
coupled_variables = 'c v'
block = 0
[../]
# difference between the periodic gradient constrained diffusion and the flat
# value period diffusien with a constant slope added. This should be the same,
# but they aren't quite because the gradient constraint affects the gradient in
# the entire elements (i.e. a larger volume is affected by the gradient constraint
# compared to the nodal value periodicity)
[./diff_periodic]
type = ParsedAux
variable = diff_periodic
expression = 'c-p-slope'
coupled_variables = 'c p slope'
block = 0
[../]
# subtract the constant slope from the gradient periodic simulation (should yield
# almost p - per the argument above)
[./diff_slope]
type = ParsedAux
variable = diff_slope
expression = 'c-slope'
coupled_variables = 'c slope'
block = 0
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# the shift is necessary to facilitate the solve. The Lagrange multipliers
# introduce zero-on diaginal blocks, which make the matrix hard to invert.
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-10'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-10
l_tol = 1e-10
dt = 0.01
num_steps = 20
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction_function.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[AuxVariables]
[dummy]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[]
[]
[Functions]
[function]
type = ParsedFunction
expression = 'if(t > 100.0, 0.0, t)'
[]
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 10.0
gap_conductivity_function_variable = dummy
gap_conductivity_function = function
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = conduction
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[dual_var]
use_dual = true
block = '10001'
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'basic'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 50
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 3.5
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e5
penalty_friction = 1e8
secondary_variable = disp_x
friction_coefficient = 0.4
penetration_tolerance = 1e-7
# Not solving the frictional problem tightly (below)
slip_tolerance = 1 # 1e-6
penalty_multiplier = 100
penalty_multiplier_friction = 1
use_physical_gap = true
aux_lm = dual_var
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d_pg.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[lambda]
type = ElementAverageValue
variable = mortar_normal_lm
block = 'secondary_lower'
[]
[]
(test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[./lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[../]
[./upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[../]
[./upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[../]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[../]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = '1 4'
[]
[diff2]
type = ADMatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = ADGenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = ADGenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_pg.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(test/tests/meshgenerators/lower_d_block_generator/ids.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./lower_d_block]
type = LowerDBlockFromSidesetGenerator
input = gmg
new_block_id = 10
sidesets = '0 0 1 2 3'
[]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 10
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
block = 0
[../]
[./srcv]
type = BodyForce
block = 10
variable = v
function = 1
[../]
[./time_v]
type = TimeDerivative
block = 10
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sideset_extruder_generator/external_generators.i)
[Mesh]
# Note: don't change the parameters without also changing extrude_square,
# as they should be using identical file(s) in gold
[square]
type = GeneratedMeshGenerator
dim = 2
[]
[lowerDblock]
type = LowerDBlockFromSidesetGenerator
input = square
new_block_name = "extrusions0"
sidesets = "right"
[]
[separateMesh]
type = BlockToMeshConverterGenerator
input = lowerDblock
target_blocks = extrusions0
[]
[extrude]
type = MeshExtruderGenerator
input = separateMesh
num_layers = 3
extrusion_vector = '1 0.5 0'
bottom_sideset = 'new_bottom'
top_sideset = 'new_top'
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'square extrude'
stitch_boundaries_pairs = 'right new_bottom'
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_backup.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 0.1 0.2'
y = '0. -0.020 0.0'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 1300
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 3.5
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e7
penalty_multiplier = 10
penetration_tolerance = 1e-12
use_physical_gap = true
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_coarser.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[frictionless_normal_lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
use_dual = true
[]
[tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Kernels]
[TensorMechanics]
use_displaced_mesh = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff1_strain]
type = ComputeFiniteStrain
block = '1'
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_strain]
type = ComputeFiniteStrain
block = '2 3 4 5 6 7'
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
line_search = 'none'
nl_abs_tol = 1e-7
start_time = 0.0
end_time = 0.3 # 3.5
l_tol = 1e-4
dt = 0.1
dtmin = 0.001
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[x_disp]
type = NodalValueSampler
variable = disp_x
boundary = '3 4'
sort_by = id
[]
[y_disp]
type = NodalValueSampler
variable = disp_y
boundary = '3 4'
sort_by = id
[]
[cont_press]
type = NodalValueSampler
variable = frictionless_normal_lm
boundary = '3'
sort_by = id
[]
[friction]
type = NodalValueSampler
variable = frictionless_normal_lm
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = false
csv = false
[console]
type = Console
max_rows = 5
[]
[chkfile]
type = CSV
show = 'x_disp y_disp cont_press friction'
file_base = cylinder_friction_check
create_final_symlink = true
execute_on = 'FINAL'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
lm_variable_normal = frictionless_normal_lm
lm_variable_tangential_one = tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
friction_lm = tangential_lm
mu = 0.4
c_t = 1.0e5
c = 1.0e6
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
variable = tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
variable = tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
(test/tests/meshgenerators/block_deletion_generator/preserve_exteriors.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8 # large enough to be interesting distributed
ny = 8
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[lower_d]
type = LowerDBlockFromSidesetGenerator
input = gmg
new_block_name = 'external_boundary'
sidesets = 'bottom top left right'
[]
[del_lower_d_inner_block]
type = BlockDeletionGenerator
input = lower_d
block = 0
delete_exteriors = false
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/frictional-mortar-3d-status.i)
starting_point = 0.04
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[frictional_status]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[frictional_state]
type = MortarFrictionalStateAux
tangent_one = mortar_tangential_lm
boundary = 'top_bottom'
contact_pressure = mortar_normal_lm
variable = frictional_status
mu = 0.4
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e2
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e2
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e2
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e2
# We should try with nonzero Poisson ratio
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[friction]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
mu = 0.4
c = 1e1
c_t = 1.0e1
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_top'
function = '0.16*t'
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top_top'
function = '0.1*t'
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 0.4 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = .02
dtmin = .02
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-13 1e-7'
l_max_its = 15
nl_max_its = 90
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(test/tests/mortar/aux-gap/mismatch.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = SECOND
[]
[lambda]
block = '10'
use_dual = true
order = SECOND
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/contact/test/tests/3d-mortar-contact/half_sphere_nodal_geometry.i)
[Mesh]
[generated_mesh]
type = FileMeshGenerator
file = half_sphere.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 2002
new_block_name = 'secondary_lower'
sidesets = '202'
input = generated_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 1002
sidesets = '102'
new_block_name = 'primary_lower'
input = secondary
[]
patch_size = 20
patch_update_strategy = always
uniform_refine = 0
[]
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
order = FIRST
family = LAGRANGE
[]
[Variables]
[frictional_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[frictional_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[frictional_tangential_dir_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[saved_x]
[]
[saved_y]
[]
[saved_z]
[]
[tangent_x]
family = LAGRANGE
order = FIRST
[]
[tangent_y]
family = LAGRANGE
order = FIRST
[]
[tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_x
component = 0
boundary = 202
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_y
component = 1
boundary = 202
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_z
component = 2
boundary = 202
[]
[]
[Functions]
[push_down]
type = ParsedFunction
expression = 'if(t < 1.5, -t, t-3.0)'
[]
[force_z]
type = ParsedFunction
expression = 'if(t < 0.008, 0.0, (-t)*2.0e2 -t*t*100.0)' # 4.0e5
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = true
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
save_in = 'saved_x saved_y saved_z'
use_finite_deform_jacobian = true
[]
[]
[BCs]
[botz]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[boty]
type = ADDirichletBC
variable = disp_y
boundary = 101
value = 0.0
[]
[botx]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[topz]
type = ADFunctionDirichletBC
variable = disp_z
boundary = '201'
function = push_down
[]
[topy]
type = ADDirichletBC
variable = disp_y
boundary = '201 202'
value = 0.0
[]
[topx]
type = ADDirichletBC
variable = disp_x
boundary = '201 202'
value = 0.0
[]
[]
[Materials]
[tensor]
type = ADComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.40625e7
poissons_ratio = 0.25
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ADComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ADComputeFiniteStrainElasticStress
block = '2'
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 1
[]
[resid_z]
type = NodalSum
variable = saved_z
boundary = 201
[]
[disp_z]
type = NodalExtremeValue
variable = disp_z
boundary = 201
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type '
'-pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist nonzero 1e-14 1e-5'
line_search = 'none'
l_max_its = 60
nl_max_its = 50
dt = 0.004
dtmin = 0.00001
# end_time = 1.8
end_time = 0.000
nl_rel_tol = 1.0e-6 #1e-7 # -8, -6 to avoid many iterations. Switch it March 2021
nl_abs_tol = 1e-6 # 6 if no friction
l_tol = 1e-4
[]
[Outputs]
exodus = true
csv = true
print_linear_residuals = true
perf_graph = true
[console]
type = Console
max_rows = 5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
lm_variable_normal = frictional_normal_lm
lm_variable_tangential_one = frictional_tangential_lm
lm_variable_tangential_two = frictional_tangential_dir_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
debug_mesh = true
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = frictional_tangential_lm
friction_lm_dir = frictional_tangential_dir_lm
c = 7.0e4
c_t = 7.0e4
mu = 0.4
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_x_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/mortar/aux-gap/gap.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = '10'
use_dual = true
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/mortar/continuity-2d-conforming/equalgradient.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lmx]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[./lmy]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[ICs]
[./block1]
type = FunctionIC
variable = u
block = 1
function = y
[../]
[./block2]
type = FunctionIC
variable = u
block = 2
function = y-0.5
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dt]
type = TimeDerivative
variable = u
[../]
[]
[Constraints]
[./cedx]
type = EqualGradientConstraint
secondary_variable = u
variable = lmx
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
component = 0
[../]
[./cedy]
type = EqualGradientConstraint
secondary_variable = u
variable = lmy
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
component = 1
[../]
[]
[BCs]
[./all]
type = DiffusionFluxBC
variable = u
boundary = '2 4 100 101'
[../]
[./boundary]
type = DirichletBC
boundary = 1
variable = u
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
boundary = 3
variable = u
function = 0.5-t
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
nl_rel_tol = 1e-11
l_tol = 1e-10
l_max_its = 10
dt = 0.05
num_steps = 3
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
## Units in the input file: m-Pa-s-K
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Variables]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 100.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_hardness'
prop_values = '8e3 16.2 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
nl_rel_tol = 1e-14
nl_max_its = 20
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
# exodus = true
csv = true
[]
(test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = FIRST
[../]
[./lambda]
block = '10'
order = FIRST
use_dual = true
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity #use parsed material property
density_name = steel_density
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity #use parsed material property
density_name = aluminum_density
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-4
nl_max_its = 100
nl_forced_its = 1
dt = 1200.0
dtmin = 1200.0
num_steps = 8
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/examples/mortar/eigenstrain.i)
#
# Eigenstrain with Mortar gradient periodicity
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0'
new_boundary = 100
[../]
[./anode]
input = cnode
type = ExtraNodesetGenerator
coord = '0.0 0.5'
new_boundary = 101
[../]
[secondary_x]
input = anode
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10
new_block_name = "secondary_x"
[]
[primary_x]
input = secondary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = 12
new_block_name = "primary_x"
[]
[secondary_y]
input = primary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '0'
new_block_id = 11
new_block_name = "secondary_y"
[]
[primary_y]
input = secondary_y
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 13
new_block_name = "primary_y"
[]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'disp_x disp_y'
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
block = 0
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = RandomIC
min = 0.49
max = 0.51
[../]
block = 0
[../]
[./w]
block = 0
[../]
# Mesh displacement
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
# Lagrange multipliers for gradient component periodicity
[./lm_left_right_xx]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_left_right_xy]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_left_right_yx]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_left_right_yy]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_up_down_xx]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[./lm_up_down_xy]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[./lm_up_down_yx]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[./lm_up_down_yy]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[]
[Constraints]
[./ud_disp_x_grad_x]
type = EqualGradientConstraint
variable = lm_up_down_xx
component = 0
secondary_variable = disp_x
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./ud_disp_x_grad_y]
type = EqualGradientConstraint
variable = lm_up_down_xy
component = 1
secondary_variable = disp_x
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./ud_disp_y_grad_x]
type = EqualGradientConstraint
variable = lm_up_down_yx
component = 0
secondary_variable = disp_y
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./ud_disp_y_grad_y]
type = EqualGradientConstraint
variable = lm_up_down_yy
component = 1
secondary_variable = disp_y
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./lr_disp_x_grad_x]
type = EqualGradientConstraint
variable = lm_left_right_xx
component = 0
secondary_variable = disp_x
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./lr_disp_x_grad_y]
type = EqualGradientConstraint
variable = lm_left_right_xy
component = 1
secondary_variable = disp_x
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./lr_disp_y_grad_x]
type = EqualGradientConstraint
variable = lm_left_right_yx
component = 0
secondary_variable = disp_y
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./lr_disp_y_grad_y]
type = EqualGradientConstraint
variable = lm_left_right_yy
component = 1
secondary_variable = disp_y
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
block = 0
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
block = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
block = 0
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
block = 0
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
block = '0 10 11'
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '1 1 0 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
block = 0
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
# matrix phase
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./eigenstrain]
type = CompositeEigenstrain
block = 0
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[BCs]
[./Periodic]
[./up_down]
primary = top
secondary = bottom
translation = '0 -1 0'
variable = 'c w'
[../]
[./left_right]
primary = left
secondary = right
translation = '1 0 0'
variable = 'c w'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = disp_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = disp_y
value = 0
[../]
# fix side point x coordinate to inhibit rotation
[./angularfix]
type = DirichletBC
boundary = 101
variable = disp_x
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
# mortar currently does not support MPI parallelization
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-10'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.01
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# Using the steady-state Fourier's law, the temperature at the interface in each block,
# in the case where thermal contact between the two blocks at the interface is not
# considered, (steel block on left, aluminum on right) is calculated as:
#
# T_{interface - steel} = 816.849K
# T_{interface - aluminum} = 339.871K
# which matches the simulation results to the 6 decimal places shown.
# As expected, the heat flux resulting from the volumetric Joule heating source is
# equivalent on both sides of the interface.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
c_t = 1e+2
mu = 0.10
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_2d.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
nx = 4
ny = 4
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 1.0
ymin = -0.5
ymax = 0.5
nx = 5
ny = 5
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = PiecewiseLinear
x = '0 1.0'
y = '0 0.4'
[]
[vertical_movement]
type = PiecewiseLinear
x = '0 1.0'
y = '0 0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
correct_edge_dropping = true
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist nonzero 1e-10'
line_search = 'none'
dt = 0.1
dtmin = 0.01
end_time = 1.0
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = 'secondary_lower'
[]
[normal_lm]
type = ElementAverageValue
variable = normal_lm
block = 'secondary_lower'
[]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d_flip.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
secondary_boundary = '11'
primary_boundary = '13'
secondary_subdomain = 'primary_right'
primary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
secondary_boundary = '11'
primary_boundary = '13'
secondary_subdomain = 'primary_right'
primary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
secondary_boundary = '12'
primary_boundary = '10'
secondary_subdomain = 'primary_top'
primary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
secondary_boundary = '12'
primary_boundary = '10'
secondary_subdomain = 'primary_top'
primary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/cylinder_friction_cartesian_vcp.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_coarser.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
converge_on = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e-5
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e-5
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master]
[all]
incremental = false
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
strain = SMALL
add_variables = false
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff1_stress]
type = ComputeLinearElasticStress
block = '1'
[]
[stuff2_stress]
type = ComputeLinearElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'NONZERO 1e-12'
line_search = 'none'
nl_abs_tol = 1e-7
l_max_its = 5
nl_rel_tol = 1e-09
start_time = -0.1
end_time = 0.3 # 3.5
l_tol = 1e-8
dt = 0.1
dtmin = 0.001
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y'
primary_variable = 'disp_x disp_y'
preconditioner = 'LU'
is_lm_coupling_diagonal = false
adaptive_condensation = true
[]
[]
[VectorPostprocessors]
[x_disp]
type = NodalValueSampler
variable = disp_x
boundary = '3 4'
sort_by = id
[]
[y_disp]
type = NodalValueSampler
variable = disp_y
boundary = '3 4'
sort_by = id
[]
[lm_x]
type = NodalValueSampler
variable = lm_x
boundary = '3'
sort_by = id
[]
[lm_y]
type = NodalValueSampler
variable = lm_y
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[console]
type = Console
max_rows = 5
[]
[chkfile]
type = CSV
show = 'x_disp y_disp lm_x lm_y'
file_base = cylinder_friction_check
create_final_symlink = true
execute_on = 'FINAL'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
lm_x = lm_x
lm_y = lm_y
variable = lm_x
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = false
mu = 0.4
c_t = 1.0e6
c = 1.0e6
[]
[x]
type = CartesianMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = false
[]
[y]
type = CartesianMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = false
[]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO 1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_separate.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[lm_conduction]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
use_displaced_mesh = true
[]
[]
[Constraints]
[ced_radiation]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = 'radiation'
[]
[ced_conduction]
type = ModularGapConductanceConstraint
variable = lm_conduction
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = 'conduction'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_u]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_v]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./coupled_u]
type = CoupledForce
variable = v
v = u
[../]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[Constraints]
[./ced_u]
type = EqualValueConstraint
variable = lm_u
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[./ced_v]
type = EqualValueConstraint
variable = lm_v
secondary_variable = v
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[./allv]
type = DirichletBC
variable = v
boundary = '1 2 3 4'
value = 0
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[./l2_v]
type = ElementL2Norm
variable = v
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/lower_d_var/lower-d-aux-var.i)
[Mesh]
inactive = 'refine_left_and_top'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[lower_left]
type = LowerDBlockFromSidesetGenerator
input = gen
sidesets = 'left'
new_block_name = 'lower_left'
[]
[lower_right]
type = LowerDBlockFromSidesetGenerator
input = lower_left
sidesets = 'right'
new_block_name = 'lower_right'
[]
[lower_top]
type = LowerDBlockFromSidesetGenerator
input = lower_right
sidesets = 'top'
new_block_name = 'lower_top'
[]
[lower_bottom]
type = LowerDBlockFromSidesetGenerator
input = lower_top
sidesets = 'bottom'
new_block_name = 'lower_bottom'
[]
[refine_left_and_top]
type = RefineSidesetGenerator
boundaries = 'left top'
refinement = '1 1'
boundary_side = 'primary primary'
input = lower_bottom
[]
[]
[Problem]
solve = false
[]
[AuxVariables]
[lower_constant]
family = MONOMIAL
order = CONSTANT
block = 'lower_top lower_right lower_bottom lower_left'
[]
[lower_first]
family = MONOMIAL
order = FIRST
block = 'lower_top lower_right lower_bottom lower_left'
[]
[higher]
family = MONOMIAL
order = CONSTANT
block = '0'
[]
[]
[AuxKernels]
[lower_constant]
type = MaterialRealAux
property = 'prop'
variable = lower_constant
boundary = 'top bottom right left'
[]
[lower_first]
type = MaterialRealAux
property = 'prop'
variable = lower_first
boundary = 'top bottom right left'
[]
[higher]
type = MaterialRealAux
property = 'prop'
variable = higher
block = 0
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'x + y'
[]
[]
[Materials]
[func]
type = GenericFunctionMaterial
prop_names = 'prop'
prop_values = 'func'
[]
[]
[Outputs]
csv = true
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[avg_lower_constant_left]
type = ElementAverageValue
variable = lower_constant
block = lower_left
[]
[avg_lower_first_left]
type = ElementAverageValue
variable = lower_first
block = lower_left
[]
[avg_lower_constant_bottom]
type = ElementAverageValue
variable = lower_constant
block = lower_bottom
[]
[avg_lower_first_bottom]
type = ElementAverageValue
variable = lower_first
block = lower_bottom
[]
[avg_lower_constant_top]
type = ElementAverageValue
variable = lower_constant
block = lower_top
[]
[avg_lower_first_top]
type = ElementAverageValue
variable = lower_first
block = lower_top
[]
[avg_lower_constant_right]
type = ElementAverageValue
variable = lower_constant
block = lower_right
[]
[avg_lower_first_right]
type = ElementAverageValue
variable = lower_first
block = lower_right
[]
[]
(test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-material.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceMaterial
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
material_property = 'layer_modifier'
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[bnd_material_modifier]
type = ADGenericConstantMaterial
prop_names = 'layer_modifier'
prop_values = '5.0'
boundary = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
c = 1.0e4
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = 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 = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(test/tests/mortar/convergence-studies/continuity-3d/continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = hex_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
order = SECOND
[]
[lambda]
block = 'secondary'
# family = MONOMIAL
# order = CONSTANT
family = LAGRANGE
order = SECOND
use_dual = true
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
# delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/cylinder_friction_cartesian.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_coarser.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
converge_on = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e-5
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
scaling = 1.0e-5
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master]
[all]
incremental = false
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
strain = SMALL
add_variables = false
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2 3 4 5 6 7'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff1_stress]
type = ComputeLinearElasticStress
block = '1'
[]
[stuff2_stress]
type = ComputeLinearElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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'
petsc_options_value = 'lu NONZERO 1e-12'
line_search = 'none'
nl_abs_tol = 1e-7
l_max_its = 5
nl_rel_tol = 1e-09
start_time = -0.1
end_time = 0.3 # 3.5
l_tol = 1e-8
dt = 0.1
dtmin = 0.001
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[x_disp]
type = NodalValueSampler
variable = disp_x
boundary = '3 4'
sort_by = id
[]
[y_disp]
type = NodalValueSampler
variable = disp_y
boundary = '3 4'
sort_by = id
[]
[lm_x]
type = NodalValueSampler
variable = lm_x
boundary = '3'
sort_by = id
[]
[lm_y]
type = NodalValueSampler
variable = lm_y
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[console]
type = Console
max_rows = 5
[]
[chkfile]
type = CSV
show = 'x_disp y_disp lm_x lm_y'
file_base = cylinder_friction_check
create_final_symlink = true
execute_on = 'FINAL'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
lm_x = lm_x
lm_y = lm_y
variable = lm_x
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = false
mu = 0.4
c_t = 1.0e6
c = 1.0e6
[]
[x]
type = CartesianMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = false
[]
[y]
type = CartesianMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = false
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action_lowerd_exists.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
primary_emissivity = 1.0
secondary_emissivity = 1.0
boundary = 100
use_displaced_mesh = true
gap_conductivity = 0.02
primary_boundary = 100
secondary_boundary = 101
# We already have mortar lower-dimensional domains and do not need the action
# to create them for us. It will reuse those and define variables and constraints on
# the existing appended meshes.
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
gap_flux_options = 'CONDUCTION RADIATION'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
csv = true
[exodus]
type = Exodus
show = 'temp'
[]
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
solve_type = NEWTON
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/mortar/continuity-2d-non-conforming/soln-continuity-pg.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = '10'
order = FIRST
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = '10'
order = FIRST
use_dual = false
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_tet.i)
[Mesh]
second_order = false
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0
xmax = 0.3
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'lb_bottom lb_back lb_right lb_front lb_left lb_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0.3
xmax = 0.6
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 0 1'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 0 -1'
[]
[right_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_bottom_sideset
new_boundary = rb_front
block = right_block
normal = '0 1 0'
[]
[right_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_front_sideset
new_boundary = rb_back
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '12'
new_block_name = 'secondary'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '11'
new_block_name = 'primary'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_back lb_front lb_left lb_top lb_bottom rb_right rb_top rb_bottom rb_front rb_back'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
primary_boundary = 'rb_left'
secondary_boundary = 'lb_right'
primary_subdomain = '11'
secondary_subdomain = '12'
secondary_variable = T
penalty_value = 1.0e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[./lm3]
order = FIRST
family = LAGRANGE
block = secondary_back
[../]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = ADPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = ADPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[mortarbf]
type = EqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
variable = lm3
correct_edge_dropping = true
[]
[periodicbf]
type = ADPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm3
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_mortar_displaced.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Materials]
[./left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 1000
specific_heat = 1
[../]
[./right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 500
specific_heat = 1
[../]
[]
[Kernels]
[./hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[../]
[./hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[../]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[Constraints]
[./ced]
type = GapConductanceConstraint
variable = lm
secondary_variable = temp
k = 100
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
displacements = 'disp_x disp_y'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[../]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
[]
[Outputs]
exodus = true
show = 'temp disp_x disp_y'
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/contact/test/tests/sliding_block/edge_dropping/two_equal_blocks_slide_2d.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
nx = 4
ny = 4
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 1.0
ymin = -0.5
ymax = 0.5
nx = 5
ny = 5
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = PiecewiseLinear
x = '0 0.1 4'
y = '0 0.05 0.05'
[]
[vertical_movement]
type = PiecewiseLinear
x = '0 0.1 4'
y = '0 0 0.3'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = normal_lm
correct_edge_dropping = true
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist nonzero 1e-10'
line_search = 'none'
dt = 0.1
dtmin = 0.01
end_time = 1.0
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = 'secondary_lower'
[]
[normal_lm]
type = ElementAverageValue
variable = normal_lm
block = 'secondary_lower'
[]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[]
(test/tests/preconditioners/vcp/vcp_test.i)
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = non_conform_2blocks.e
[]
[secondary_side]
input = original_file_mesh
type = LowerDBlockFromSidesetGenerator
sidesets = '10'
new_block_id = '100'
new_block_name = 'secondary_side'
[]
[primary_side]
input = secondary_side
type = LowerDBlockFromSidesetGenerator
sidesets = '20'
new_block_id = '200'
new_block_name = 'primary_side'
[]
[]
[Functions]
[exact_sln]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[]
[ffn]
type = ParsedFunction
expression = 8*pi*pi*sin(2*pi*x)*sin(2*pi*y)
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = secondary_side
use_dual = true
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = ffn
[]
[]
[Constraints]
[ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 20
primary_subdomain = 200
secondary_boundary = 10
secondary_subdomain = 100
[]
[]
[BCs]
[all]
type = DirichletBC
variable = u
boundary = '30 40'
value = 0.0
[]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_sln
variable = u
boundary = '50 60'
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm'
primary_variable = 'u'
preconditioner = 'AMG'
is_lm_coupling_diagonal = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
l_max_its = 100
nl_rel_tol = 1e-6
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.1
displacements = 'disp_x disp_y disp_z'
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
mu = 0.4
c = 1e4
c_t = 1.0e4
newmark_gamma = 0.5
newmark_beta = 0.25
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-14'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
line_search = 'basic'
[TimeIntegrator]
type = NewmarkBeta
gamma = 0.5
beta = 0.25
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent1_lm]
family = LAGRANGE
order = FIRST
[]
[tangent2_lm]
family = LAGRANGE
order = FIRST
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[AuxKernels]
[tangent2_lm]
type = MortarPressureComponentAux
variable = tangent2_lm
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
lm_var_x = lm_x
lm_var_y = lm_y
lm_var_z = lm_z
component = 'tangent2'
boundary = 'top_bottom'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
c_t = 1e+2
mu = 0.10
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist NONZERO 1e-15'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[tangent2_lm]
type = NodalValueSampler
block = secondary_lower
variable = tangent2_lm
sort_by = 'id'
[]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/meshgenerators/block_deletion_generator/delete_interior_parents.i)
[Mesh]
[twoquad]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 4
xmax = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
input = twoquad
block_id = 1
bottom_left = '1 0 0'
top_right = '2 1 0'
[]
[sideset1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain
primary_block = 0
paired_block = 1
new_boundary = bar
[]
[lowerblock1]
type = LowerDBlockFromSidesetGenerator
input = sideset1
sidesets = bar
new_block_id = 2
[]
[sideset2]
type = SideSetsBetweenSubdomainsGenerator
input = lowerblock1
primary_block = 1
paired_block = 0
new_boundary = baz
[]
[delete]
type = BlockDeletionGenerator
input = sideset2
block = 0
[]
[lowerblock2]
type = LowerDBlockFromSidesetGenerator
input = delete
sidesets = baz
new_block_id = 3
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 0.1
ymin = 0.1
ymax = 0.35
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
correct_edge_dropping = true
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[interface_heat_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_heat_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[interface_electrical_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = moving_block_right
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/preconditioners/vcp/no_condense_test.i)
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = non_conform_2blocks.e
[]
[secondary_side]
input = original_file_mesh
type = LowerDBlockFromSidesetGenerator
sidesets = '10'
new_block_id = '100'
new_block_name = 'secondary_side'
[]
[primary_side]
input = secondary_side
type = LowerDBlockFromSidesetGenerator
sidesets = '20'
new_block_id = '200'
new_block_name = 'primary_side'
[]
[]
[Functions]
[exact_sln]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[]
[ffn]
type = ParsedFunction
expression = 8*pi*pi*sin(2*pi*x)*sin(2*pi*y)
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = secondary_side
use_dual = false
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = ffn
[]
[]
[Constraints]
[ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 20
primary_subdomain = 200
secondary_boundary = 10
secondary_subdomain = 100
[]
[]
[BCs]
[all]
type = DirichletBC
variable = u
boundary = '30 40'
value = 0.0
[]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_sln
variable = u
boundary = '50 60'
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-12'
l_max_its = 100
nl_rel_tol = 1e-6
[]
[Outputs]
csv = true
[]
(test/tests/mortar/ad_periodic_segmental_constraint/testperiodicsole.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[kappa_x]
order = FIRST
family = SCALAR
[]
[kappa_y]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[kappa_aux]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[kappa]
type = FunctionScalarAux
variable = kappa_aux
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = 1
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = 1
[../]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = 1
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodiclrx]
type = ADTestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
pen_scale = 1.e3
[]
[periodiclry]
type = ADTestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
pen_scale = 1.e3
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodicbtx]
type = ADTestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
pen_scale = 1.e3
[]
[periodicbty]
type = ADTestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
compute_scalar_residuals = true
pen_scale = 1.e3
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/pdass_problems/ironing.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = iron.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '10'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '20'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[frictionless_normal_lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
use_dual = true
[]
[tangential_lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[von_mises]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 2. 8.'
y = '0. -1.0 -1.0'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 8.' # x = '0. 2. 8.'
y = '0. 8.' # y = '0. 0. 8'
[]
[]
[Kernels]
[TensorMechanics]
use_displaced_mesh = true
save_in = 'saved_x saved_y'
block = '1 2'
strain = FINITE
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[von_mises_kernel]
#Calculates the von mises stress and assigns it to von_mises
type = RankTwoScalarAux
variable = von_mises
rank_two_tensor = stress
execute_on = timestep_end
scalar_type = VonMisesStress
block = '1 2'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 20
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 20
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 10
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 10
[]
[_dt]
type = TimestepSize
[]
[contact_pressure]
type = NodalVariableValue
variable = frictionless_normal_lm
nodeid = 805
[]
[]
[BCs]
[bot_x_disp]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
preset = false
[]
[bot_y_disp]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
preset = false
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = disp_ramp_vert
preset = false
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = '30'
function = disp_ramp_horz
preset = false
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 6896
poissons_ratio = 0.32
[]
[stuff1_strain]
type = ComputeFiniteStrain
block = '2'
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 689.6
poissons_ratio = 0.32
[]
[stuff2_strain]
type = ComputeFiniteStrain
block = '1'
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
l_tol = 1e-6
l_max_its = 50
nl_max_its = 30
start_time = 0.0
end_time = 0.1 # 6.5
dt = 0.0125
dtmin = 1e-5
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictionless_normal_lm
boundary = '10'
sort_by = id
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = tangential_lm
boundary = '10'
sort_by = id
execute_on = FINAL
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = false
csv = true
[chkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[console]
type = Console
max_rows = 5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
lm_variable_normal = frictionless_normal_lm
lm_variable_tangential_one = tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
# All constraints below for mechanical contact (Mortar)
[weighted_gap_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
friction_lm = tangential_lm
mu = 0.5
c_t = 1.0e1
c = 1.0e3
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = '10000'
secondary_subdomain = '10001'
variable = tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
(test/tests/mortar/displaced-gap-conductance-2d-non-conforming/gap-conductance.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = MONOMIAL
order = CONSTANT
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = ADDirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = ADDiffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[friction]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
mu = 0.4
c = 1e4
c_t = 1.0e4
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-14 1e-5'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-12
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.1
displacements = 'disp_x disp_y disp_z'
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
mu = 0.4
c = 1e4
c_t = 1.0e4
newmark_beta = 0.25
newmark_gamma = 0.5
correct_edge_dropping = true
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-14'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
line_search = 'basic'
[TimeIntegrator]
type = NewmarkBeta
gamma = 0.5
beta = 0.25
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_sphere_hex.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = spheres_hex8.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2 - 6'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = '4'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(test/tests/meshgenerators/lower_d_block_generator/refine-error.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[refine]
type = RefineSidesetGenerator
boundaries = 'left'
refinement = '1'
input = gmg
[]
[lower_d_block]
type = LowerDBlockFromSidesetGenerator
input = refine
new_block_id = 10
sidesets = 'bottom right top left'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = HeatConductionMaterial
block = 1
thermal_conductivity = 1000
specific_heat = 1
[]
[right]
type = HeatConductionMaterial
block = 2
thermal_conductivity = 500
specific_heat = 1
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temp
use_displaced_mesh = false
block = '1 2'
[]
[]
[UserObjects]
[simple]
type = GapFluxModelSimple
k = 100
temperature = temp
boundary = 100
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = simple
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-11
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/cohesive_zone_model/mortar_czm.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 5
ny = 5
boundary_name_prefix = bottom
[]
[msh_id]
type = SubdomainIDGenerator
input = msh
subdomain_id = 1
[]
[msh_two]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 5
ny = 5
boundary_name_prefix = top
boundary_id_offset = 10
[]
[msh_two_id]
type = SubdomainIDGenerator
input = msh_two
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'msh_id msh_two_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '0 0 0'
input = top_node
new_boundary = bottom_node
[]
# Build subdomains
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'bottom_top'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = 'top_bottom'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = top_top
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = top_top
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_bottom
variable = disp_y
value = 0
preset = true
[]
[]
[AuxVariables]
[]
[AuxKernels]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[normal_strength]
type = GenericFunctionMaterial
prop_names = 'N'
prop_values = 'if(x<0.5,1,100)*1e4'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
start_time = 0.0
dt = 0.01
end_time = 0.05
dtmin = 0.01
[]
[Outputs]
exodus = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.1 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 1e4
use_physical_gap = true
correct_edge_dropping = true
normal_strength = N
shear_strength = 1e3
viscosity = 1e-3
penalty_stiffness = 1e6
power_law_parameter = 2.2
GI_c = 1e3
GII_c = 1e2
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[c_x]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/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}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
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}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[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 = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_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)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[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
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
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'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[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_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
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]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_sphere_hex.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = spheres_hex8.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
uniform_refine = 0
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[T]
block = '1 2'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2 - 6'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = '4'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
secondary_variable = T
correct_edge_dropping = true
penalty_value = 1.e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 6'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(test/tests/meshgenerators/lower_d_block_generator/names.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./lower_d_block]
type = LowerDBlockFromSidesetGenerator
input = gmg
new_block_id = 10
sidesets = 'bottom bottom right top left'
[]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 10
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
block = 0
[../]
[./srcv]
type = BodyForce
block = 10
variable = v
function = 1
[../]
[./time_v]
type = TimeDerivative
block = 10
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# In this steady-state, symmetric simulation, the temperature at the interface between
# the two blocks of aluminum can be calculated through Fourier's law (see the documentation
# page for ADInterfaceJouleHeatingConstraint for the relevant formulas).
#
# With the prescribed 0.0 V (left) and 0.3V (right) potential boundary conditions, the
# electric potential drop is 9.25e6 [V * S / m^2]. From this current-density-like LM variable,
# the volumetric heat source at the interface is calculated as
# q = 1.15625e6 [W/m^3}
# Because of the 2D nature of this problem, the volumetric heat source is equal to
# the negative of the heat flux at the interface.
#
# Finally, the temperature at the interface is computed as a function of the block width,
# thermal conductivity, and specified temperature boundary condition (300K on both the
# left and right edges):
# T_{interface} = 850.5952K
# which matches the simulation result to the 6 decimal places shown.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/mortar/continuity-2d-conforming/conforming-2nd-order.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf-2nd.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= x*x+y*y
[../]
[./ffn]
type = ParsedFunction
expression= -4
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = SECOND
family = LAGRANGE
block = secondary_lower
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[Constraints]
[./ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
l_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/aux_kernels/element_normal_2D_3D.i)
# The PorousFlowElementNormal is used to calculate normal directions
[Mesh]
[base]
type = AnnularMeshGenerator
dmax = 90
nr = 1
nt = 1
rmin = 0.1
rmax = 1
[]
[make3D]
type = MeshExtruderGenerator
input = base
bottom_sideset = bottom
extrusion_vector = '0 0 1'
top_sideset = top
[]
[rmax_block]
type = LowerDBlockFromSidesetGenerator
input = make3D
sidesets = rmax
new_block_name = rmax
[]
[top_block]
type = LowerDBlockFromSidesetGenerator
input = rmax_block
sidesets = top
new_block_name = top
[]
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[nx]
family = MONOMIAL
order = CONSTANT
[]
[ny]
family = MONOMIAL
order = CONSTANT
[]
[nz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[nx]
type = PorousFlowElementNormal
variable = nx
component = x
3D_default = '-3 4 5'
[]
[ny]
type = PorousFlowElementNormal
variable = ny
component = y
3D_default = '-3 4 5'
[]
[nz]
type = PorousFlowElementNormal
variable = nz
component = z
3D_default = '-3 4 5'
[]
[]
[Postprocessors]
[n3Dx]
type = ElementAverageValue
variable = nx
block = 0
[]
[n3Dy]
type = ElementAverageValue
variable = ny
block = 0
[]
[n3Dz]
type = ElementAverageValue
variable = nz
block = 0
[]
[nrmaxx]
type = ElementAverageValue
variable = nx
block = rmax
[]
[nrmaxy]
type = ElementAverageValue
variable = ny
block = rmax
[]
[nrmaxz]
type = ElementAverageValue
variable = nz
block = rmax
[]
[ntopx]
type = ElementAverageValue
variable = nx
block = top
[]
[ntopy]
type = ElementAverageValue
variable = ny
block = top
[]
[ntopz]
type = ElementAverageValue
variable = nz
block = top
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
[]
[Outputs]
csv = true
exodus = true
[]
(test/tests/mortar/mortar-q-points/test.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
uniform_refine = 2
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./reaction]
type = Reaction
variable = T
block = '1 2'
[../]
[]
[Constraints]
[./mortar]
type = SpatiallyVaryingSource
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/pdass_problems/ironing_penalty_al.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = iron.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '10'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '20'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
allow_renumbering = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[penalty_normal_pressure]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_one]
order = FIRST
family = LAGRANGE
[]
[tangential_vel_one]
order = FIRST
family = LAGRANGE
[]
[real_weighted_gap]
order = FIRST
family = LAGRANGE
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[von_mises]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 2. 8.'
y = '0. -1.0 -1.0'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 8.'
y = '0. 8.'
[]
[]
[Kernels]
[TensorMechanics]
use_displaced_mesh = true
save_in = 'saved_x saved_y'
block = '1 2'
strain = FINITE
[]
[]
[AuxKernels]
[penalty_normal_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_tangential_vel_auxk]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
[]
[real_weighted_gap_auxk]
type = PenaltyMortarUserObjectAux
variable = real_weighted_gap
user_object = friction_uo
contact_quantity = normal_gap
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[von_mises_kernel]
#Calculates the von mises stress and assigns it to von_mises
type = RankTwoScalarAux
variable = von_mises
rank_two_tensor = stress
execute_on = timestep_end
scalar_type = VonMisesStress
block = '1 2'
[]
[]
# [VectorPostprocessors]
# [penalty_normal_pressure]
# type = NodalValueSampler
# variable = penalty_normal_pressure
# boundary = 10
# sort_by = id
# []
# []
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[force_x]
type = NodalSum
boundary = 30
variable = saved_x
[]
[force_y]
type = NodalSum
boundary = 30
variable = saved_y
[]
[gap]
type = SideExtremeValue
value_type = min
variable = real_weighted_gap
boundary = 10
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[]
[BCs]
[bot_x_disp]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
preset = false
[]
[bot_y_disp]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
preset = false
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = disp_ramp_vert
preset = false
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = '30'
function = disp_ramp_horz
preset = false
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 6896
poissons_ratio = 0.32
[]
[stuff1_strain]
type = ComputeFiniteStrain
block = '2'
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 689.6
poissons_ratio = 0.32
[]
[stuff2_strain]
type = ComputeFiniteStrain
block = '1'
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
l_tol = 1e-6
l_max_its = 7
nl_max_its = 300
start_time = 0.0
end_time = 6.5 # 6.5
dt = 0.0125
dtmin = 1e-5
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = true
# [chkfile]
# type = CSV
# start_time = 0.0
# execute_vector_postprocessors_on = FINAL
# []
[console]
type = Console
max_rows = 5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.4 # with 2.0 works
secondary_variable = disp_x
penalty = 5e5
penalty_friction = 1e4
slip_tolerance = 1e-05
penetration_tolerance = 1e-03
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[t_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[t_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/combined/test/tests/nodal_patch_recovery/npr_with_lower_domains.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
[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}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
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}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[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 = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_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)}'
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[AuxVariables]
[stress_xx]
order = FIRST
family = MONOMIAL
block = 'plank block'
[]
[stress_yy]
order = FIRST
family = MONOMIAL
block = 'plank block'
[]
[stress_xx_recovered]
order = FIRST
family = LAGRANGE
block = 'plank block'
[]
[stress_yy_recovered]
order = FIRST
family = LAGRANGE
block = 'plank block'
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = 'timestep_end'
block = 'plank block'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = 'timestep_end'
block = 'plank block'
[]
[stress_xx_recovered]
type = NodalPatchRecoveryAux
variable = stress_xx_recovered
nodal_patch_recovery_uo = stress_xx_patch
execute_on = 'TIMESTEP_END'
block = 'plank block'
[]
[stress_yy_recovered]
type = NodalPatchRecoveryAux
variable = stress_yy_recovered
nodal_patch_recovery_uo = stress_yy_patch
execute_on = 'TIMESTEP_END'
block = 'plank block'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = false
strain = FINITE
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[stress_xx_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '0 0'
execute_on = 'NONLINEAR TIMESTEP_END'
block = 'plank block'
[]
[stress_yy_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '1 1'
execute_on = 'NONLINEAR TIMESTEP_END'
block = 'plank block'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[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'
preset = false
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[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'
[]
[heat_plank]
type = HeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = HeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 0.4
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[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_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
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
[]
[stress_xx_recovered]
type = ElementExtremeValue
variable = stress_xx_recovered
block = 'block'
value_type = max
[]
[stress_yy_recovered]
type = ElementExtremeValue
variable = stress_yy_recovered
block = 'block'
value_type = max
[]
[]
[Outputs]
exodus = true
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/mortar/convergence-studies/solution-continuity/continuity.i)
[Mesh]
second_order = true
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary_id = '0 1 2 3'
new_boundary_name = 'lb_bottom lb_right lb_top lb_left'
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 1
xmax = 2
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary_id = '0 1 2 3'
new_boundary_id = '100 101 102 103'
[]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[./T]
block = 'left_block right_block'
order = SECOND
[../]
[./lambda]
block = 'secondary_lower'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = 'left_block right_block'
[../]
[./sink]
type = Reaction
variable = T
block = 'left_block right_block'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = ''
[../]
[./exact_soln_primal]
type = ParsedFunction
expression = ''
[../]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
delta = 0.4
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
csv = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/mortar/continuity-2d-non-conforming/sequencing-stateful-soln-continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = SECOND
[../]
[./lambda]
block = '10'
[../]
[]
[AuxVariables]
[ssm]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[AuxKernels]
[ssm]
type = MaterialRealAux
variable = ssm
property = diffusivity
block = '1 2'
[]
[]
[Materials]
[./ssm]
type = SpatialStatefulMaterial
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
num_grids = 2
[]
[Outputs]
exodus = true
[]
[Adaptivity]
steps = 1
marker = uniform
[Markers]
[uniform]
type = UniformMarker
mark = refine
[]
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Materials]
[./left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 1000
specific_heat = 1
[../]
[./right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 500
specific_heat = 1
[../]
[]
[Kernels]
[./hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[../]
[./hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[../]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[simple]
type = GapFluxModelSimple
k = 100
temperature = temp
boundary = 100
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = simple
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[../]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
[]
[Outputs]
exodus = true
show = 'temp disp_x disp_y'
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/mortar/periodic-value/periodic.i)
[Mesh]
[file]
type = FileMeshGenerator
file = square.msh
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '103'
[]
[]
[Variables]
[u]
order = SECOND
block = 'domain'
[]
[lm]
block = 'secondary'
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
block = 'domain'
[]
[force]
type = BodyForce
variable = u
block = 'domain'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
value = 1
boundary = 'left'
[]
[]
[Constraints]
[ev]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 103
secondary_boundary = 101
primary_subdomain = 12
secondary_subdomain = 11
periodic = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 1
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'TANGENT1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '0.1 * t'
[]
[vertical_movement]
type = ParsedFunction
expression = '0.0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-8 NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'id'
[]
[]
(modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_2d_pg.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
nx = 4
ny = 4
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 1.0
ymin = -0.5
ymax = 0.5
nx = 5
ny = 5
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = PiecewiseLinear
x = '0 1.0'
y = '0 0.4'
[]
[vertical_movement]
type = PiecewiseLinear
x = '0 1.0'
y = '0 0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
correct_edge_dropping = true
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist nonzero 1e-10'
line_search = 'none'
dt = 0.1
dtmin = 0.01
end_time = 1.0
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = 'secondary_lower'
[]
[normal_lm]
type = ElementAverageValue
variable = normal_lm
block = 'secondary_lower'
[]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/fracture_diffusion/no_multiapp.i)
# A fracture, which is a 1D line of elements, is embedded in a matrix, which is a 2D surface of elements.
# The meshes conform: all fracture nodes are also matrix nodes (the fracture elements are sides of matrix elements).
# The overall mesh has two blocks, named "matrix" and "fracture".
#
# Two variables are defined:
# - frac_T, which is the temperature inside the fracture;
# - matrix_T, which is the temperature in the matrix.
# frac_T is governed by a diffusion equation along the 1D fracture.
# matrix_T is governed by a diffusion equation in the 2D matrix, with small diffusion coefficient.
# Heat is exchanged between the two systems via a heat-transfer coefficient, defined on the fracture subdomain, using two PorousFlowHeatMassTransfer Kernels
#
# If the mesh is too coarse, overshoots and undershoots in matrix_T can be observed.
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = 0
xmax = 10.0
ny = 20 # anything less than this produces over/under-shoots
ymin = -2
ymax = 2
[]
[matrix_subdomain]
type = RenameBlockGenerator
input = generate
old_block = 0
new_block = matrix
[]
[fracture_sideset]
type = ParsedGenerateSideset
input = matrix_subdomain
combinatorial_geometry = 'y>-1E-6 & y<1E-6'
normal = '0 1 0'
new_sideset_name = fracture_sideset
[]
[fracture_subdomain]
type = LowerDBlockFromSidesetGenerator
input = fracture_sideset
new_block_id = 1
new_block_name = fracture
sidesets = fracture_sideset
[]
[]
[Variables]
[frac_T]
block = fracture
[]
[matrix_T]
# Needs to be defined on both blocks, so PorousFlowHeatMassTransfer works appropriately
# Kernels for diffusion are on block=matrix only
[]
[]
[BCs]
[frac_T]
type = DirichletBC
variable = frac_T
boundary = left
value = 1
[]
[]
[Kernels]
[dot_frac_T]
type = CoefTimeDerivative
Coefficient = 1E-2
variable = frac_T
block = fracture
[]
[fracture_diffusion]
type = AnisotropicDiffusion
variable = frac_T
tensor_coeff = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
block = fracture
[]
[toMatrix]
type = PorousFlowHeatMassTransfer
block = fracture
variable = frac_T
v = matrix_T
transfer_coefficient = 0.02
[]
[dot_matrix_T]
type = TimeDerivative
variable = matrix_T
block = matrix
[]
[matrix_diffusion]
type = AnisotropicDiffusion
variable = matrix_T
tensor_coeff = '1E-3 0 0 0 1E-3 0 0 0 1E-3'
block = matrix
[]
[fromFracture]
type = PorousFlowHeatMassTransfer
block = fracture
variable = matrix_T
v = frac_T
transfer_coefficient = 0.02
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[VectorPostprocessors]
[frac_T]
type = NodalValueSampler
block = fracture
outputs = frac_T
sort_by = x
variable = frac_T
[]
[]
[Outputs]
print_linear_residuals = false
exodus = false
[frac_T]
type = CSV
execute_on = FINAL
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_test_nochange.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[dual_var]
use_dual = true
block = '10001'
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'none'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-8
nl_max_its = 1300
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 1.0 # 3.5
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e7
penetration_tolerance = 1e-8
use_mortar_scaled_gap = true
aux_lm = dual_var
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_non_conforming_tet.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = tet_non_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/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}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
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}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[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 = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_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)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[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
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[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 = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[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_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
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]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_split.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbf]
type = PenaltyEqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbf]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'uv' # 'uv' should match the following block name
[uv]
splitting = 'u v' # 'u' and 'v' are the names of subsolvers
splitting_type = additive
[]
[u]
vars = 'u'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 10'
[]
[v]
vars = 'epsilon'
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' preonly hypre boomeramg 10'
[]
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[]
[upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[]
[upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[]
[lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[flux_y]
order = FIRST
family = MONOMIAL
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[]
[flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = '1 4'
[]
[diff2]
type = MatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO 1e-15 strumpack'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/sliding_block/edge_dropping/two_equal_blocks_slide_3d.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 1.0
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = 'left_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = 'right_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = PiecewiseLinear
x = '0 0.1 4'
y = '0 0.05 0.05'
[]
[vertical_movement]
type = PiecewiseLinear
x = '0 0.1 4'
y = '0 0 0.3'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'left_left'
function = horizontal_movement
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'left_left'
function = vertical_movement
[]
[fix_left_z]
type = DirichletBC
variable = disp_z
boundary = 'left_left'
value = 0.0
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 'right_right'
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 'right_right'
value = 0.0
[]
[fix_right_z]
type = DirichletBC
variable = disp_z
boundary = 'right_right'
value = 0.0
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist nonzero 1e-10'
line_search = 'none'
dt = 0.1
dtmin = 0.01
end_time = 0.4
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = 'secondary_lower'
[]
[normal_lm]
type = ElementAverageValue
variable = normal_lm
block = 'secondary_lower'
[]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[]
(test/tests/mortar/convergence-studies/gap-conductance/gap-conductance.i)
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
second_order = true
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary_id = '0 1 2 3'
new_boundary = 'lb_bottom lb_right lb_top lb_left'
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary_id = '0 1 2 3'
new_boundary_id = '100 101 102 103'
[]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[./T]
block = 'left_block right_block'
order = SECOND
[../]
[./lambda]
block = 'secondary_lower'
family = MONOMIAL
order = CONSTANT
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = 'left_block right_block'
[../]
[./sink]
type = Reaction
variable = T
block = 'left_block right_block'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = ''
[../]
[./exact_soln_primal]
type = ParsedFunction
expression = ''
[../]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[mms_secondary]
type = ParsedFunction
expression = ''
[]
[mms_primary]
type = ParsedFunction
expression = ''
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
secondary_gap_conductance = 1
primary_gap_conductance = 1
secondary_mms_function = mms_secondary
primary_mms_function = mms_primary
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[./lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[../]
[./upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[../]
[./upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[../]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[../]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = '1 4'
[]
[diff2]
type = MatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_3d_pg.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 1.0
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = 'left_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = 'right_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = PiecewiseLinear
x = '0 0.5'
y = '0 0.2'
[]
[vertical_movement]
type = PiecewiseLinear
x = '0 1.0'
y = '0 0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'left_left'
function = horizontal_movement
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'left_left'
function = vertical_movement
[]
[fix_left_z]
type = DirichletBC
variable = disp_z
boundary = 'left_left'
value = 0.0
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 'right_right'
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 'right_right'
value = 0.0
[]
[fix_right_z]
type = DirichletBC
variable = disp_z
boundary = 'right_right'
value = 0.0
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
correct_edge_dropping = true
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist nonzero 1e-10'
line_search = 'none'
dt = 0.1
dtmin = 0.01
end_time = 0.4
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = 'secondary_lower'
[]
[normal_lm]
type = ElementAverageValue
variable = normal_lm
block = 'secondary_lower'
[]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = radiation
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_adaptivity.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_coarser.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[react_x]
[]
[react_y]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_tangential_vel]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
[]
[penalty_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
[]
[react_x]
type = TagVectorAux
vector_tag = 'ref'
v = 'disp_x'
variable = 'react_x'
[]
[react_y]
type = TagVectorAux
vector_tag = 'ref'
v = 'disp_y'
variable = 'react_y'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = react_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = react_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = react_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = react_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
line_search = 'none'
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 0.3 # 3.5
l_tol = 1e-4
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[console]
type = Console
max_rows = 5
[]
[vectorpp_output]
type = CSV
create_final_symlink = true
file_base = cylinder_friction_penalty_adaptivity
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.4
secondary_variable = disp_x
penalty = 5e7
penalty_friction = 5e8
[]
[geo]
type = GeometrySphere
boundary = 3
center = '0 4 0'
radius = 3
[]
[]
[Adaptivity]
[Markers]
[contact]
type = BoundaryMarker
mark = REFINE
next_to = 3
[]
[]
initial_marker = contact
initial_steps = 2
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_compare.i)
[Mesh]
[base]
type = GeneratedMeshGenerator
dim = 2
xmax = 1.0
ymax = 1
xmin = -0.0
nx = 1
ny = 1
[]
[rename_base]
type = RenameBoundaryGenerator
input = base
old_boundary = 'top bottom left right'
new_boundary = 'top_base bottom_base left_base right_base'
[]
[base_id]
type = SubdomainIDGenerator
input = rename_base
subdomain_id = 1
[]
[top]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 1
ny = 1
[]
[rename_top]
type = RenameBoundaryGenerator
input = top
old_boundary = 'top bottom left right'
new_boundary = '100 101 102 103'
[]
[top_id]
type = SubdomainIDGenerator
input = rename_top
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'base_id top_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '-0.0 0 0'
input = top_node
new_boundary = bottom_node
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'top_base'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '101'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy vonmises_stress stress_xy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
generate_output = 'vonmises_stress stress_yy stress_xy'
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = 100
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = 100
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_base
variable = disp_y
value = 0
preset = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[]
[Postprocessors]
[stress_yy]
type = ElementExtremeValue
variable = stress_yy
value_type = max
block = '1 2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
# petsc_options = '-pc_svd_monitor -ksp_monitor_singular_values'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'svd superlu_dist'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 150
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.01
end_time = 0.85
dtmin = 0.01
[]
[Outputs]
exodus = true
csv = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
correct_edge_dropping = true
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.0 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 0e4
use_physical_gap = true
# bilinear parameters
normal_strength = 1e4
shear_strength = 1e3
penalty_stiffness = 1e6
power_law_parameter = 2.2
viscosity = 1.0e-3
GI_c = 1e3
GII_c = 1e2
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[c_x]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[]
(modules/contact/test/tests/simple_contact/two_block_compress/two_equal_blocks_compress_3d.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 1.0
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = 'left_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = 'right_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = PiecewiseLinear
x = '0 0.5'
y = '0 0.2'
[]
[vertical_movement]
type = PiecewiseLinear
x = '0 1.0'
y = '0 0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'left_left'
function = horizontal_movement
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'left_left'
function = vertical_movement
[]
[fix_left_z]
type = DirichletBC
variable = disp_z
boundary = 'left_left'
value = 0.0
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 'right_right'
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 'right_right'
value = 0.0
[]
[fix_right_z]
type = DirichletBC
variable = disp_z
boundary = 'right_right'
value = 0.0
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
correct_edge_dropping = true
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'right_left'
secondary_boundary = 'left_right'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_gap_uo
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist nonzero 1e-10'
line_search = 'none'
dt = 0.1
dtmin = 0.01
end_time = 0.4
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = 'secondary_lower'
[]
[normal_lm]
type = ElementAverageValue
variable = normal_lm
block = 'secondary_lower'
[]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[]
(test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
[]
[./ssm]
type = SpatialStatefulMaterial
block = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = ADPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = ADPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/contact/test/tests/pdass_problems/ironing_penalty.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = iron.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '10'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '20'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
allow_renumbering = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[penalty_normal_pressure]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_one]
order = FIRST
family = LAGRANGE
[]
[tangential_vel_one]
order = FIRST
family = LAGRANGE
[]
[real_weighted_gap]
order = FIRST
family = LAGRANGE
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[von_mises]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 2. 8.'
y = '0. -1.0 -1.0'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 8.'
y = '0. 8.'
[]
[]
[Kernels]
[TensorMechanics]
use_displaced_mesh = true
save_in = 'saved_x saved_y'
block = '1 2'
strain = FINITE
[]
[]
[AuxKernels]
[penalty_normal_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_tangential_vel_auxk]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
[]
[real_weighted_gap_auxk]
type = PenaltyMortarUserObjectAux
variable = real_weighted_gap
user_object = friction_uo
contact_quantity = normal_gap
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[von_mises_kernel]
#Calculates the von mises stress and assigns it to von_mises
type = RankTwoScalarAux
variable = von_mises
rank_two_tensor = stress
execute_on = timestep_end
scalar_type = VonMisesStress
block = '1 2'
[]
[]
[VectorPostprocessors]
[penalty_normal_pressure]
type = NodalValueSampler
variable = penalty_normal_pressure
boundary = 10
sort_by = id
[]
[]
[BCs]
[bot_x_disp]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
preset = false
[]
[bot_y_disp]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
preset = false
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = disp_ramp_vert
preset = false
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = '30'
function = disp_ramp_horz
preset = false
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 6896
poissons_ratio = 0.32
[]
[stuff1_strain]
type = ComputeFiniteStrain
block = '2'
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 689.6
poissons_ratio = 0.32
[]
[stuff2_strain]
type = ComputeFiniteStrain
block = '1'
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
l_tol = 1e-6
l_max_its = 50
nl_max_its = 30
start_time = 0.0
end_time = 6.5 # 6.5
dt = 0.0125
dtmin = 1e-5
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = true
[chkfile]
type = CSV
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[console]
type = Console
max_rows = 5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.1 # with 2.0 works
secondary_variable = disp_x
penalty = 1e5
penalty_friction = 1e4
use_physical_gap = true
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[t_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[t_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(test/tests/mortar/continuity-2d-conforming/conforming.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[Constraints]
[./ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
l_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_aux.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-al.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[penalty_normal_pressure]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure_one]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_one]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure_two]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_two]
order = FIRST
family = LAGRANGE
[]
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
[]
[AuxKernels]
[penalty_normal_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure_one_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure_one
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_frictional_pressure_two_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure_two
user_object = friction_uo
contact_quantity = tangential_pressure_two
[]
[penalty_accumulated_slip_two_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_two
user_object = friction_uo
contact_quantity = accumulated_slip_two
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
allow_renumbering = false
[]
[Variables]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e5
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
# Other object should mix formulations
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
friction_coefficient = 0.4
secondary_variable = disp_x
penalty = 1e0
penalty_friction = 1e1
slip_tolerance = 7.0e-4 # 1e-6
penetration_tolerance = 7.0e-4
# max_penalty_multiplier = 10
penalty_multiplier = 10
penalty_multiplier_friction = 5
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
l_max_its = 15
nl_max_its = 90
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[]
[VectorPostprocessors]
[]
(test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbf]
type = ADPenaltyEqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbf]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
mu = 0.4
c = 1e4
c_t = 1.0e4
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -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-14 1e-5'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-12
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[]
(modules/contact/test/tests/cohesive_zone_model/mortar_czm_analysis.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 5
ny = 5
boundary_name_prefix = bottom
[]
[msh_id]
type = SubdomainIDGenerator
input = msh
subdomain_id = 1
[]
[msh_two]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 5
ny = 5
boundary_name_prefix = top
boundary_id_offset = 10
[]
[msh_two_id]
type = SubdomainIDGenerator
input = msh_two
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'msh_id msh_two_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '0 0 0'
input = top_node
new_boundary = bottom_node
[]
# Build subdomains
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'bottom_top'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = 'top_bottom'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[lateral_top]
type = FunctionDirichletBC
boundary = top_top
variable = disp_x
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[top]
type = FunctionDirichletBC
boundary = top_top
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_bottom
variable = disp_y
value = 0
preset = true
[]
[]
[AuxVariables]
[mode_mixity_ratio]
[]
[damage]
[]
[local_normal_jump]
[]
[local_tangential_jump]
[]
[]
[AuxKernels]
[mode_mixity_ratio]
type = CohesiveZoneMortarUserObjectAux
variable = mode_mixity_ratio
user_object = czm_uo
cohesive_zone_quantity = mode_mixity_ratio
boundary = 'bottom_top'
[]
[cohesive_damage]
type = CohesiveZoneMortarUserObjectAux
variable = damage
user_object = czm_uo
cohesive_zone_quantity = cohesive_damage
boundary = 'bottom_top'
[]
[local_normal_jump]
type = CohesiveZoneMortarUserObjectAux
variable = local_normal_jump
user_object = czm_uo
cohesive_zone_quantity = local_normal_jump
boundary = 'bottom_top'
[]
[local_tangential_jump]
type = CohesiveZoneMortarUserObjectAux
variable = local_tangential_jump
user_object = czm_uo
cohesive_zone_quantity = local_tangential_jump
boundary = 'bottom_top'
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[normal_strength]
type = GenericFunctionMaterial
prop_names = 'N'
prop_values = 'if(x<0.5,1,100)*1e4'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.0005
end_time = 0.01
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.1 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 1e4
use_physical_gap = true
correct_edge_dropping = true
normal_strength = N
shear_strength = 1e3
viscosity = 1e-3
penalty_stiffness = 1e6
mixed_mode_criterion = POWER_LAW
power_law_parameter = 2.2
GI_c = 1e3
GII_c = 1e2
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[c_x]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_tet.i)
[Mesh]
second_order = false
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0
xmax = 0.3
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'lb_bottom lb_back lb_right lb_front lb_left lb_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0.3
xmax = 0.6
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 0 1'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 0 -1'
[]
[right_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_bottom_sideset
new_boundary = rb_front
block = right_block
normal = '0 1 0'
[]
[right_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_front_sideset
new_boundary = rb_back
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '12'
new_block_name = 'secondary'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '11'
new_block_name = 'primary'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = 'secondary'
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_back lb_front lb_left lb_top lb_bottom rb_right rb_top rb_bottom rb_front rb_back'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 'rb_left'
secondary_boundary = 'lb_right'
primary_subdomain = '11'
secondary_subdomain = '12'
variable = lambda
secondary_variable = T
delta = .1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(modules/combined/test/tests/stateful_mortar_constraints/stateful_mortar_npr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
[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}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
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}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[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 = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_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)}'
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[AuxVariables]
[stress_xx]
order = FIRST
family = MONOMIAL
block = 'plank block'
[]
[stress_yy]
order = FIRST
family = MONOMIAL
block = 'plank block'
[]
[stress_xx_recovered]
order = FIRST
family = LAGRANGE
block = 'plank block'
[]
[stress_yy_recovered]
order = FIRST
family = LAGRANGE
block = 'plank block'
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = 'timestep_end'
block = 'plank block'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = 'timestep_end'
block = 'plank block'
[]
[stress_xx_recovered]
type = NodalPatchRecoveryAux
variable = stress_xx_recovered
nodal_patch_recovery_uo = stress_xx_patch
execute_on = 'TIMESTEP_END'
block = 'plank block'
[]
[stress_yy_recovered]
type = NodalPatchRecoveryAux
variable = stress_yy_recovered
nodal_patch_recovery_uo = stress_yy_patch
execute_on = 'TIMESTEP_END'
block = 'plank block'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = false
strain = FINITE
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[stress_xx_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '0 0'
execute_on = 'NONLINEAR TIMESTEP_END'
block = 'plank block'
[]
[stress_yy_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '1 1'
execute_on = 'NONLINEAR TIMESTEP_END'
block = 'plank block'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceStatefulConstraint
variable = thermal_lm
secondary_variable = temp
k = 0.0001
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
stateful_variable = stress_xx_recovered
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[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'
preset = false
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[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'
[]
[heat_plank]
type = HeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = HeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 0.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
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
[]
[stress_xx_recovered]
type = ElementExtremeValue
variable = stress_xx_recovered
block = 'block'
value_type = max
[]
[stress_yy_recovered]
type = ElementExtremeValue
variable = stress_yy_recovered
block = 'block'
value_type = max
[]
[min_temperature]
type = ElementExtremeValue
variable = temp
block = 'plank'
value_type = min
[]
[]
[Outputs]
exodus = true
[out]
type = CSV
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-penalty.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[penalty_normal_pressure]
order = FIRST
family = LAGRANGE
[]
[]
[AuxKernels]
[penalty_normal_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = normal_uo
contact_quantity = normal_pressure
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
# Other object should mix formulations
[UserObjects]
[normal_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
penalty = 1e8
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = normal_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = normal_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = normal_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-12
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[]
[VectorPostprocessors]
[]
(test/tests/mortar/coincident-nodes/test.i)
[Mesh]
[top]
type = GeneratedMeshGenerator
dim = 2
ymin = 0.5
ymax = 1
nx = 2
ny = 1
subdomain_ids = '0 0'
[]
[bottom]
type = GeneratedMeshGenerator
dim = 2
ymin = 0
ymax = 0.5
nx = 2
ny = 1
subdomain_ids = '1 1'
[]
[combine]
type = CombinerGenerator
inputs = 'top bottom'
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
input = combine
sidesets = left
new_block_id = 11
new_block_name = secondary
[]
[primary]
type = LowerDBlockFromSidesetGenerator
input = secondary
sidesets = right
new_block_id = 12
new_block_name = primary
[]
[]
[Problem]
solve = false
[]
[Variables]
[u][]
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
secondary_variable = u
primary_boundary = right
secondary_boundary = left
primary_subdomain = 12
secondary_subdomain = 11
penalty_value = 10
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_vcp.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y'
primary_variable = 'disp_x disp_y'
preconditioner = 'LU'
is_lm_coupling_diagonal = false
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' 1e-8 NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-penalty.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[penalty_normal_pressure]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure_one]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_one]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure_two]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_two]
order = FIRST
family = LAGRANGE
[]
[]
[AuxKernels]
[penalty_normal_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure_one_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure_one
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_frictional_pressure_two_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure_two
user_object = friction_uo
contact_quantity = tangential_pressure_two
[]
[penalty_accumulated_slip_two_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_two
user_object = friction_uo
contact_quantity = accumulated_slip_two
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
allow_renumbering = false
[]
[Variables]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e5
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
# Other object should mix formulations
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
friction_coefficient = 0.4
secondary_variable = disp_x
penalty = 1e8
penalty_friction = 5e6
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[]
[VectorPostprocessors]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-10'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-6
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
file_base = './output/1st_order_${theta}_degree_out'
[comp]
type = CSV
show = 'tot_lin_it tot_nonlin_it'
execute_on = 'FINAL'
[]
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[]
(modules/solid_mechanics/test/tests/jacobian_damper/block_restriction.i)
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[lower_d]
type = LowerDBlockFromSidesetGenerator
input = gmg
sidesets = left
new_block_id = 10
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1 2'
y = '0 0.025 0.05'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = FINITE
add_variables = true
new_system = true
formulation = TOTAL
block = 0
[]
[]
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = 3
function = top_pull
preset = true
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 2e5
block = 0
[]
[stress]
type = ComputeLagrangianLinearElasticStress
large_kinematics = true
block = 0
[]
[dummy]
type = GenericConstantMaterial
prop_names = dummy
prop_values = 0
block = 10
[]
[]
[Dampers]
[ejd]
type = ReferenceElementJacobianDamper
max_increment = 0.002
displacements = 'disp_x disp_y disp_z'
block = 0
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 2
dt = 1
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_mixed.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = mixed_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_verbose.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
use_displaced_mesh = true
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
correct_edge_dropping = true
gap_flux_models = 'radiation conduction'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
csv = true
[exodus]
type = Exodus
show = 'temp'
[]
[]
(test/tests/mortar/periodic_segmental_constraint/testperiodicsole.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[kappa_x]
order = FIRST
family = SCALAR
[]
[kappa_y]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[kappa_aux]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[kappa]
type = FunctionScalarAux
variable = kappa_aux
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = 1
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = 1
[../]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodiclrx]
type = TestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodiclry]
type = TestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
penalty_value = 1.e3
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodicbtx]
type = TestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodicbty]
type = TestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
compute_scalar_residuals = true
penalty_value = 1.e3
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/aux_kernels/element_normal_1D_2D.i)
# The PorousFlowElementNormal is used to calculate normal directions
[Mesh]
[base]
type = AnnularMeshGenerator
dmax = 90
nr = 3
nt = 1
rmin = 0
rmax = 1
[]
[rotate]
type = TransformGenerator
input = base
transform = ROTATE
vector_value = '0 45 0'
[]
[rmax_block]
type = LowerDBlockFromSidesetGenerator
input = rotate
sidesets = rmax
new_block_name = rmax
[]
[dmax_block]
type = LowerDBlockFromSidesetGenerator
input = rmax_block
sidesets = dmax
new_block_name = dmax
[]
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[nx]
family = MONOMIAL
order = CONSTANT
[]
[ny]
family = MONOMIAL
order = CONSTANT
[]
[nz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[nx]
type = PorousFlowElementNormal
variable = nx
component = x
1D_perp = '0 1 0'
[]
[ny]
type = PorousFlowElementNormal
variable = ny
component = y
1D_perp = '0 1 0'
[]
[nz]
type = PorousFlowElementNormal
variable = nz
component = z
1D_perp = '0 1 0'
[]
[]
[Postprocessors]
[n2Dx]
type = ElementAverageValue
variable = nx
block = '0 1'
[]
[n2Dy]
type = ElementAverageValue
variable = ny
block = '0 1'
[]
[n2Dz]
type = ElementAverageValue
variable = nz
block = '0 1'
[]
[nrmaxx]
type = ElementAverageValue
variable = nx
block = rmax
[]
[nrmaxy]
type = ElementAverageValue
variable = ny
block = rmax
[]
[nrmaxz]
type = ElementAverageValue
variable = nz
block = rmax
[]
[ndmaxx]
type = ElementAverageValue
variable = nx
block = dmax
[]
[ndmaxy]
type = ElementAverageValue
variable = ny
block = dmax
[]
[ndmaxz]
type = ElementAverageValue
variable = nz
block = dmax
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
[]
[Outputs]
csv = true
[]