
[Sponsors] 
September 3, 2004, 05:43 
To plot a grid using Gnuplot

#1 
Guest
Posts: n/a

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. 

September 3, 2004, 06:44 
Re: To plot a grid using Gnuplot

#2 
Guest
Posts: n/a

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. 

September 3, 2004, 08:05 
Re: To plot a grid using Gnuplot

#3 
Guest
Posts: n/a

Thanks Tom, all works perfectly.
Jim. 

September 3, 2004, 10:16 
Re: To plot a grid using Gnuplot

#4 
Guest
Posts: n/a

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. 

September 3, 2004, 10:35 
Re: To plot a grid using Gnuplot

#5 
Guest
Posts: n/a

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 

September 3, 2004, 16:32 
Re: To plot a grid using Gnuplot

#6 
Guest
Posts: n/a

i think if you use 'set dgrid3d then you may plot even non grided data. amol


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Making a grid from the XY plot  mami  FLUENT  2  October 18, 2009 23:53 
Making a grid from the XY plot  mami  FLUENT  0  October 16, 2009 05:26 
Vorticity plot in grid refinement study  CH  Main CFD Forum  3  May 22, 2007 12:35 
how to plot isotherms in gnuplot?  sivasamy  Main CFD Forum  0  December 19, 2005 02:26 
Combustion Convergence problems  Art Stretton  Phoenics  5  April 2, 2002 05:59 