mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-27 20:26:58 +00:00
linear buckling analysis matrices
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user