# To plot a grid using Gnuplot

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

 September 3, 2004, 05:43 To plot a grid using Gnuplot #1 Jim Guest   Posts: n/a Sponsored Links 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.

 September 3, 2004, 06:44 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.

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

 September 3, 2004, 10:16 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.

 September 3, 2004, 10:35 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

 September 3, 2004, 16:32 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post mami FLUENT 2 October 18, 2009 23:53 mami FLUENT 0 October 16, 2009 05:26 CH Main CFD Forum 3 May 22, 2007 12:35 sivasamy Main CFD Forum 0 December 19, 2005 02:26 Art Stretton Phoenics 5 April 2, 2002 05:59