[Paraview] File Format for Particles

Michael Jackson mike.jackson at bluequartz.net
Fri Nov 28 08:28:15 EST 2008


You may want to have a look at:

http://www-vis.lbl.gov/Research/AcceleratorSAPP/

Mike

On Nov 27, 2008, at 5:31 PM, Ivo Roghair wrote:

> Hi Shi,
>
> Saving such amounts of data in ascii format is not going to be  
> efficient. We just accepted this fact, otherwise we should go to  
> binary formats.
>
> In our group we have discrete particle simulations, and we export  
> vtk files (xml format -- an unstructured grid to be precise) that  
> contains all the particle data. I have included an example of such a  
> file below. You write the point positions of the particles first,  
> followed by data concerning the movement of the particle, the  
> diameter and other stuff like rotation, temperature, etc... I don't  
> see what you mean by redundant data. When you load this file into  
> Paraview choose the glyph option, choose 'sphere', set 'radius' to 1  
> (it is initially set to 0.5), scale mode to 'scalar' and scale  
> factor to 1. You can then draw the particles. You can color them by  
> velocity, temperature, rotation or whatever you included in the  
> file, or you can choose to show arrows (another glyph) to display  
> the particle movement.
> For the flow field, which is calculated on a structured grid, you  
> can use another file format, e.g. rectilinear grid. In all cases the  
> kitware/vtk file formats documentation is going to be useful.
>
> Regards,
> Ivo Roghair
>
> PhD student at Fundamentals of Chemical Reaction Engineering
> University of Twente, The Netherlands
>
> ------------------ BEGIN EXAMPLE FILE ---------------------
> <VTKFile type="UnstructuredGrid" version="0.1"  
> byte_order="LittleEndian">
> <UnstructuredGrid>
>   <Piece NumberOfPoints="3" NumberOfCells="0">
>     <Points>
>       <DataArray name="Position" type="Float32"  
> NumberOfComponents="3" format="ascii">
>       0 0 0 1 1 1 0 0 1
>       </DataArray>
>     </Points>
>     <PointData  Vectors="vector">
>       <DataArray type="Float32" Name="Velocity"  
> NumberOfComponents="3" format="ascii">
>       4 4 4 4 0 0 2 2 -2
>       </DataArray>
>   <DataArray type="Float32" Name="Diameter" format="ascii">
>       0.1 0.5 1
>       </DataArray>
>   <DataArray type="Float32" Name="Temperature" format="ascii">
>       273 300 350
>       </DataArray>
>     </PointData>
>     <Cells>
>       <DataArray type="Int32" Name="connectivity" format="ascii">
>       </DataArray>
>       <DataArray type="Int32" Name="offsets" format="ascii">
>       </DataArray>
>       <DataArray type="UInt8" Name="types" format="ascii">
>       </DataArray>
>     </Cells>
>   </Piece>
> </UnstructuredGrid>
> </VTKFile>
> ---------- END EXAMPLE FILE --------------
>
> Shi Jin wrote:
>> Hi there,
>>
>> I am doing a simulation of fluid-particle interactions, in which I  
>> generate a lot of data for particles. I am looking for the  
>> efficient file format to store my particle information for  
>> visualization with paraview. For example, is there a file format  
>> that allows me to store all the particle information at a given  
>> time in a single ascii file, which looks like
>> #1-id 2-radius 3-rho_p 4-fixed 5-x 6-y 7-z 8-u 9-v 10-z 11-w1 12-w2  
>> 13-w3 14-alpha 15-theta 17-phi
>> 0 0.500000 1.200000 0 2.077176 2.678227 8.649375 0.000000 0.000000  
>> 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
>> 1 0.500000 0.800 0 2.728281 0.873571 6.806029 0.000000 0.000000  
>> 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
>> ...
>>
>> I guess for the purpuse of visualization, we need radius, rho_p(for  
>> color), x,y and z at least. The rotation information would be nice  
>> to have but is considered optional at this stage.
>> I am thinking to save different time results in different files to  
>> make the loading efficient in terms of memory since I have a lot of  
>> particles here. Then we can produce animation using time control. I  
>> guess we could use VTK formats but that has lots of redundant  
>> information.
>>
>> I saw some very early discussion on a similar topic in the forum  
>> but didn't get the conclusive answer. I would appreciate some  
>> advice for the current version of paraview.
>>
>> Thank you very much.
>>
>> --
>> Shi Jin, PhD
>>


More information about the ParaView mailing list