aboutsummaryrefslogtreecommitdiff
path: root/img
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-01-29 15:23:53 +0100
committerAdrian Kummerlaender2019-01-29 15:23:53 +0100
commitfe86c7399d9bc20f7f95f7557d6d2b80e7b86be3 (patch)
tree773832257283dd2c170e6d9ea01dc5d0e045fc6b /img
parent75e67a53f648c0f7be39589723b5af7eecb666f1 (diff)
downloadgrid_refinement_bsc_thesis-fe86c7399d9bc20f7f95f7557d6d2b80e7b86be3.tar
grid_refinement_bsc_thesis-fe86c7399d9bc20f7f95f7557d6d2b80e7b86be3.tar.gz
grid_refinement_bsc_thesis-fe86c7399d9bc20f7f95f7557d6d2b80e7b86be3.tar.bz2
grid_refinement_bsc_thesis-fe86c7399d9bc20f7f95f7557d6d2b80e7b86be3.tar.lz
grid_refinement_bsc_thesis-fe86c7399d9bc20f7f95f7557d6d2b80e7b86be3.tar.xz
grid_refinement_bsc_thesis-fe86c7399d9bc20f7f95f7557d6d2b80e7b86be3.tar.zst
grid_refinement_bsc_thesis-fe86c7399d9bc20f7f95f7557d6d2b80e7b86be3.zip
Revamp gnuplot plotting to generate better output
Using the pdfcairo terminal for generating fluid flow plots in gnuplot using raw paraview-generated CSV exports generates high quality results. Sadly the resulting files are both unoptimized and quite big which leads to both large and unperformant documents (i.e. some PDF readers even crash) As an alternative this new gnuplot structure generates the fluid plot itself using the pngcairo terminal and includes the resulting high-resolution PNG image into a normal pdfcairo plot. This works out quite well. As a side benefit the plot scripts are now much easier to maintain.
Diffstat (limited to 'img')
-rw-r--r--img/cavity2d.tikz16
-rw-r--r--img/common/knudsen_fluid.gnuplot19
-rw-r--r--img/common/knudsen_wrapper.gnuplot (renamed from img/cylinder2d_unrefined_60s_knudsen_full.gnuplot)13
-rw-r--r--img/common/moreland.pal (renamed from img/moreland.pal)0
-rw-r--r--img/common/velocity_fluid.gnuplot19
-rw-r--r--img/common/velocity_wrapper.gnuplot16
-rw-r--r--img/cylinder2d_improved_grid_60s_knudsen.gnuplot16
-rw-r--r--img/cylinder2d_improved_grid_60s_knudsen_full.gnuplot27
-rw-r--r--img/cylinder2d_single_refinement_60s.gnuplot11
-rw-r--r--img/cylinder2d_single_refinement_60s_full.gnuplot23
-rw-r--r--img/cylinder2d_single_refinement_60s_knudsen.gnuplot12
-rw-r--r--img/cylinder2d_single_refinement_60s_knudsen_full.gnuplot23
-rw-r--r--img/cylinder2d_unrefined_60s.gnuplot7
-rw-r--r--img/cylinder2d_unrefined_60s_full.gnuplot19
-rw-r--r--img/cylinder2d_unrefined_60s_knudsen.gnuplot8
-rw-r--r--img/data/cylinder2d_unrefined_60s.csv (renamed from img/data/cylinder2d_unrefined_60s_full.csv)0
-rw-r--r--img/static/cavity2d.pngbin28162 -> 0 bytes
-rw-r--r--img/static/cylinder2d_improved_grid_60s_knudsen.pdfbin0 -> 62014 bytes
-rw-r--r--img/static/cylinder2d_single_refinement_60s.pdfbin0 -> 464850 bytes
-rw-r--r--img/static/cylinder2d_single_refinement_60s_knudsen.pdfbin0 -> 62639 bytes
-rw-r--r--img/static/cylinder2d_unrefined_60s.pdfbin0 -> 250176 bytes
-rw-r--r--img/static/cylinder2d_unrefined_60s_knudsen.pdfbin0 -> 55197 bytes
-rw-r--r--img/static/massloss_paraview_plot.pngbin19686 -> 0 bytes
-rw-r--r--img/static/refined_poiseuille_1.pngbin32989 -> 0 bytes
-rw-r--r--img/tmp/cylinder2d_improved_grid_60s_knudsen.pngbin0 -> 46240 bytes
-rw-r--r--img/tmp/cylinder2d_single_refinement_60s.pngbin0 -> 283655 bytes
-rw-r--r--img/tmp/cylinder2d_single_refinement_60s_knudsen.pngbin0 -> 45410 bytes
-rw-r--r--img/tmp/cylinder2d_unrefined_60s.pngbin0 -> 146359 bytes
-rw-r--r--img/tmp/cylinder2d_unrefined_60s_knudsen.pngbin0 -> 28707 bytes
29 files changed, 113 insertions, 116 deletions
diff --git a/img/cavity2d.tikz b/img/cavity2d.tikz
deleted file mode 100644
index cb99dba..0000000
--- a/img/cavity2d.tikz
+++ /dev/null
@@ -1,16 +0,0 @@
-\begin{tikzpicture}
-\node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=5cm]{img/cavity2d.png}};
-\foreach \x in {0,...,4}
- \foreach \y in {0,...,4}
- \draw[white] (\x,\y) rectangle (\x+1,\y+1);
-
-\draw[black,thick] (0,0) rectangle (5,5);
-
-\draw[->] (0,5.2) -- node[above,midway] {\footnotesize\(u=(1,0)\)} (5,5.2);
-\draw (0,0) -- node[below] {\footnotesize\(u=(0,0)\)} (5,0);
-\draw (0,0) -- node[rotate=90,yshift=10pt] {\footnotesize\(u=(0,0)\)} (0,5);
-\draw (5,0) -- node[rotate=90,yshift=-10pt] {\footnotesize\(u=(0,0)\)} (5,5);
-
-\draw[<->] (-0.7,0) -- node[rotate=90,yshift=10pt] {\scriptsize \(L=1\), diskretisiert in \(N\) Knoten} (-0.7,5);
-\draw[<->] (0,-0.7) -- node[below] {\scriptsize \(L=1\), diskretisiert in \(N\) Knoten} (5,-0.7);
-\end{tikzpicture}
diff --git a/img/common/knudsen_fluid.gnuplot b/img/common/knudsen_fluid.gnuplot
new file mode 100644
index 0000000..7ceb6b8
--- /dev/null
+++ b/img/common/knudsen_fluid.gnuplot
@@ -0,0 +1,19 @@
+set terminal pngcairo size 3520, 656
+
+set output 'tmp/'.plotname.'.png'
+
+set palette defined (0 "dark-green", 0.5 "dark-green", 0.5 "yellow", 1.5 "yellow", 1.5 "red", 2 "red")
+
+set datafile separator ','
+
+set size 1,1
+set margin 0,0,0,0
+
+set yrange [0:4.1]
+set xrange [0:22]
+set cbrange [0:2]
+
+unset colorbox
+unset key
+unset tics
+unset border
diff --git a/img/cylinder2d_unrefined_60s_knudsen_full.gnuplot b/img/common/knudsen_wrapper.gnuplot
index a953bd7..5562b56 100644
--- a/img/cylinder2d_unrefined_60s_knudsen_full.gnuplot
+++ b/img/common/knudsen_wrapper.gnuplot
@@ -1,19 +1,16 @@
+reset
+
set term pdfcairo enh size 21cm, 5cm
+set output 'static/'.plotname.'.pdf'
set palette defined (0 "dark-green", 0.5 "dark-green", 0.5 "yellow", 1.5 "yellow", 1.5 "red", 2 "red")
-set datafile separator ','
-
set size ratio -1
-
-set yrange [0:4.1]
-set xrange [0:22]
-set cbrange [0:2]
-
set xtics 0,2,22
set ytics 0,1,4
set cbtics ("{/Symbol \243}0" 0, "1" 1, "{/Symbol \263}2" 2)
+set cbrange [0:2]
set cblabel "Verfeinerungskriterium" offset 1,0
-plot 'data/cylinder2d_unrefined_60s_full.csv' using 6:7:(log($5/0.000866025)/log(2)) palette pt 5 ps 0.13 notitle
+plot 'tmp/'.plotname.'.png' binary filetype=png origin=(0.00625,0.00625) dx=0.00625 dy=0.00625 with rgbimage palette
diff --git a/img/moreland.pal b/img/common/moreland.pal
index 24b8cb9..24b8cb9 100644
--- a/img/moreland.pal
+++ b/img/common/moreland.pal
diff --git a/img/common/velocity_fluid.gnuplot b/img/common/velocity_fluid.gnuplot
new file mode 100644
index 0000000..bd8e194
--- /dev/null
+++ b/img/common/velocity_fluid.gnuplot
@@ -0,0 +1,19 @@
+set terminal pngcairo size 3520, 656
+
+set output 'tmp/'.plotname.'.png'
+
+load 'common/moreland.pal'
+
+set datafile separator ','
+
+set size 1,1
+set margin 0,0,0,0
+
+set yrange [0:4.1]
+set xrange [0:22]
+set cbrange [0:1.5]
+
+unset colorbox
+unset key
+unset tics
+unset border
diff --git a/img/common/velocity_wrapper.gnuplot b/img/common/velocity_wrapper.gnuplot
new file mode 100644
index 0000000..534040e
--- /dev/null
+++ b/img/common/velocity_wrapper.gnuplot
@@ -0,0 +1,16 @@
+reset
+
+set term pdfcairo enh size 21cm, 5cm
+set output 'static/'.plotname.'.pdf'
+
+load 'common/moreland.pal'
+
+set size ratio -1
+set xtics 0,2,22
+set ytics 0,1,4
+set cbtics 0,0.5,1.5
+set cbrange [0:1.5]
+
+set cblabel "Geschwindigkeitsnorm"
+
+plot 'tmp/'.plotname.'.png' binary filetype=png origin=(0.00625,0.00625) dx=0.00625 dy=0.00625 with rgbimage palette
diff --git a/img/cylinder2d_improved_grid_60s_knudsen.gnuplot b/img/cylinder2d_improved_grid_60s_knudsen.gnuplot
new file mode 100644
index 0000000..6885ca7
--- /dev/null
+++ b/img/cylinder2d_improved_grid_60s_knudsen.gnuplot
@@ -0,0 +1,16 @@
+plotname = "cylinder2d_improved_grid_60s_knudsen"
+knudsen = 0.000866025
+
+load 'common/knudsen_fluid.gnuplot'
+
+set obj 1 rect from 0.75,0.05 to 8.75,4.05
+set obj 1 fillstyle empty border -1 front lw 4
+
+set obj 2 rect from 1,1.05 to 5,3.05
+set obj 2 fillstyle empty border -1 front lw 4
+
+plot 'data/cylinder2d_improved_grid_twice_refined_60s_2.csv' using 6:7:(log($5/knudsen)/log(2)) palette pt 5 ps 1.3 notitle,\
+ 'data/cylinder2d_improved_grid_twice_refined_60s_1.csv' using 6:7:(log($5/knudsen)/log(2)) palette pt 5 ps 0.7 notitle,\
+ 'data/cylinder2d_improved_grid_twice_refined_60s_0.csv' using 6:7:(log($5/knudsen)/log(2)) palette pt 5 ps 0.3 notitle\
+
+load 'common/knudsen_wrapper.gnuplot'
diff --git a/img/cylinder2d_improved_grid_60s_knudsen_full.gnuplot b/img/cylinder2d_improved_grid_60s_knudsen_full.gnuplot
deleted file mode 100644
index c3c1a23..0000000
--- a/img/cylinder2d_improved_grid_60s_knudsen_full.gnuplot
+++ /dev/null
@@ -1,27 +0,0 @@
-set term pdfcairo enh size 21cm, 5cm
-
-set palette defined (0 "dark-green", 0.5 "dark-green", 0.5 "yellow", 1.5 "yellow", 1.5 "red", 2 "red")
-
-set datafile separator ','
-
-set size ratio -1
-
-set yrange [0:4.1]
-set xrange [0:22]
-set cbrange [0:2]
-
-set xtics 0,2,22
-set ytics 0,1,4
-set cbtics ("{/Symbol \243}0" 0, "1" 1, "{/Symbol \263}2" 2)
-
-set cblabel "Verfeinerungskriterium" offset 1,0
-
-set obj 1 rect from 0.75,0.05 to 8.75,4.05
-set obj 1 fillstyle empty border -1 front
-
-set obj 2 rect from 1,1.05 to 5,3.05
-set obj 2 fillstyle empty border -1 front
-
-plot 'data/cylinder2d_improved_grid_twice_refined_60s_2.csv' using 6:7:(log($5/0.000866025)/log(2)) palette pt 5 ps 0.13 notitle,\
- 'data/cylinder2d_improved_grid_twice_refined_60s_1.csv' using 6:7:(log($5/0.000866025)/log(2)) palette pt 5 ps 0.065 notitle,\
- 'data/cylinder2d_improved_grid_twice_refined_60s_0.csv' using 6:7:(log($5/0.000866025)/log(2)) palette pt 5 ps 0.0325 notitle
diff --git a/img/cylinder2d_single_refinement_60s.gnuplot b/img/cylinder2d_single_refinement_60s.gnuplot
new file mode 100644
index 0000000..34f9b85
--- /dev/null
+++ b/img/cylinder2d_single_refinement_60s.gnuplot
@@ -0,0 +1,11 @@
+plotname = "cylinder2d_single_refinement_60s"
+
+load 'common/velocity_fluid.gnuplot'
+
+set obj 1 rect from 0.75,0.55 to 8.75,3.55
+set obj 1 fillstyle empty border -1 front lw 4
+
+plot 'data/cylinder2d_single_level_refinement_60s_0.csv' using 6:7:(sqrt($2*$2+$3*$3)) palette pt 5 ps 1.3 notitle,\
+ 'data/cylinder2d_single_level_refinement_60s_1.csv' using 6:7:(sqrt($2*$2+$3*$3)) palette pt 5 ps 0.7 notitle
+
+load 'common/velocity_wrapper.gnuplot'
diff --git a/img/cylinder2d_single_refinement_60s_full.gnuplot b/img/cylinder2d_single_refinement_60s_full.gnuplot
deleted file mode 100644
index 546d353..0000000
--- a/img/cylinder2d_single_refinement_60s_full.gnuplot
+++ /dev/null
@@ -1,23 +0,0 @@
-set term pdfcairo enh size 21cm, 5cm
-
-load 'moreland.pal'
-
-set datafile separator ','
-
-set size ratio -1
-
-set yrange [0:4.1]
-set xrange [0:22]
-set cbrange [0:1.5]
-
-set xtics 0,2,22
-set ytics 0,1,4
-set cbtics 0,0.5,1.5
-
-set cblabel "Geschwindigkeitsnorm"
-
-set obj 1 rect from 0.75,0.55 to 8.75,3.55
-set obj 1 fillstyle empty border -1 front
-
-plot 'data/poiseuille2d_single_level_refinement_60s_0.csv' using 6:7:(sqrt($2*$2+$3*$3)) palette pt 5 ps 0.13 notitle,\
- 'data/poiseuille2d_single_level_refinement_60s_1.csv' using 6:7:(sqrt($2*$2+$3*$3)) palette pt 5 ps 0.065 notitle
diff --git a/img/cylinder2d_single_refinement_60s_knudsen.gnuplot b/img/cylinder2d_single_refinement_60s_knudsen.gnuplot
new file mode 100644
index 0000000..809abc1
--- /dev/null
+++ b/img/cylinder2d_single_refinement_60s_knudsen.gnuplot
@@ -0,0 +1,12 @@
+plotname = "cylinder2d_single_refinement_60s_knudsen"
+knudsen = 0.000866025
+
+load 'common/knudsen_fluid.gnuplot'
+
+set obj 1 rect from 0.75,0.55 to 8.75,3.55
+set obj 1 fillstyle empty border -1 front lw 4
+
+plot 'data/cylinder2d_single_level_refinement_60s_0.csv' using 6:7:(log($5/knudsen)/log(2)) palette pt 5 ps 1.3 notitle,\
+ 'data/cylinder2d_single_level_refinement_60s_1.csv' using 6:7:(log($5/knudsen)/log(2)) palette pt 5 ps 0.7 notitle
+
+load 'common/knudsen_wrapper.gnuplot'
diff --git a/img/cylinder2d_single_refinement_60s_knudsen_full.gnuplot b/img/cylinder2d_single_refinement_60s_knudsen_full.gnuplot
deleted file mode 100644
index c9eb537..0000000
--- a/img/cylinder2d_single_refinement_60s_knudsen_full.gnuplot
+++ /dev/null
@@ -1,23 +0,0 @@
-set term pdfcairo enh size 21cm, 5cm
-
-set palette defined (0 "dark-green", 0.5 "dark-green", 0.5 "yellow", 1.5 "yellow", 1.5 "red", 2 "red")
-
-set datafile separator ','
-
-set size ratio -1
-
-set yrange [0:4.1]
-set xrange [0:22]
-set cbrange [0:2]
-
-set xtics 0,2,22
-set ytics 0,1,4
-set cbtics ("{/Symbol \243}0" 0, "1" 1, "{/Symbol \263}2" 2)
-
-set cblabel "Verfeinerungskriterium" offset 1,0
-
-set obj 1 rect from 0.75,0.55 to 8.75,3.55
-set obj 1 fillstyle empty border -1 front
-
-plot 'data/cylinder2d_single_level_refinement_60s_0.csv' using 6:7:(log($5/0.000866025)/log(2)) palette pt 5 ps 0.13 notitle,\
- 'data/cylinder2d_single_level_refinement_60s_1.csv' using 6:7:(log($5/0.000866025)/log(2)) palette pt 5 ps 0.065 notitle
diff --git a/img/cylinder2d_unrefined_60s.gnuplot b/img/cylinder2d_unrefined_60s.gnuplot
new file mode 100644
index 0000000..3c6194a
--- /dev/null
+++ b/img/cylinder2d_unrefined_60s.gnuplot
@@ -0,0 +1,7 @@
+plotname = "cylinder2d_unrefined_60s"
+
+load 'common/velocity_fluid.gnuplot'
+
+plot 'data/cylinder2d_unrefined_60s.csv' using 6:7:(sqrt($2*$2+$3*$3)) palette pt 5 ps 1.3 notitle
+
+load 'common/velocity_wrapper.gnuplot'
diff --git a/img/cylinder2d_unrefined_60s_full.gnuplot b/img/cylinder2d_unrefined_60s_full.gnuplot
deleted file mode 100644
index 57bfca3..0000000
--- a/img/cylinder2d_unrefined_60s_full.gnuplot
+++ /dev/null
@@ -1,19 +0,0 @@
-set term pdfcairo enh size 21cm, 5cm
-
-load 'moreland.pal'
-
-set datafile separator ','
-
-set size ratio -1
-
-set yrange [0:4.1]
-set xrange [0:22]
-set cbrange [0:1.5]
-
-set xtics 0,2,22
-set ytics 0,1,4
-set cbtics 0,0.5,1.5
-
-set cblabel "Geschwindigkeitsnorm"
-
-plot 'data/poiseuille2d_unrefined_60s_full.csv' using 6:7:(sqrt($2*$2+$3*$3)) palette pt 5 ps 0.13 notitle
diff --git a/img/cylinder2d_unrefined_60s_knudsen.gnuplot b/img/cylinder2d_unrefined_60s_knudsen.gnuplot
new file mode 100644
index 0000000..6143107
--- /dev/null
+++ b/img/cylinder2d_unrefined_60s_knudsen.gnuplot
@@ -0,0 +1,8 @@
+plotname = "cylinder2d_unrefined_60s_knudsen"
+knudsen = 0.000866025
+
+load 'common/knudsen_fluid.gnuplot'
+
+plot 'data/cylinder2d_unrefined_60s.csv' using 6:7:(log($5/knudsen)/log(2)) palette pt 5 ps 1.3 notitle
+
+load 'common/knudsen_wrapper.gnuplot'
diff --git a/img/data/cylinder2d_unrefined_60s_full.csv b/img/data/cylinder2d_unrefined_60s.csv
index 4b27f13..4b27f13 100644
--- a/img/data/cylinder2d_unrefined_60s_full.csv
+++ b/img/data/cylinder2d_unrefined_60s.csv
diff --git a/img/static/cavity2d.png b/img/static/cavity2d.png
deleted file mode 100644
index 8409ec5..0000000
--- a/img/static/cavity2d.png
+++ /dev/null
Binary files differ
diff --git a/img/static/cylinder2d_improved_grid_60s_knudsen.pdf b/img/static/cylinder2d_improved_grid_60s_knudsen.pdf
new file mode 100644
index 0000000..ed288cd
--- /dev/null
+++ b/img/static/cylinder2d_improved_grid_60s_knudsen.pdf
Binary files differ
diff --git a/img/static/cylinder2d_single_refinement_60s.pdf b/img/static/cylinder2d_single_refinement_60s.pdf
new file mode 100644
index 0000000..149e040
--- /dev/null
+++ b/img/static/cylinder2d_single_refinement_60s.pdf
Binary files differ
diff --git a/img/static/cylinder2d_single_refinement_60s_knudsen.pdf b/img/static/cylinder2d_single_refinement_60s_knudsen.pdf
new file mode 100644
index 0000000..a641d36
--- /dev/null
+++ b/img/static/cylinder2d_single_refinement_60s_knudsen.pdf
Binary files differ
diff --git a/img/static/cylinder2d_unrefined_60s.pdf b/img/static/cylinder2d_unrefined_60s.pdf
new file mode 100644
index 0000000..e81e767
--- /dev/null
+++ b/img/static/cylinder2d_unrefined_60s.pdf
Binary files differ
diff --git a/img/static/cylinder2d_unrefined_60s_knudsen.pdf b/img/static/cylinder2d_unrefined_60s_knudsen.pdf
new file mode 100644
index 0000000..72c5de8
--- /dev/null
+++ b/img/static/cylinder2d_unrefined_60s_knudsen.pdf
Binary files differ
diff --git a/img/static/massloss_paraview_plot.png b/img/static/massloss_paraview_plot.png
deleted file mode 100644
index 6a8c443..0000000
--- a/img/static/massloss_paraview_plot.png
+++ /dev/null
Binary files differ
diff --git a/img/static/refined_poiseuille_1.png b/img/static/refined_poiseuille_1.png
deleted file mode 100644
index 7d2453e..0000000
--- a/img/static/refined_poiseuille_1.png
+++ /dev/null
Binary files differ
diff --git a/img/tmp/cylinder2d_improved_grid_60s_knudsen.png b/img/tmp/cylinder2d_improved_grid_60s_knudsen.png
new file mode 100644
index 0000000..90fbae6
--- /dev/null
+++ b/img/tmp/cylinder2d_improved_grid_60s_knudsen.png
Binary files differ
diff --git a/img/tmp/cylinder2d_single_refinement_60s.png b/img/tmp/cylinder2d_single_refinement_60s.png
new file mode 100644
index 0000000..847c215
--- /dev/null
+++ b/img/tmp/cylinder2d_single_refinement_60s.png
Binary files differ
diff --git a/img/tmp/cylinder2d_single_refinement_60s_knudsen.png b/img/tmp/cylinder2d_single_refinement_60s_knudsen.png
new file mode 100644
index 0000000..6703f56
--- /dev/null
+++ b/img/tmp/cylinder2d_single_refinement_60s_knudsen.png
Binary files differ
diff --git a/img/tmp/cylinder2d_unrefined_60s.png b/img/tmp/cylinder2d_unrefined_60s.png
new file mode 100644
index 0000000..e55f82e
--- /dev/null
+++ b/img/tmp/cylinder2d_unrefined_60s.png
Binary files differ
diff --git a/img/tmp/cylinder2d_unrefined_60s_knudsen.png b/img/tmp/cylinder2d_unrefined_60s_knudsen.png
new file mode 100644
index 0000000..806c2b0
--- /dev/null
+++ b/img/tmp/cylinder2d_unrefined_60s_knudsen.png
Binary files differ