开发者

How do I format a PLOT3D file for ParaView?

I'm trying to describe the shape of a rabbit heart in order for simulations to be visualised with ParaView.

The problem I'm having is that ParaView would like the geometry to be described in PLOT3D format, a clear description of which I'm struggling to find online.

The geometry I have consists of a regular 3D mesh, from which only some points are tissue -others are in the space around or inside the chambers.

I'd be grateful if anyone with experience of this format, or who can make better sense of the online documentation could开发者_JAVA技巧 help me out.


ParaView supports a wide variety of formats.

If you can't generate any of the formats easily the python programmable source is probably the easiest way to get data into ParaView.


Do you need to use the Plot3D format or can you write your data to some other format? It is always better to use a well documented and widely used file format. As stated by @andybauer there a loads of formats that ParaView supports and, if you are in control of the output file format from your code, I would suggest writing to an alternative format. I would recommend using VTK files (see www.vtk.org/VTK/img/file-formats.pdf), which are read by both ParaView and VisIt (Paraview is built on the VTK graphics library).

If you do need to use the Plot3D format, have you downloaded the Plot3D program from https://www.nas.nasa.gov/cgi-bin/software/start? Does this contain any documentation?


New answer:

Specification of the file format can be found in the following file at page 162ff. It should be noted that the fortran binary output is distinctively different from a C binary output. This makes reading these files quite hard (as there is literally no indication of what type of file you are reading).

How hard? Well you can check the VTK/IO/Geometry/vtkMultiBlockPLOT3DReaderInternals.cxx file of the VTK sources where a quite powerful Plot3D reader is shown.

Old answer:

While this question is already a wee bit old here is some Nasa description: http://www.grc.nasa.gov/WWW/wind/valid/plot3d.html

From there it is possible to see how Plot3D files are structured.

A quick looks gives the following (using variable names from link)

  1. 1 int (=nblocks): number of blocks
  2. 3 x numBlocks ints (=ni(m),nj(m),nk(m)): number of i/j/k points for each block
  3. loop over blocks (m)
  4. ni(m) x nj(m) x nk(m) floats (=x(i,j,k,m)): x-coordinates
  5. ni(m) x nj(m) x nk(m) floats (=y(i,j,k,m)): y-coordinates
  6. ni(m) x nj(m) x nk(m) floats (=z(i,j,k,m)): z-coordinates
  7. end loop over blocks

I haven't tried this with an actual writer. If anybody does feel free to report back if it works or modify the answer if it doesn't.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜