CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

To plot a grid using Gnuplot

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 3, 2004, 05:43
Default To plot a grid using Gnuplot
  #1
Jim
Guest
 
Posts: n/a
I have a 2-D 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 i-th node; j1,j2,j3 are nodes of j-th 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.
  Reply With Quote

Old   September 3, 2004, 06:44
Default Re: To plot a grid using Gnuplot
  #2
Tom
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.
  Reply With Quote

Old   September 3, 2004, 08:05
Default Re: To plot a grid using Gnuplot
  #3
Jim
Guest
 
Posts: n/a
Thanks Tom, all works perfectly.

Jim.
  Reply With Quote

Old   September 3, 2004, 10:16
Default Re: To plot a grid using Gnuplot
  #4
krishna
Guest
 
Posts: n/a
Hi Tom,

The same question, in case i have a structured grid, with x,y co-ordinates for all the node points, GNU PLOT should be able to plot the same properly rt..

Plz confirm,

Thanks,

krishna.
  Reply With Quote

Old   September 3, 2004, 10:35
Default Re: To plot a grid using Gnuplot
  #5
Tom
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
  Reply With Quote

Old   September 3, 2004, 16:32
Default Re: To plot a grid using Gnuplot
  #6
amol palekar
Guest
 
Posts: n/a
i think if you use 'set dgrid3d then you may plot even non grided data. -amol
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


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