- Notifications
You must be signed in to change notification settings - Fork7
Mortar2D.jl is a Julia package to calculate discrete projections between non-conforming finite element meshes. The resulting "mortar matrices" can be used to tie non-conforming finite elements meshes together in an optimal way.
License
JuliaFEM/Mortar2D.jl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Mortar2D.jl is a Julia package to calculate discrete projections betweennon-conforming finite element meshes. The resulting "mortar matrices" canbe used to tie non-conforming finite element meshes together which are meshedseparately to construct bigger models.
Using mortar methods in mesh tie problems results variationally consistentsolution. Mathematically, goal is to solve mixed problem with primary fieldvariable and Lagrange multipliers, which have a physical meaning (e.g. contactpressure if unknown field is displacement). The problem arising is a typicalsaddle point problem with zeros on diagonal.
Installing package goes same way like other packages in julia, i.e.
julia> Pkg.add("Mortar2D")
Testing package can be done usingPkg.test
, i.e.
julia> Pkg.test("Mortar2D")
Probably the easiest way to test the functionality of package is touseJuliaBox.
Let us calculate projection matrices D and M for the following problem:
Problem setup:
Xs=Dict(1=> [0.0,1.0],2=> [5/4,1.0],3=> [2.0,1.0])Xm=Dict(4=> [0.0,1.0],5=> [1.0,1.0],6=> [2.0,1.0])coords=merge(Xm , Xs)Es=Dict(1=> [1,2],2=> [2,3])Em=Dict(3=> [4,5],4=> [5,6])elements=merge(Es, Em)element_types=Dict(1=>:Seg2,2=>:Seg2,3=>:Seg2,4=>:Seg2)slave_element_ids= [1,2]master_element_ids= [3,4]
Calculate projection matrices D and M
s, m, D, M=calculate_mortar_assembly( elements, element_types, coords, slave_element_ids, master_element_ids)
According to theory, the interface should transfer constant without anyerror. Let's test that:
u_m=ones(3)u_s= D[s,s]\ (M[s,m]*um)# output3-element Array{Float64,1}:1.01.01.0
The rest of the story can be read from thedocumentation.There's also brief review to the theory behind non-conforming finite element meshes.
About
Mortar2D.jl is a Julia package to calculate discrete projections between non-conforming finite element meshes. The resulting "mortar matrices" can be used to tie non-conforming finite elements meshes together in an optimal way.