diff options
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')
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 Binary files differdeleted file mode 100644 index 8409ec5..0000000 --- a/img/static/cavity2d.png +++ /dev/null diff --git a/img/static/cylinder2d_improved_grid_60s_knudsen.pdf b/img/static/cylinder2d_improved_grid_60s_knudsen.pdf Binary files differnew file mode 100644 index 0000000..ed288cd --- /dev/null +++ b/img/static/cylinder2d_improved_grid_60s_knudsen.pdf diff --git a/img/static/cylinder2d_single_refinement_60s.pdf b/img/static/cylinder2d_single_refinement_60s.pdf Binary files differnew file mode 100644 index 0000000..149e040 --- /dev/null +++ b/img/static/cylinder2d_single_refinement_60s.pdf diff --git a/img/static/cylinder2d_single_refinement_60s_knudsen.pdf b/img/static/cylinder2d_single_refinement_60s_knudsen.pdf Binary files differnew file mode 100644 index 0000000..a641d36 --- /dev/null +++ b/img/static/cylinder2d_single_refinement_60s_knudsen.pdf diff --git a/img/static/cylinder2d_unrefined_60s.pdf b/img/static/cylinder2d_unrefined_60s.pdf Binary files differnew file mode 100644 index 0000000..e81e767 --- /dev/null +++ b/img/static/cylinder2d_unrefined_60s.pdf diff --git a/img/static/cylinder2d_unrefined_60s_knudsen.pdf b/img/static/cylinder2d_unrefined_60s_knudsen.pdf Binary files differnew file mode 100644 index 0000000..72c5de8 --- /dev/null +++ b/img/static/cylinder2d_unrefined_60s_knudsen.pdf diff --git a/img/static/massloss_paraview_plot.png b/img/static/massloss_paraview_plot.png Binary files differdeleted file mode 100644 index 6a8c443..0000000 --- a/img/static/massloss_paraview_plot.png +++ /dev/null diff --git a/img/static/refined_poiseuille_1.png b/img/static/refined_poiseuille_1.png Binary files differdeleted file mode 100644 index 7d2453e..0000000 --- a/img/static/refined_poiseuille_1.png +++ /dev/null diff --git a/img/tmp/cylinder2d_improved_grid_60s_knudsen.png b/img/tmp/cylinder2d_improved_grid_60s_knudsen.png Binary files differnew file mode 100644 index 0000000..90fbae6 --- /dev/null +++ b/img/tmp/cylinder2d_improved_grid_60s_knudsen.png diff --git a/img/tmp/cylinder2d_single_refinement_60s.png b/img/tmp/cylinder2d_single_refinement_60s.png Binary files differnew file mode 100644 index 0000000..847c215 --- /dev/null +++ b/img/tmp/cylinder2d_single_refinement_60s.png diff --git a/img/tmp/cylinder2d_single_refinement_60s_knudsen.png b/img/tmp/cylinder2d_single_refinement_60s_knudsen.png Binary files differnew file mode 100644 index 0000000..6703f56 --- /dev/null +++ b/img/tmp/cylinder2d_single_refinement_60s_knudsen.png diff --git a/img/tmp/cylinder2d_unrefined_60s.png b/img/tmp/cylinder2d_unrefined_60s.png Binary files differnew file mode 100644 index 0000000..e55f82e --- /dev/null +++ b/img/tmp/cylinder2d_unrefined_60s.png diff --git a/img/tmp/cylinder2d_unrefined_60s_knudsen.png b/img/tmp/cylinder2d_unrefined_60s_knudsen.png Binary files differnew file mode 100644 index 0000000..806c2b0 --- /dev/null +++ b/img/tmp/cylinder2d_unrefined_60s_knudsen.png |