Plot3d files visualization

Hi,
I am using Paraview to visualize plot3d formatted data files. I am importing the data file into ParaView using reader file with extension .p3d . So my flow variables are coming as Function0, Function1, Function2 etc like that, which originally denotes U-velocity, temperature, U-rms etc. I have 15 variables and it is difficult to identify the variables with these Function0 or Function15 names. Can you please tell me the way to change the flow variables names from Function0 to their original names? Here I am writing the Paraview reader file ( .p3d) code below.

Thanks in advance.

{

"auto-detect-format" : true,

"filenames" : [

                   { "time" : 1, "xyz" : "grid.x", "function" : "filename.f" }

              ]

}

To restore the original variable names, you can simply specify a list of their names within p3d file as below.

{
    "auto-detect-format" : true,
    "filenames" : [
	{ "time" : 0, "xyz" : "multi-bin.xyz", "q" : "multi-bin.q", "function" : "multi-bin.f" }
    ],
    "function-names" : ["temperature", "U-rms"]
}

For more information see:
https://vtk.org/doc/nightly/html/classvtkPlot3DMetaReader.html#details

1 Like

Thank a lot. I modified the plot3d reader file as you mentioned, but I am getting following error.

-----------------Error----------------
ERROR: In /home/buildslave/dashboards/buildbot/paraview-pvbinsdash-linux-shared-release_opengl2_qt4_superbuild/source-paraview/VTK/IO/Parallel/vtkPlot3DMetaReader.cxx, line 385

vtkPlot3DMetaReader (0x63cab20): Syntax error in file. Option "function-names" is not valid

------------Reader file is code as follows-------------------

{
“auto-detect-format” : true,
“filenames” : [
{ “time” : 1, “xyz” : “grid.x”, “function” : “filename.f” }
],
“function-names” : [“density”, “velocity_x”, “velocity_y”, “velocity_z”, “temperature”]
}

Thank you.

Which version of ParaView are you using? It may be necessary to upgrade to the latest version.

Another way to rename variable names is to apply the python programable filter. Here set the Script argument in the Programmable Filter to:

from vtk.numpy_interface import dataset_adapter as dsa
itr = dsa.MultiCompositeDataIterator([inputs[0], output])
for inp, opt in itr:
    opt.PointData.append(inp.PointData['Function0'], "density")
    opt.PointData.append(inp.PointData['Function1'], "velocity_x")
    opt.PointData.append(inp.PointData['Function2'], "velocity_y")
    opt.PointData.append(inp.PointData['Function3'], "velocity_z")
    opt.PointData.append(inp.PointData['Function4'], "temperature")
1 Like

Presently I am using Paraview 5.2.0 version. Now the programmable filter way is working.
Thank you so much.