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.05 v0 = 1.0 # velocity of moving wall set tmargin 0 set bmargin 0 set lmargin 10 set key top left 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,6 set cbrange [0:1.6] n = 400 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.2:1.6] set ytics set ylabel 'velocity' set size noratio set arrow from graph 0, first v0 to graph 1, first v0 lt 7 lc rgb '#dddddd' nohead set arrow from graph 0, first 0 to graph 1, first 0 lt 7 lc rgb '#dddddd' nohead plot \ NaN w l lt 1 title 'v', \ NaN w l lt 3 title 'c_s', \ 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 unset arrow set origin 0,0.34 set yrange [0:1e4] set ylabel 'density' plot \ filename u ($2==0?NaN:$6):4 w d lt 2 lc rgb '#00cc00' notitle set origin 0,0.08 set yrange [0:2] set format x '%g' set xlabel 'x' set ylabel 'internal energy' plot \ filename u ($2==0?NaN:$6):5 w d lt 4 lc rgb '#dd00dd' notitle unset multiplot }