我正在尝试描述兔子心脏的形状,以便使用 ParaView 使模拟可视化。
我遇到的问题是 ParaView 希望以 PLOT3D 格式描述几何图形,我正在努力在网上找到一个清晰的描述。
我的几何体由规则的 3D 网格组成,其中只有一些点是组织,其他点位于腔室周围或内部的空间中。
如果任何有这种格式经验的人或者能够更好地理解在线文档的人可以帮助我,我将不胜感激。
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 help me out.
发布评论
评论(3)
ParaView 支持多种格式。
如果您无法轻松生成任何格式,Python 可编程源可能是将数据导入 ParaView 的最简单方法。
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.
您需要使用 Plot3D 格式还是可以将数据写入其他格式?使用有据可查且广泛使用的文件格式总是更好。正如 @andybauer 所说,ParaView 支持多种格式,如果您可以控制代码的输出文件格式,我建议您写入替代格式。我建议使用 VTK 文件(参见 www.vtk.org/VTK/img/file-formats.pdf),ParaView 和 VisIt(Paraview 构建于 VTK 图形库之上)。
如果您确实需要使用 Plot3D 格式,请从 https: //www.nas.nasa.gov/cgi-bin/software/start?这包含任何文档吗?
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?
新答案:
文件格式的规范可以在以下文件,第 162ff 页。应该注意的是,Fortran 二进制输出与 C 二进制输出明显不同。这使得读取这些文件变得非常困难(因为实际上没有任何迹象表明您正在读取什么类型的文件)。
有多难?那么你可以检查VTK源代码的
VTK/IO/Geometry/vtkMultiBlockPLOT3DReaderInternals.cxx
文件,其中显示了一个非常强大的Plot3D阅读器。旧答案:
虽然这个问题已经有点老了,但这里有一些美国宇航局的描述:http://www.grc.nasa.gov/WWW/wind/valid/plot3d.html
从那里可以看到 Plot3D 文件的结构。
快速查看如下(使用链接中的变量名称)
nblocks
):块数ni(m),nj(m),nk 每个块循环的 i/j/k 点的数量
x(i, j,k,m)
):x 坐标y(i,j,k,m)
) : y 坐标z(i,j,k,m)
): z 坐标在我没有的 我和一个真正的作家一起尝试过这个。如果有人确实可以随意报告它是否有效,或者如果无效则修改答案。
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)
nblocks
): number of blocksni(m),nj(m),nk(m)
): number of i/j/k points for each blockx(i,j,k,m)
): x-coordinatesy(i,j,k,m)
): y-coordinatesz(i,j,k,m)
): z-coordinatesI 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.