set term pngcairo size 1024,1024 background rgb '#ffffee' # set output 'nozzle.png' set output '| ffmpeg -y -r 15 -f image2pipe -i - -vcodec libx264 -profile:v baseline -pix_fmt yuv420p nozzle.mp4' set colors classic set encoding utf8 set minussign gamma = 5./3. cs(eps) = sqrt(gamma*(gamma-1.)*eps) TimeBetSnapshot = 0.1 set tmargin 0 set bmargin 0 set lmargin 10 set key at graph 0.88,0.70 left center reverse Left set object rectangle from graph 0,0 to graph 1,1 fs solid noborder fc rgb 'white' set palette model HSV functions 5./6.*gray, 1, 1 set colorbox horizontal user size graph 1,0.30 origin graph 0,1.5 set cbtics offset 0,2.5 set cblabel 'velocity' offset 0,5.5 set cbrange [0:0.5] n = 1000 do for [i=0:n] { filename=sprintf('output_%03d.txt',i) print filename lbl = sprintf('t = %5.2f',i*TimeBetSnapshot) set multiplot set size 1,0.23 set origin 0,0.76 set xrange [0:30] set yrange [0:1] set format x '' set tics front unset ytics unset xlabel unset ylabel set label lbl at screen 0,1 left offset 3,-1.5 set size ratio -1 plot \ filename u ($2==0?$6:NaN):8 w d lt 7 notitle, \ filename u ($2==0?NaN:$6):8:(sqrt($9**2+$10**2+$11**2)) w d lt 1 lc palette notitle unset label set origin 0,0.60 set yrange [-0.1:1.2] set ytics set ylabel 'velocity' set size noratio plot \ 0.0 w l lt 7 lc rgb '#eeeeee' notitle, \ 0.1 w l lt 7 lc rgb '#eeeeee' notitle, \ NaN w l lt 3 title 'c_s', \ NaN w l lt 1 title 'v', \ filename u ($2==0?NaN:$6):(cs($5)) w d lt 3 notitle, \ filename u ($2==0?NaN:$6):(sqrt($9**2+$10**2+$11**2)) w d lt 1 notitle set origin 0,0.34 set yrange [0:2e4] set ylabel 'density' plot \ 8000. w l lt 7 lc rgb '#eeeeee' notitle, \ filename u ($2==0?NaN:$6):4 w d lt 2 lc rgb '#00cc00' notitle set origin 0,0.08 set yrange [0:1.5] set format x '%g' set xlabel 'x' set ylabel 'internal energy' plot \ 1.0 w l lt 7 lc rgb '#eeeeee' notitle, \ filename u ($2==0?$6:NaN):5 w d lt 7 lc rgb '#000000' notitle, \ filename u ($2==0?NaN:$6):5 w d lt 4 lc rgb '#dd00dd' notitle unset multiplot }