Files
JuliaFEM.jl/src/problems_mortar.jl
T

76 lines
2.5 KiB
Julia
Raw Normal View History

2015-11-12 07:16:25 +02:00
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
"""
Parameters
----------
dimension
dimension of surface, 1 for 2d problems (plane strain, plane stress,
axisymmetric) and 2 for 3d problems. It not given, try to determine problem
dimension from first element
rotate_normals
if all surface elements are in cw order instead of ccw, this can be used to
swap normal directions so that normals point to outward of body
adjust
for elasticity problems only; closes any gaps between surfaces if found
dual_basis
use bi-orthogonal basis when interpolating Lagrange multiplier space
use_forwarddiff
use forwarddiff to linearize contact constraints directly from weighted
gap function
distval
charasteristic measure, contact pairs with distance over this value are
skipped from contact segmentation algorithm
linear_surface_elements
convert quadratic surface elements to linear elements on the fly, notice
that middle nodes are missing Lagrange multipliers
split_quadratic_slave_elements
split quadratic surface elements to several linear sub-elements to get
Lagrange multiplier to middle nodes also
split_quadratic_master_elements
split quadratic master elements to several linear sub-elements
store_fields
not used
"""
2016-02-11 18:42:20 +02:00
type Mortar <: BoundaryProblem
dimension :: Int
2016-02-24 10:35:18 +02:00
rotate_normals :: Bool
2016-06-19 20:01:37 +03:00
adjust :: Bool
2016-06-25 04:12:53 +03:00
dual_basis :: Bool
2016-06-27 16:11:33 +03:00
use_forwarddiff :: Bool
distval :: Float64
linear_surface_elements :: Bool
split_quadratic_slave_elements :: Bool
split_quadratic_master_elements :: Bool
store_fields :: Vector{Symbol}
2015-11-18 01:19:04 +02:00
end
2016-02-11 18:42:20 +02:00
function Mortar()
2016-06-27 16:11:33 +03:00
default_fields = []
return Mortar(-1, false, false, false, false, Inf, true, true, true, default_fields)
2016-02-11 18:42:20 +02:00
end
2015-11-24 03:06:56 +02:00
2016-06-25 04:12:53 +03:00
function get_unknown_field_name(problem::Problem{Mortar})
2016-02-11 18:42:20 +02:00
return "reaction force"
end
2015-11-24 03:06:56 +02:00
2016-02-16 12:25:24 +02:00
function get_formulation_type(problem::Problem{Mortar})
2016-06-27 16:11:33 +03:00
if problem.properties.use_forwarddiff
return :forwarddiff
else
return :incremental
end
2016-02-16 12:25:24 +02:00
end
2016-06-27 16:11:33 +03:00
function assemble!(problem::Problem{Mortar}, time::Float64)
2016-06-25 04:12:53 +03:00
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")
end
2016-06-27 16:11:33 +03:00
dimension = Val{problem.properties.dimension}
use_forwarddiff = Val{problem.properties.use_forwarddiff}
assemble!(problem, time, dimension, use_forwarddiff)
end