linear buckling analysis matrices

This commit is contained in:
Jukka Aho
2016-05-30 01:03:34 +03:00
parent 11d8ebd970
commit eb4348bf59
4 changed files with 202 additions and 98 deletions
+6 -6
View File
@@ -9,13 +9,13 @@ import JuliaFEM: get_basis, get_dbasis, get_integration_points
type MyQuad4 <: AbstractElement
end
function get_basis(element::Element{MyQuad4}, xi, time)
1/4*[(1-xi[1])*(1-xi[2]) (1+xi[1])*(1-xi[2]) (1+xi[1])*(1+xi[2]) (1-xi[1])*(1+xi[2])]
function get_basis(element::Element{MyQuad4}, ip, time)
1/4*[(1-ip[1])*(1-ip[2]) (1+ip[1])*(1-ip[2]) (1+ip[1])*(1+ip[2]) (1-ip[1])*(1+ip[2])]
end
function get_dbasis(element::Element{MyQuad4}, xi, time)
1/4*[-(1-xi[2]) (1-xi[2]) (1+xi[2]) -(1+xi[2])
-(1-xi[1]) -(1+xi[1]) (1+xi[1]) (1-xi[1])]
function get_dbasis(element::Element{MyQuad4}, ip, time)
1/4*[-(1-ip[2]) (1-ip[2]) (1+ip[2]) -(1+ip[2])
-(1-ip[1]) -(1+ip[1]) (1+ip[1]) (1-ip[1])]
end
function get_integration_points(element::MyQuad4)
@@ -39,7 +39,7 @@ end
el = Element(MyQuad4)
el["geometry"] = Vector{Float64}[[0.0,0.0], [1.0,0.0], [1.0,1.0], [0.0,1.0]]
el["displacement"] = Vector{Float64}[[0.0,0.0], [0.0,0.0], [1.0,0.0], [0.0,0.0]]
@test isapprox(el("geometry", [0.0, 0.0]), [0.5, 0.5])
@test isapprox(el("geometry", [0.0, 0.0], 0.0), [0.5, 0.5])
@test isapprox(el("displacement", [0.0, 0.0], 0.0), [0.25, 0.0])
el["temperature thermal conductivity"] = 6.0
dim = length(el)