-
Notifications
You must be signed in to change notification settings - Fork 1
/
hyperelasticity_postproc.jl
66 lines (47 loc) · 1.06 KB
/
hyperelasticity_postproc.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# hyperelasticity_postproc.jl
#
x = [dx * i for i in 0:nx-1]
den, ent, vel, strs, eint, info = postproc_arrays(Q0)
# ---
# Density
plot(x, den, label = L"\rho")
xlabel!(L"$x$")
ylabel!(L"$\rho$")
title!("Density")
fname = "density.png"
savefig(joinpath(dname, fname))
# ---
# Velocity
for i in 1:3
lbl = @sprintf("\$v_%i\$", i)
plot(x, vel[i, :], label = lbl)
xlabel!(L"$x$")
ylabel!(lbl)
title!("Velocity")
global fname = @sprintf("velocity_%i.png", i)
savefig(joinpath(dname, fname))
end
#---
# Stress
for i in 1:3
for j in i:3
lbl = @sprintf("\$\\sigma_{%i%i}\$", i,j)
plot(x, strs[i, j, :], label = lbl)
xlabel!(L"$x$")
ylabel!(lbl)
title!("Stress")
global fname = @sprintf("stress_%i%i.png", i,j)
savefig( joinpath(dname, fname) )
end
end
# ---
# Deformation gradient
# ---
plot(x, ent, label = L"$\eta$")
xlabel!(L"$x$")
ylabel!(L"$\eta$")
title!("Entropy")
fname = @sprintf("entropy.png")
savefig( joinpath(dname, fname) )
# EOF