mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-10-03 22:57:57 +00:00
fixed problems with surface loads. det(element, ip, time) should be avoided.
This commit is contained in:
@@ -92,7 +92,7 @@ function test_continuum_elasticity_with_surface_load()
|
||||
set_geometry!(element1, nodes)
|
||||
# element1["youngs modulus"] = 900.0
|
||||
# element1["poissons ratio"] = 0.25
|
||||
element1["youngs modulus"] = 9000.0
|
||||
element1["youngs modulus"] = 900.0
|
||||
element1["poissons ratio"] = 0.25
|
||||
element1["displacement"] = (0.0 => Vector{Float64}[[0.0, 0.0, 0.0] for i=1:8])
|
||||
|
||||
@@ -105,7 +105,6 @@ function test_continuum_elasticity_with_surface_load()
|
||||
push!(problem, element1)
|
||||
push!(problem, element2)
|
||||
|
||||
#=
|
||||
free_dofs = zeros(Bool, 8, 3)
|
||||
x = 1
|
||||
y = 2
|
||||
@@ -126,8 +125,8 @@ function test_continuum_elasticity_with_surface_load()
|
||||
info("initial stiffness matrix")
|
||||
dump(round(Int, full(ass.stiffness_matrix))[free_dofs, free_dofs])
|
||||
solve!(problem, free_dofs, 0.0; max_iterations=10)
|
||||
=#
|
||||
|
||||
#=
|
||||
dx = Quad4([1, 4, 8, 5])
|
||||
dx["displacement 1"] = 0.0
|
||||
dy = Quad4([1, 5, 6, 2])
|
||||
@@ -145,17 +144,18 @@ function test_continuum_elasticity_with_surface_load()
|
||||
solver.dump_matrices = true
|
||||
solver.name = "3d_hex8"
|
||||
solver(0.0)
|
||||
=#
|
||||
|
||||
disp = element1("displacement", [1.0, 1.0, 1.0], 0.0)
|
||||
info("displacement at tip: $disp")
|
||||
info("displacement on element: ")
|
||||
for (i, d) in enumerate(element1("displacement", 0.0))
|
||||
@printf "%d %f %f %f\n" [i;d]...
|
||||
@printf "%d % f % f % f\n" [i;d]...
|
||||
end
|
||||
# verified using Code Aster.
|
||||
# 2015-12-12-continuum-elasticity/vim c3d_grot_gdep_traction_force.comm
|
||||
# @test isapprox(disp, [3.17431158889468E-02, 3.17431158889468E-02, -1.38591518927826E-01])
|
||||
@test isapprox(disp, [2.80559539222183E-03, 2.80559539222183E-03, -1.13019918093242E-02])
|
||||
@test isapprox(disp, [3.17431158889468E-02, 3.17431158889468E-02, -1.38591518927826E-01])
|
||||
#@test isapprox(disp, [2.80559539222183E-03, 2.80559539222183E-03, -1.13019918093242E-02])
|
||||
end
|
||||
#test_continuum_elasticity_with_surface_load()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user