To plot a grid using Gnuplot
I have a 2D unstructured grid for CFD calculations formed by triangles. I.e. there are two arrays: {i, x(i), y(i)} and {j, j1,j2,j3} where x(i),y(i) are coordinates of ith node; j1,j2,j3 are nodes of jth triangle. Is it possible to apply well known package Gnuplot (ver 4.0) to draw such grid and how to do this?
Thanks in advance. 
Re: To plot a grid using Gnuplot
If you output your grid as
# First cell x1 y1 x2 y2 x3 y3 x1 y1 # Second cell ... where (x1,y1), (x2,y2) and (x3,y3) are the (consecuitive vertices of the triangle then gnuplot should be able to plot the grid with the usual plot command. 
Re: To plot a grid using Gnuplot
Thanks Tom, all works perfectly.
Jim. 
Re: To plot a grid using Gnuplot
Hi Tom,
The same question, in case i have a structured grid, with x,y coordinates for all the node points, GNU PLOT should be able to plot the same properly rt.. Plz confirm, Thanks, krishna. 
Re: To plot a grid using Gnuplot
You can do as I described above but using 4 points (which for a structured grid is a bit wasteful) or for each grid line in one direction ouput the (x,y) node values (remembering to inset a blank/comment line between each block) and then repeat in the other direction; i.e. if your node points are at x(M,N), y(M,N) then the file should look something like
# x direction x(1,1) y(1,1) x(2,1) y(2,1) ..... x(M,1) y(M,1) # 2nd grid line x(1,2) y(1,2) .... .... x(M,N) y(M,N) # Now y direction x(1,1) y(1,1) x(1,2) y(1,2) .... x(1,N) y(1,N) etc 
Re: To plot a grid using Gnuplot
i think if you use 'set dgrid3d then you may plot even non grided data. amol

All times are GMT 4. The time now is 13:43. 