[Gmsh] PLOT3D format

Christophe Geuzaine c.geuzaine at ulg.ac.be
Tue Feb 15 00:19:11 CET 2005


Matt Gundry wrote:
> Hello,
> 
> I would like to add PLOT3D file format (ASCII) output capabilities to Gmsh.
> For those who don't know, the PLOT3D format is almost universally used with
> all the freely available CFD goodies from NASA. The format stores structured
> meshes and is fairly simple. The following site describes the format:
> 
> http://www.grc.nasa.gov/WWW/wind/valid/plot3d.html
> 
> Basically, I first need to output the grid i j k dimensions. Then I list the
> X coords for each node in order (for k (for j (for i))), Y coords, then Z
> coords.
> 
> I've briefly examined the source for the output translators that come with
> Gmsh, and I guess my biggest question is what is the best way to get the
> grid dimensions and node coordinates in order. Put another way, I can see
> how to get the coordinates for each node of each face, but I was hoping for
> some assurance that the order of faces in a structured grid is consistent.
> 
> Knowing that, I think this will be pretty simple.
> 

Hi Matt - With the transfinite, elliptic or extrusion algorithms, the 
elements are indeed generated in the "expected" order. But keep in mind 
that the elements are stored in a tree structure according to their 
quality, not their number.

So if you want a structured output, we will have to reorder the tree 
according to the element numbers, or use some other (geometry-related) 
sorting criterion.

Best,

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org