|
- load "problem.ppl";
- load "run/analytical.ppl"
-
- ur1(x) = ur(0,x,0)
- sigmal1(x) = sigmal(0,x,0)
- sigmar1(x) = sigmar(0,x,0)
- sigmatheta1(x) = sigmatheta(0,x,0)
-
- delta = 0.05
-
- set preamble "\usepackage{amsmath}"
-
- set width 14*unit(cm)
-
- set axis x arrow nomirrored
- set axis y arrow nomirrored
-
-
- set grid
- set terminal pdf
-
-
- set output "ur.pdf"
- set xrange [a:b]
- set yrange [*:*]
- set key top right
- set xlabel "$r$ [mm]"
- set ylabel "$u_r(r)$ [mm]"
- plot ur1(x) w l lw 3 lt 1 color olivegreen ti "Analytical solution $u_r(r)$",\
- "run/pipe-dist-1-3.dat" u 2:4 w l lw 1 lt 2 color maroon ti "",\
- "run/pipe-dist-1-3.dat" u 2:4 w p pt 18 ps 1.5 color maroon every (100)/(1*3) ti "$n=3$ first order",\
- "run/pipe-dist-1-6.dat" u 2:4 w l lw 1 lt 4 color tan ti "",\
- "run/pipe-dist-1-6.dat" u 2:4 w p pt 16 ps 1.5 color tan every (100)/(1*6) ti "$n=6$ first order",\
- "run/pipe-dist-2-2.dat" u 2:4 w l lw 2 lt 3 color cerulean ti "",\
- "run/pipe-dist-2-2.dat" u 2:4 w p pt 17 ps 1.5 color cerulean every (100)/(2*2) ti "$n=2$ second order"
-
- set output "sigmatheta.pdf"
- set xrange [a:b]
- set yrange [*:*]
- set key top right
- set xlabel "$r$ [mm]"
- set ylabel "$\sigma_\theta(r)$ [mm]"
- plot sigmatheta1(x) w l lw 3 lt 1 color springgreen ti "Analytical solution $\sigma_\theta(r)$",\
- "run/pipe-dist-1-3.dat" u 2:5 w l lw 1 lt 2 color melon ti "",\
- "run/pipe-dist-1-3.dat" u 2:5 w p pt 18 ps 1.5 color melon every (100)/(1*3) ti "$n=3$ first order",\
- "run/pipe-dist-1-6.dat" u 2:5 w l lw 1 lt 2 color redorange ti "",\
- "run/pipe-dist-1-6.dat" u 2:5 w p pt 16 ps 1.5 color redorange every (100)/(1*6) ti "$n=6$ first order",\
- "run/pipe-dist-2-2.dat" u 2:5 w l lw 2 lt 3 color turquoise ti "",\
- "run/pipe-dist-2-2.dat" u 2:5 w p pt 17 ps 1.5 color turquoise every (100)/(2*2) ti "$n=2$ second order"
-
- set output "sigmal.pdf"
- set xrange [a:b]
- set yrange [*:*]
- set key top right
- set xlabel "$r$ [mm]"
- set ylabel "$\sigma_l(r)$ [mm]"
- plot sigmal1(x) w l lw 3 lt 1 color forestgreen ti "Analytical solution $\sigma_l(r)$",\
- "run/pipe-dist-1-3.dat" u 2:6 w l lw 1 lt 2 color peach ti "",\
- "run/pipe-dist-1-3.dat" u 2:6 w p pt 18 ps 1.5 color peach every (100)/(1*3) ti "$n=3$ first order",\
- "run/pipe-dist-1-6.dat" u 2:6 w l lw 1 lt 2 color dandelion ti "",\
- "run/pipe-dist-1-6.dat" u 2:6 w p pt 16 ps 1.5 color dandelion every (100)/(1*6) ti "$n=6$ first order",\
- "run/pipe-dist-2-3.dat" u 2:6 w l lw 2 lt 3 color periwinkle ti "",\
- "run/pipe-dist-2-3.dat" u 2:6 w p pt 17 ps 1.5 color periwinkle every (100)/(2*2) ti "$n=2$ second order"
-
- set output "sigmar.pdf"
- set xrange [a:b]
- set yrange [*:*]
- set key top left
- set xlabel "$r$ [mm]"
- set ylabel "$\sigma_r(r)$ [mm]"
- plot sigmar1(x) w l lw 3 lt 1 color emerald ti "Analytical solution $\sigma_r(r)$",\
- "run/pipe-dist-1-3.dat" u 2:7 w l lw 1 lt 2 color bittersweet ti "",\
- "run/pipe-dist-1-3.dat" u 2:7 w p pt 18 ps 1.5 color bittersweet every (100)/(1*3) ti "$n=3$ first order",\
- "run/pipe-dist-1-6.dat" u 2:7 w l lw 1 lt 2 color orange ti "",\
- "run/pipe-dist-1-6.dat" u 2:7 w p pt 16 ps 1.5 color orange every (100)/(1*6) ti "$n=6$ first order",\
- "run/pipe-dist-2-3.dat" u 2:7 w l lw 2 lt 3 color royalblue ti "",\
- "run/pipe-dist-2-3.dat" u 2:7 w p pt 17 ps 1.5 color royalblue every (100)/(2*2) ti "$n=2$ second order"
-
-
-
- set output "M_tresca.pdf"
- set key top right
- set xrange [*:*]
- set yrange [(1-delta)*M_tresca:(1+delta)*M_tresca]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{M}_\\text{tresca}$ [MPa]"
- plot M_tresca w l lw 3 lt 1 color green ti "Analytical solution",\
- "run/convergence-1.dat" u 1:2 w lp lw 2 lt 3 pt 2 ps 1.5 color brickred ti "First-order grid",\
- "run/convergence-2.dat" u 1:2 w lp lw 2 lt 2 pt 3 ps 1.5 color blue ti "Second-order grid"
-
- set output "M_vonmises.pdf"
- set key top right
- set yrange [(1-delta)*M_vonmises:(1+delta)*M_vonmises]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{M}_\\text{vonmises}$ [MPa]"
- plot M_vonmises w l lw 3 lt 1 color green ti "Analytical solution",\
- "run/convergence-1.dat" u 1:3 w lp lw 2 lt 3 pt 2 ps 1.5 color brickred ti "First-order grid",\
- "run/convergence-2.dat" u 1:3 w lp lw 2 lt 2 pt 3 ps 1.5 color blue ti "Second-order grid"
-
- set output "M_1.pdf"
- set key top right
- set yrange [(1-delta)*M_1:(1+delta)*M_1]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{M}_1$ [MPa]"
- plot M_1 w l lw 3 lt 1 color green ti "Analytical solution",\
- "run/convergence-1.dat" u 1:4 w lp lw 2 lt 3 pt 2 ps 1.5 color brickred ti "First-order grid",\
- "run/convergence-2.dat" u 1:4 w lp lw 2 lt 2 pt 3 ps 1.5 color blue ti "Second-order grid"
-
- set output "M_2.pdf"
- set key top right
- set yrange [(1-delta)*M_2:(1+delta)*M_2]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{M}_2$ [MPa]"
- plot M_2 w l lw 3 lt 1 color green ti "Analytical solution",\
- "run/convergence-1.dat" u 1:5 w lp lw 2 lt 3 pt 2 ps 1.5 color brickred ti "First-order grid",\
- "run/convergence-2.dat" u 1:5 w lp lw 2 lt 2 pt 3 ps 1.5 color blue ti "Second-order grid"
-
- set output "M_3.pdf"
- set key top right
- set yrange [(1+delta)*M_3:(1-delta)*M_3]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{M}_3$ [MPa]"
- plot M_3 w l lw 3 lt 1 color green ti "Analytical solution",\
- "run/convergence-1.dat" u 1:6 w lp lw 2 lt 3 pt 2 ps 1.5 color brickred ti "First-order grid",\
- "run/convergence-2.dat" u 1:6 w lp lw 2 lt 2 pt 3 ps 1.5 color blue ti "Second-order grid"
-
-
-
-
-
-
- set output "MB_tresca.pdf"
- set key top right
- set yrange [(1-delta)*MB_tresca:(1+delta)*MB_tresca]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{MB}_\\text{tresca}$ [MPa]"
- plot MB_tresca w l lw 3 lt 1 color limegreen ti "Analytical solution",\
- "run/convergence-1.dat" u 1:7 w lp lw 2 lt 3 pt 16 ps 1.5 color salmon ti "First-order grid",\
- "run/convergence-2.dat" u 1:7 w lp lw 2 lt 2 pt 17 ps 1.5 color cadetblue ti "Second-order grid"
-
- set output "MB_vonmises.pdf"
- set key top right
- set yrange [(1-delta)*MB_vonmises:(1+delta)*MB_vonmises]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{MB}_\\text{vonmises}$ [MPa]"
- plot MB_vonmises w l lw 3 lt 1 color limegreen ti "Analytical solution",\
- "run/convergence-1.dat" u 1:8 w lp lw 2 lt 3 pt 16 ps 1.5 color salmon ti "First-order grid",\
- "run/convergence-2.dat" u 1:8 w lp lw 2 lt 2 pt 17 ps 1.5 color cadetblue ti "Second-order grid"
-
- set output "MB_1.pdf"
- set key top right
- set yrange [(1-delta)*MB_1:(1+delta)*MB_1]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{MB}_1$ [MPa]"
- plot MB_1 w l lw 3 lt 1 color limegreen ti "Analytical solution",\
- "run/convergence-1.dat" u 1:9 w lp lw 2 lt 3 pt 16 ps 1.5 color salmon ti "First-order grid",\
- "run/convergence-2.dat" u 1:9 w lp lw 2 lt 2 pt 17 ps 1.5 color cadetblue ti "Second-order grid"
-
- set output "MB_2.pdf"
- set key top right
- set yrange [(1-delta)*MB_2:(1+delta)*MB_2]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{MB}_2$ [MPa]"
- plot MB_2 w l lw 3 lt 1 color limegreen ti "Analytical solution",\
- "run/convergence-1.dat" u 1:10 w lp lw 2 lt 3 pt 16 ps 1.5 color salmon ti "First-order grid",\
- "run/convergence-2.dat" u 1:10 w lp lw 2 lt 2 pt 17 ps 1.5 color cadetblue ti "Second-order grid"
-
- set output "MB_3.pdf"
- set key top right
- set yrange [(1+delta)*MB_3:(1-delta)*MB_3]
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "$\text{MB}_3$ [MPa]"
- plot MB_3 w l lw 3 lt 1 color limegreen ti "Analytical solution",\
- "run/convergence-1.dat" u 1:11 w lp lw 2 lt 3 pt 16 ps 1.5 color salmon ti "First-order grid",\
- "run/convergence-2.dat" u 1:11 w lp lw 2 lt 2 pt 17 ps 1.5 color cadetblue ti "Second-order grid"
-
-
-
- set output "nodes-vs-n.pdf"
- set key bottom right
- set yrange [*:*]
- set logscale y
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "Number of nodes"
- plot "run/convergence-1.dat" u 1:12 w lp lw 2 lt 3 pt 16 color melon ti "First-order grid",\
- "run/convergence-2.dat" u 1:12 w lp lw 3 lt 4 pt 17 color violet ti "Second-order grid"
-
-
- set output "elements-vs-n.pdf"
- set key bottom right
- set yrange [*:*]
- set logscale y
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "Number of elements"
- plot "run/convergence-1.dat" u 1:13 w lp lw 2 lt 3 pt 16 ps 1.5 color apricot ti "First-order grid",\
- "run/convergence-2.dat" u 1:13 w lp lw 3 lt 4 pt 17 ps 1 color plum ti "Second-order grid"
-
- set output "cpu-vs-n.pdf"
- set key bottom right
- set yrange [*:*]
- set logscale y
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "CPU time [sec]"
- plot "run/convergence-1.dat" u 1:14 w lp lw 2 lt 3 pt 16 ps 1.75 color melon ti "First-order grid",\
- "run/convergence-2.dat" u 1:14 w lp lw 3 lt 4 pt 17 ps 1.25 color plum ti "Second-order grid"
-
- set output "memory-vs-n.pdf"
- set key bottom right
- set yrange [*:*]
- set logscale y
- set xlabel "Number $n$ of elements through the pipe thickness"
- set ylabel "Memory [Mb]"
- plot "run/convergence-1.dat" u 1:15 w lp lw 2 lt 3 pt 16 color bittersweet ti "First-order grid",\
- "run/convergence-2.dat" u 1:15 w lp lw 3 lt 4 pt 17 color violet ti "Second-order grid"
-
-
- set output "error-M-vs-cpu.pdf"
- set key top right
- set yrange [*:*]
- set logscale y
- set logscale x
- set xlabel "CPU time [sec]"
- set ylabel "$|\text{M}_\\text{vonmises} - \text{analytical solution}|$ [MPa]"
- plot "run/convergence-1.dat" u 14:(abs($3-M_vonmises)) w lp lw 2 lt 3 pt 16 color orangered ti "First-order grid",\
- "run/convergence-2.dat" u 14:(abs($3-M_vonmises)) w lp lw 3 lt 4 pt 17 color cadetblue ti "Second-order grid"
-
- set output "error-MB-vs-cpu.pdf"
- set key top right
- set yrange [*:*]
- set logscale y
- set logscale x
- set xlabel "CPU time [sec]"
- set ylabel "$|\text{MB}_\\text{vonmises} - \text{analytical solution}|$ [MPa]"
- plot "run/convergence-1.dat" u 14:(abs($8-MB_vonmises)) w lp lw 2 lt 3 pt 16 color salmon ti "First-order grid",\
- "run/convergence-2.dat" u 14:(abs($8-MB_vonmises)) w lp lw 3 lt 4 pt 17 color navyblue ti "Second-order grid"
-
|