2D .vtk datafiles -> 3d .vtk data

Hi everybody,

i want to use paraview for postprocessing of my 2D results as well. Some vector images would be nice to have. But it’s not working with 2D .vtk files, because paraview requires a third vector component.
Since the dataformat is binary, it’s no longer possible to simply add a 3rd column to the ASCII-file.

So I thought i just add the 3rd component (and set it to zero all the time) to the 2D results.

But I don’t know how exactly. The results from the comand computeVelocity are stored as a MultiTensorField2D I think, and I just wana copy them in a MultiTensorField3D, and then simply generate the .vtk file.
I have found no command to do this, so I’ve been looking thru the palabos source code to find the things I have to change (of course I would make it with inheritance and don’t change the source code, but I still have to know what to change). But all this template stuff and billions of inheritances makes my head spin :slight_smile:

so has any1 of you guys a clue on how to fix this, or alrdy did it and can point me in the right direction.

cheers,
chris

Hello,

actually you could write 2D vtk files and open them with paraview. Then using the calculator tool of paraview you can project each component of your vectors along the different axes. For example if u=(ux,uy) you can do the following :

Result = iHatux+jHatuy+kHat*0

Then Result can be used as a 3D vector.

I hope it helps.

Orestis

1 Like

Thanks a lot Orestis, thats much more comfortable than messing around with the palabos sourcecode :slight_smile: