2016-06-19 20:01:37 +03:00
|
|
|
# This file is a part of JuliaFEM.
|
|
|
|
|
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
|
|
|
|
|
2016-06-27 16:11:33 +03:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
|
----------
|
|
|
|
|
distval
|
|
|
|
|
a charasteristic measure to skip element pair, 0..5 => near, 10+ => far
|
|
|
|
|
5 means that distance of slave element midpoint and point to project
|
|
|
|
|
is 5 times larger than length of element
|
|
|
|
|
"""
|
2016-06-25 04:12:53 +03:00
|
|
|
type Contact <: BoundaryProblem
|
|
|
|
|
dimension :: Int
|
2016-06-19 20:01:37 +03:00
|
|
|
rotate_normals :: Bool
|
2016-06-25 04:12:53 +03:00
|
|
|
finite_sliding :: Bool
|
|
|
|
|
friction :: Bool
|
|
|
|
|
dual_basis :: Bool
|
|
|
|
|
use_forwarddiff :: Bool
|
2016-10-03 23:12:00 +03:00
|
|
|
forwarddiff_assemble_in_pieces :: Bool
|
2016-06-25 04:12:53 +03:00
|
|
|
minimum_active_set_size :: Int
|
2016-06-27 16:11:33 +03:00
|
|
|
distval :: Float64
|
2016-09-12 03:39:33 +03:00
|
|
|
remove_from_set :: Bool # allow removal of non-potential contact pairs
|
2016-10-03 23:12:00 +03:00
|
|
|
allow_quads :: Bool
|
|
|
|
|
remove_nodes :: Vector{Int}
|
|
|
|
|
always_in_contact :: Bool
|
|
|
|
|
update_contact_pairing :: Bool
|
2017-03-02 08:43:58 +02:00
|
|
|
iteration :: Int
|
|
|
|
|
contact_state_in_first_iteration :: Symbol
|
|
|
|
|
alpha :: Float64
|
|
|
|
|
drop_tolerance :: Float64
|
2016-07-10 04:26:21 +03:00
|
|
|
store_fields :: Vector{AbstractString}
|
2016-06-19 20:01:37 +03:00
|
|
|
end
|
|
|
|
|
|
2016-06-25 04:12:53 +03:00
|
|
|
function Contact()
|
2016-06-27 16:11:33 +03:00
|
|
|
default_fields = ["element area", "contact area", "weighted gap",
|
|
|
|
|
"contact pressure", "active nodes", "inactive nodes", "stick nodes",
|
|
|
|
|
"slip nodes", "complementarity condition", "contact error"]
|
2016-10-03 23:12:00 +03:00
|
|
|
return Contact(
|
|
|
|
|
-1, # dimension
|
|
|
|
|
false, # rotate_normals
|
|
|
|
|
false, # finite_sliding
|
|
|
|
|
false, # friciton
|
|
|
|
|
true, # dual basis
|
|
|
|
|
false, # use forwarddiff
|
|
|
|
|
false, # when using forwarddiff, assemble interface in pieces
|
|
|
|
|
0, # minimum active set size
|
|
|
|
|
5.0, # distance value for contact detection
|
|
|
|
|
false, # allow removal of non-potential contact pairs
|
|
|
|
|
false, # allow quadrangles in contact discretization
|
|
|
|
|
[], # remove these nodes always from set
|
|
|
|
|
false, # mainly for debugging, do not remove inactive nodes
|
|
|
|
|
true, # update contact pairing on each loop
|
2017-03-02 08:43:58 +02:00
|
|
|
1, # iteration counter
|
|
|
|
|
:AUTO, # contact state in first iteration, AUTO, INACTIVE, ACTIVE
|
|
|
|
|
0.0, # alpha basis transform parameter
|
|
|
|
|
1.0e-9, # drop tolerance
|
2016-10-03 23:12:00 +03:00
|
|
|
default_fields)
|
2016-06-19 20:01:37 +03:00
|
|
|
end
|
|
|
|
|
|
2016-06-25 04:12:53 +03:00
|
|
|
function assemble!(problem::Problem{Contact}, time::Real)
|
|
|
|
|
if problem.properties.dimension == -1
|
|
|
|
|
problem.properties.dimension = dim = size(first(problem.elements), 1)
|
2017-03-02 08:43:58 +02:00
|
|
|
debug("assuming dimension of mesh tie surface is $dim")
|
|
|
|
|
debug("if this is wrong set is manually using problem.properties.dimension")
|
2016-06-19 20:01:37 +03:00
|
|
|
end
|
2016-06-25 04:12:53 +03:00
|
|
|
dimension = Val{problem.properties.dimension}
|
|
|
|
|
finite_sliding = Val{problem.properties.finite_sliding}
|
|
|
|
|
friction = Val{problem.properties.friction}
|
|
|
|
|
use_forwarddiff = Val{problem.properties.use_forwarddiff}
|
2016-06-27 16:11:33 +03:00
|
|
|
assemble!(problem, time, dimension, finite_sliding, friction, use_forwarddiff)
|
2017-03-02 08:43:58 +02:00
|
|
|
problem.properties.iteration += 1
|
2016-06-19 20:01:37 +03:00
|
|
|
end
|
|
|
|
|
|
2016-07-04 21:47:49 +03:00
|
|
|
typealias ContactElements2D Union{Seg2}
|