In this way I could use the same data file to create other plots using other softwares such as Excel, etc. but in my case I chose to write a bunch of information as a table and select the data to be plotted in with the "using x:y" clause. In fact I had already found your routine googling around. My idea is adjust the xmin and xmax range to follow the converge data in a constant offset, e.g., with a constant offset of 50 iterations I'd have the xrange "rolling" to right as a constant window. My problem is that after some, let's say., 1000 iterations the x axis begins to turn completely squeezed due to the autoscale. My program writes the convergence data in "flow-plot.dat" file and the script is continuosly reread to plot the updated data. The script above is called with the command gnuplot monitor.gnu # Linear Tolerance set size 0.5, 0.5 set origin 0.5, 0.0 set title "Linear Tolerance" set xlabel "Time step (adim)" set ylabel "GMRES tolerance" unset logscale y plot 'flow-plot.dat' using 1:6 with lines # Relative solution increment set size 0.5, 0.5 set origin 0.0, 0.0 set title "Relative solution increment" set xlabel "Time step (adim)" set ylabel "log (||du||/||u||)" plot 'flow-plot.dat' using 1:5 with lines # Relative residuous set size 0.5, 0.5 set origin 0.5, 0.5 set title "Relative Flow residua" set xlabel "Time step (adim)" set ylabel "log (||r||/||r0||)" plot 'flow-plot.dat' using 1:4 with lines # Absolute residuous set size 0.5, 0.5 set origin 0.0, 0.5 set title "Absolute Flow residua" set xlabel "Time step (adim)" set ylabel "log (||r||)" plot 'flow-plot.dat' using 1:3 with lines Set size 1.0, 1.0 set origin 0.0, 0.0 set multiplot set grid unset key set logscale y It consists in calling gnuplot with the following script: The idea is quite simple and is already working. I've beem implementing a dynamic convergence monitor for my finite element solver with GNUPlot.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |