Skip to content

Commit

Permalink
Merge pull request idaholab#3020 from bwspenc/contact
Browse files Browse the repository at this point in the history
Add and test MechanicalContactConstraint ref idaholab#2816
  • Loading branch information
friedmud committed Apr 29, 2014
2 parents fc98b2a + 808d7ec commit 397c5c2
Show file tree
Hide file tree
Showing 14 changed files with 1,535 additions and 0 deletions.
Binary file not shown.
@@ -0,0 +1,16 @@
brick x 0.6 y 2 z 1
brick x 0.6 y 0.8 z 1
volume 2 move {0.6 + 0.01}
volume all move 0 0 -0.5
surface 1 size 0.15
surface 7 size 0.1
mesh surface 1
mesh surface 7
sideset 1 curve 3
sideset 2 curve 1
sideset 3 curve 15
sideset 4 curve 13
block 1 surface 1
block 2 surface 7
block all element type QUAD4
export mesh "blocks_2d.e" overwrite
@@ -0,0 +1,211 @@
[Mesh]
file = blocks_2d.e
displacements = 'disp_x disp_y'
[]

[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]

[AuxVariables]
[./penetration]
order = FIRST
family = LAGRANGE
[../]
[./nodal_area]
order = FIRST
family = LAGRANGE
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]

[Functions]
[./vertical_movement]
type = ParsedFunction
value = -t
[../]
[]

[SolidMechanics]
[./solid]
disp_x = disp_x
disp_y = disp_y
[../]
[]

[AuxBCs]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]

[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep
[../]
[]

[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = PresetBC
variable = disp_x
boundary = 4
#Initial gap is 0.01
value = -0.02
[../]
[./right_y]
type = FunctionPresetBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]

[Materials]
[./left]
type = LinearIsotropicMaterial
block = 1
disp_y = disp_y
disp_x = disp_x
poissons_ratio = 0.3
youngs_modulus = 1e7
[../]
[./right]
type = LinearIsotropicMaterial
block = 2
disp_y = disp_y
disp_x = disp_x
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]

[Executioner]
type = Transient

solve_type = 'PJFNK'

petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'

line_search = 'none'

l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.10
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
dtmin = 0.01

[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]

[Outputs]
file_base = frictionless_kinematic_out
output_initial = true
[./exodus]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
perf_log = true
linear_residuals = true
max_rows = 5
[../]
[]

[UserObjects]
[./nodal_area]
type = NodalArea
variable = nodal_area
boundary = 3
execute_on = timestep_begin
use_displaced_mesh = true
[../]
[]

[Constraints]
[./leftrightx]
type = MechanicalContactConstraint
variable = disp_x
component = 0
boundary = 2
master = 2
slave = 3
disp_y = disp_y
disp_x = disp_x
model = frictionless
formulation = default
penalty = 1e+6
nodal_area = nodal_area
[../]
[./leftrighty]
type = MechanicalContactConstraint
variable = disp_y
component = 1
boundary = 2
master = 2
slave = 3
disp_y = disp_y
disp_x = disp_x
model = frictionless
formulation = default
penalty = 1e+6
nodal_area = nodal_area
[../]
[]

0 comments on commit 397c5c2

Please sign in to comment.