mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-26 11:51:31 +00:00
improved postprocessing capabilities; use dataframes to show results
This commit is contained in:
@@ -7,6 +7,11 @@ using JuliaFEM.Postprocess
|
||||
using JuliaFEM.Abaqus
|
||||
using JuliaFEM.Testing
|
||||
|
||||
# to turn on automatic file download, set
|
||||
# ENV["ABAQUS_DOWNLOAD_URL"] = http://<domain>:2080/v2016/books/eif
|
||||
# if don't want to download all stuff to current directory,
|
||||
# set also e.g. ENV["ABAQUS_DOWNLOAD_DIR"] = "/tmp"
|
||||
|
||||
#=
|
||||
test_name = "ecs4sfs1"
|
||||
@testset "$test_name" begin
|
||||
@@ -16,10 +21,12 @@ end
|
||||
=#
|
||||
|
||||
@testset "ec38sfs2" begin
|
||||
abaqus_run_test("ec38sfs2"; print_test_file=true) || return
|
||||
#=
|
||||
results = abaqus_read_results("ec38sfs2")
|
||||
side = get_results(results, "SECTION"; name="side")
|
||||
return_code = abaqus_run_model("ec38sfs2"; fetch=true, verbose=true)
|
||||
return_code == 0 || return
|
||||
@test return_code == 0
|
||||
#=
|
||||
xdmf = abaqus_open_results("ec38sfs2")
|
||||
side, opts = read_result(xdmf, "SECTION/side")
|
||||
@test isapprox(side["SOFM"], 3464.0)
|
||||
@test isapprox(side["SOF1"], 2000.0)
|
||||
@test isapprox(side["SOF2"], 2000.0)
|
||||
@@ -32,5 +39,5 @@ end
|
||||
@test isapprox(side["SOCF1"], 2/3)
|
||||
@test isapprox(side["SOCF2"], 2/3)
|
||||
@test isapprox(side["SOCF3"], 1/6)
|
||||
=#
|
||||
=#
|
||||
end
|
||||
|
||||
@@ -5,7 +5,6 @@ using JuliaFEM
|
||||
using JuliaFEM.Preprocess
|
||||
using JuliaFEM.Postprocess
|
||||
using JuliaFEM.Testing
|
||||
using JLD
|
||||
|
||||
function JuliaFEM.get_model(::Type{Val{Symbol("test 2d linear elasticity with surface + volume load")}})
|
||||
meshfile = "/geometry/2d_block/BLOCK_1elem.med"
|
||||
@@ -51,10 +50,15 @@ end
|
||||
E = 288.0
|
||||
nu = 1/3
|
||||
u3_expected = f/E*[-nu, 1] + g/(2*E)*[-nu, 1]
|
||||
u3 = reshape(block.assembly.u, 2, 4)[:,3]
|
||||
info("u3 = $u3")
|
||||
|
||||
results = block(DataFrame, "displacement", :U, 0.0)
|
||||
println(results)
|
||||
u3 = results[:N3, [:U1, :U2]]
|
||||
info("(u1,u2) at node 3")
|
||||
info(u3)
|
||||
@test isapprox(u3, u3_expected)
|
||||
|
||||
#=
|
||||
info("strain")
|
||||
for ip in get_integration_points(block.elements[1])
|
||||
eps = ip("strain")
|
||||
@@ -79,6 +83,8 @@ end
|
||||
# TODO: to postprocess
|
||||
#@test isapprox(stress[1], [0.0, g, 0.0])
|
||||
#@test isapprox(strain[1], [u3[1], u3[2], 0.0])
|
||||
=#
|
||||
|
||||
end
|
||||
|
||||
#= TODO: to other file
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
||||
|
||||
using JuliaFEM
|
||||
using JuliaFEM.Testing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user