Files
JuliaFEM.jl/src/problems_contact.jl
T

58 lines
1.9 KiB
Julia
Raw Normal View History

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
minimum_active_set_size :: Int
2016-06-27 16:11:33 +03:00
distval :: Float64
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"]
return Contact(-1, false, false, false, true, false, 0, 5.0, default_fields)
2016-06-19 20:01:37 +03:00
end
2016-06-25 04:12:53 +03:00
function get_unknown_field_name(problem::Problem{Contact})
2016-06-19 20:01:37 +03:00
return "reaction force"
end
2016-06-25 04:12:53 +03:00
function get_formulation_type(problem::Problem{Contact})
if problem.properties.use_forwarddiff
return :forwarddiff
else
return :incremental
end
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)
info("assuming dimension of mesh tie surface is $dim")
info("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)
2016-06-19 20:01:37 +03:00
end
typealias ContactElements2D Union{Seg2}