如何格式化 ParaView 的 PLOT3D 文件?

发布于 2024-08-19 01:08:39 字数 212 浏览 10 评论 0 原文

我正在尝试描述兔子心脏的形状,以便使用 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

淡笑忘祈一世凡恋 2024-08-26 01:08:39

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.

与往事干杯 2024-08-26 01:08:39

需要使用 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?

巡山小妖精 2024-08-26 01:08:39

新答案:

文件格式的规范可以在以下文件,第 162ff 页。应该注意的是,Fortran 二进制输出与 C 二进制输出明显不同。这使得读取这些文件变得非常困难(因为实际上没有任何迹象表明您正在读取什么类型的文件)。

有多难?那么你可以检查VTK源代码的VTK/IO/Geometry/vtkMultiBlockPLOT3DReaderInternals.cxx文件,其中显示了一个非常强大的Plot3D阅读器。

旧答案:

虽然这个问题已经有点老了,但这里有一些美国宇航局的描述:http://www.grc.nasa.gov/WWW/wind/valid/plot3d.html

从那里可以看到 Plot3D 文件的结构。

快速查看如下(使用链接中的变量名称)

  1. 1 int (=nblocks):块数
  2. 3 x numBlocks ints (=ni(m),nj(m),nk 每个块循环的 i/j/k 点的数量
  3. (m)):块上
  4. (m) ni(m) x nj(m) x nk(m) 浮点数 (=x(i, j,k,m)):x 坐标
  5. ni(m) x nj(m) x nk(m) 浮点数 (=y(i,j,k,m)) : y 坐标
  6. ni(m) x nj(m) x nk(m) 浮点 (=z(i,j,k,m)): z 坐标
  7. 块上结束循环

在我没有的 我和一个真正的作家一起尝试过这个。如果有人确实可以随意报告它是否有效,或者如果无效则修改答案。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文