I have about 400 velocity values that are associated with time that are for a 2D point and I have several hundred 2D points. Is there a way to associate these 400 values for each point in Paraview and then have them animated with time?
Yes. Usually, time series are defined in a series of files, and each file corresponds to a single time. So, you could write out a series of 400 VTK files. Each file will have the points as well as the velocity associated with each point at that time.
Thank you for the advice. Each point has the 400 velocity points (the velocity is the third column in the data below). So I would need to take one line from each pointâs file for each point in time and make 400 new VTK files. The data below is a .dat file. Do have any suggestions as to the best way to make the 400 vtk files?
I would probably do this with a Python script (or whatever programming language you are comfortable with) and consult the VTK File Formats document to see how to write a VTK legacy file. The dataset type you will want is polydata, described on page 4.
Great, I wrote a Python script and have all the vtk files inputted and it is working well. The Stream Tracer filter is not able to be applied to this group of vtks. Is there a way to apply the stream Tracer to a vtk file? If not, what file type would you suggest I convert my data to?
My understanding was that you had a set of points (you didnât describe how they were organized, if at all) and that the velocity changes at these points. The Stream Tracer requires a volumetric dataset (or surface in a special case) and computes streamlines by integrating over a velocity field defined within that volume.
Are the points in your data set supposed to move according to the velocity at each time step? In that case, I donât know of a filter that would move them over time.
A picture of your data (hand drawn is fine), and a picture of the kind of visualization you are expecting to produce is always helpful.
Attached is a screenshot of the animation I created in paraview. My data is 1178 points, each point has 400 vtk files (each vtk file is a new time step) so the animation is playing the 400 vtks in a sequence. This dataset has x,y,z coordinates so how should I input the data so that streamlines can be defined?
I just wanted to check in and see if you have any advice after I attached my data in the previous message? I am still trying to use streamlines in my animated data.
You should now be able to add a Stream Tracer and position the seed point source relative to your data, and run it. See Exercise 2.12 in the ParaView tutorial for an example.
If your data is two dimensional, you can check the âSurface Streamlinesâ checkbox, and that will restrict the integration to only the in-plane components of the vector field.
Attached is the image from my paraview data. I can not follow exercise 2.12 because the Stream Tracer is greyed out as you can see and I do not know why.
Yes! Here is what one .vtk file looks like. Each of the 1178 points has 400 vtk files (each vtk file is a new time step) so the animation is playing the 400 vtks in a sequence
Can you share one VTK file for one timestep? Either attach it here (you might want to compress it) or send it to me directly if it is confidential (cory.quammen@kitware.com)?
There is a single scalar array named xVel. You mentioned having vector values at each of these points. I would expect to have a xVel, yVel, and maybe zVel array for the three components in a vector field. Since you have a 2D domain, you may have just two components, but thatâs fine. You can combine separave xVel, yVel, and zVel arrays into a single vector array (where each array value has 3 components corresponding to X, Y, and Z velocity components) and then use that velocity array in the Stream Tracer. With just a single xVel array, the Stream Tracer will not work.
There are 69 values defined in the xVel array, but only 63 points. The number of array values and points should match.
Thank you for this insight. I have made the change so that array value and points are both 63.
It make sense to need two components for the velocity vector. I will input yVel array into my VTK files. How is that fomatted? Will the POINT_DATA be 126 since there will be 63 xVel and 63 yVel? Do I include a second LOOKUP_TABLE that will have all the yVel listed?
SCALARS xVel float 1
LOOKUP_TABLE default
<63 data values for xVel>
SCALARS yVel float 1
LOOKUP_TABLE default
<63 data values for yVel>
With this approach, you will need to use the Calculator filter to assemble the different components into a vector value. This expression for the calculator should be
xVel * iHat + yVel * jHat
A different, probably better way: you can put the velocities together into one VECTORS array:
VECTORS vel float
xVel_0 yVel_0 0
xVel_1 yVel_1 0
<61 more entries like this>
Note the the vectors are assumed to have 3 components (they exist in 3D space), so the last column contains 0s for the z-component. The only real downside to doing it this way is the extra 2*63 bytes to hold the space and 0 characters, but you wonât need to use the Calculator filter to assemble the vector components into a vector array, so it should be simpler.
Attached is an example file with both approaches. Right1.vtk (2.2 KB)
I have decided to follow your advice and go with the better way. When I apply the stream tracer filter, no vectors/streamlines show. Attached is a picture with the stream tracer on.