# Stream Tracer movie

**URL:** https://discourse.paraview.org/t/stream-tracer-movie/2115
**Category:** ParaView Support
**Created:** [June 26, 2019, 9:09am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115 "2019-06-26T09:09:20Z")
**Posts on this page:** 18
**Page:** 2

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 2, 2025, 2:31pm UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/21 "2025-04-02T14:31:56Z")

</div>

Are you sure your velocity field is correct ?

It doesnt look right here:

 ![image](https://discourse.paraview.org/uploads/default/original/3X/d/5/d540136791a8ee8a07971b1ca9e2e3fcac54fa0e.jpeg)

---

<div class="post-metadata">

### Author: ![CathyX](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/977dab/32.png) [@CathyX](https://discourse.paraview.org/u/CathyX)
#### Post date: [April 2, 2025, 9:21pm UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/22 "2025-04-02T21:21:08Z")

</div>

Thank you Mathieu for getting back.

Here is how I generate those velocity timestamp files.  
The dataset I received is in a special customized format, I used the specialized reader to get all the floats.  
vx, vy, vz are the velocity[x,y,z] data file paths, all with the same grid[x,y,z].  
e.g. grids info, gx, gy, gz size could be 8, 4, 4; then dataX,Y,Z size could be same that is 8x4x4=64; dims = [4, 4, 8]

x,y,z coordinates I played around for awhile, could you please take a glance, if anything looks suspicious to you? or the writer has some issue?

```
        dataX, gx, gy, gz = JRReader(vx)
        dataY, gx, gy, gz = JRReader(vy)
        dataZ, gx, gy, gz = JRReader(vz)
        velocity = np.column_stack((dataZ, dataY, dataX))
        writeVelociyVTK(dims, velocity, gz, gy, gx) # dims = [4, 4, 8]

```

Here is the writer function,

```auto
def writeVelociyVTK(fileName, dims, velocity, gx, gy, gz):
    grid = vtk.vtkStructuredGrid()
    grid.SetDimensions(dims)

    # Create a vtkPoints object to hold the points (the regular grid of points)
    points = vtk.vtkPoints()

    # Fill points with coordinates (this assumes a regular grid)
    for z in range(dims[2]):
        for y in range(dims[1]):
            for x in range(dims[0]):
                points.InsertNextPoint(gx[x], gy[y], gz[z])

    # Set the points to the grid
    grid.SetPoints(points)

    # Create a vtkFloatArray for the velocity vectors
    velocity_array = vtk.vtkFloatArray()
    velocity_array.SetNumberOfComponents(3) # 3 components for velocity (vx, vy, vz)
    velocity_array.SetName("Velocity")

    # Fill the velocity array with data
    for i in range(velocity.shape[0]):
        velocity_array.InsertNextTuple3(velocity[i, 0], velocity[i, 1], velocity[i, 2])

    # Add the velocity array to the grid
    grid.GetPointData().AddArray(velocity_array)

    # Write the grid to a VTK file
    writer = vtk.vtkStructuredGridWriter()
    writer.SetFileName(fileName)
    writer.SetInputData(grid)
    writer.Write()

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 3, 2025, 8:52am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/23 "2025-04-03T08:52:42Z")

</div>

I did not analyse in details but with the image I see, I think you must be exchanging two axis in your generation of structured data.

---

<div class="post-metadata">

### Author: ![CathyX](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/977dab/32.png) [@CathyX](https://discourse.paraview.org/u/CathyX)
#### Post date: [April 3, 2025, 9:05pm UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/24 "2025-04-03T21:05:43Z")

</div>

ok, that’s what I suspected too, let me try to figure the axis issue.

meanwhile, as a reference, could you help post your previous dataset again?  
the “canExEx.e” dataset? Tons of thanks!  
[https://drive.google.com/file/d/14p8noWVdlS2ixSRwc0rcOUJ-2F9xijBn/view?usp=sharing](https://drive.google.com/file/d/14p8noWVdlS2ixSRwc0rcOUJ-2F9xijBn/view?usp=sharing)

then I can see the video that I am targeting for at least.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 4, 2025, 6:46am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/25 "2025-04-04T06:46:22Z")

</div>

Im afraid this dataset is lost, but you can use the particle tracer on any temporal volumic file like here: [particle tracer - disappearing after time step 1 - #3 by Nikolas\_Kare](https://discourse.paraview.org/t/particle-tracer-disappearing-after-time-step-1/16412/3)

---

<div class="post-metadata">

### Author: ![CathyX](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/977dab/32.png) [@CathyX](https://discourse.paraview.org/u/CathyX)
#### Post date: [April 6, 2025, 1:40am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/26 "2025-04-06T01:40:29Z")

</div>

Thank you, yea that Youtube tutorial I watched many times and I also downloaded the tutorial sample dataset, however, whenever I specify the input to the seed for particle tracer or stream tracer, paraview crashes. I installed latest PV5.13.3 on Mac Intel.

Anyways, thank you for pointing out, my generated vtk datasets axises did have issues, as they are written in Fortran, which is really confusing. But now I am able to view streamline of the velocity now. [Here](https://drive.google.com/drive/folders/1anaPb-0dDoju_Jj5Fw4IdPUtAoWC2tyT?usp=share_link) is the newly generated datasets

 ![Screenshot 2025-04-05 at 3.54.08 PM](https://discourse.paraview.org/uploads/default/original/3X/5/d/5d83622b79dee5b725b6a1d3726291bc40995c35.jpeg)

But as I mentioned earlier do you know why whenever I want to see particle tracer, ParaView crashes 100%? Does it work for you?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 7, 2025, 7:49am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/27 "2025-04-07T07:49:37Z")

</div>

There was a bug in ParaView 5.13 that have been fixed already. You may want to use the nightly:  
[https://www.paraview.org/download/?version=nightly](https://www.paraview.org/download/?version=nightly)

---

<div class="post-metadata">

### Author: ![CathyX](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/977dab/32.png) [@CathyX](https://discourse.paraview.org/u/CathyX)
#### Post date: [April 11, 2025, 6:12pm UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/28 "2025-04-11T18:12:20Z")

</div>

Sweet, the newer version looks great in default lighting and color!  
And I am able to see other people’s particle trace now.

However for [my dataset](https://drive.google.com/drive/folders/1anaPb-0dDoju_Jj5Fw4IdPUtAoWC2tyT?usp=share_link), it’s point vector temporal data, but I still cannot see any particles.  
Here is my state file, does it look right to you?  
[particleTracer.pvsm](https://discourse.paraview.org/uploads/short-url/liBpESPBnFfpnfD2Uf1cADOhj1j.pvsm) (714.0 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [April 14, 2025, 11:47am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/29 "2025-04-14T11:47:45Z")

</div>

You need to divide your velocity by a factor to avoid particles going out of domain on the first timestep.

Here is an example state file:  
[particle.pvsm](https://discourse.paraview.org/uploads/short-url/o2HzAw8Y1bP3NfRMRcXhzSSIMZ4.pvsm) (883.7 KB)

---

<div class="post-metadata">

### Author: ![CathyX](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/977dab/32.png) [@CathyX](https://discourse.paraview.org/u/CathyX)
#### Post date: [April 14, 2025, 3:41pm UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/30 "2025-04-14T15:41:08Z")

</div>

> [@mwestphal](#):
>
> You need to divide your velocity by a factor to avoid particles going out of domain on the first timestep.

Great, good to know! Finally I am able to see particles!!!  
Now I understand as the point source is within a domain. Such the factor is required, in calculation - Velocity/100000.

Thanks a lot for helping out! And no give up!  
Best,  
Can

---

<div class="post-metadata">

### Author: ![hugh-tong](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hugh-tong/32/17347_2.png) [@hugh-tong](https://discourse.paraview.org/u/hugh-tong)
#### Post date: [December 15, 2025, 3:26am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/31 "2025-12-15T03:26:37Z")

</div>

It is strange that 6.0.0 seems to have the same problem, I can get result using pv-5.7.0 but could not in 6.0.0. Using the data of `fluid_flow_convection.zip` of Youtuber [tuxriders]([https://www.youtube.com/watch?v=Zmf8OE2N518](https://www.youtube.com/watch?v=Zmf8OE2N518)).

> **[tuxriders\_postprocessing - Google Drive](https://drive.google.com/drive/folders/1emHuLLkXBkJoCii_4obBy9PNRlK7n1Vq)**

---

<div class="post-metadata">

### Author: ![hugh-tong](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hugh-tong/32/17347_2.png) [@hugh-tong](https://discourse.paraview.org/u/hugh-tong)
#### Post date: [December 15, 2025, 3:29am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/32 "2025-12-15T03:29:04Z")

</div>

And I can get result in 6.0.0 with 5.7.0 export state, load in 6.0.0

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 15, 2025, 8:34am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/33 "2025-12-15T08:34:34Z")

</div>

please share your data

---

<div class="post-metadata">

### Author: ![hugh-tong](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hugh-tong/32/17347_2.png) [@hugh-tong](https://discourse.paraview.org/u/hugh-tong)
#### Post date: [December 15, 2025, 8:37am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/34 "2025-12-15T08:37:53Z")

</div>

In the google drive link below, the name is “fluid\_flow\_convection.zip“. I use both pv5.7.0 and pv 6.0.0 on windows.  
[tuxriders\_postprocessing - Google Drive](https://drive.google.com/drive/folders/1emHuLLkXBkJoCii_4obBy9PNRlK7n1Vq)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 15, 2025, 9:18am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/35 "2025-12-15T09:18:29Z")

</div>

I’m able to generate stream lines without issues:

 ![image](https://discourse.paraview.org/uploads/default/original/3X/4/c/4c8824feae7debc91acab16565e0518b05272619.png)

Please share steps to reproduce.

---

<div class="post-metadata">

### Author: ![hugh-tong](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hugh-tong/32/17347_2.png) [@hugh-tong](https://discourse.paraview.org/u/hugh-tong)
#### Post date: [December 15, 2025, 9:24am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/36 "2025-12-15T09:24:40Z")

</div>

sorry for the misleading, it is actually the particle tracer’s problem. The pvsm file using pv 5.7.0 is below(\*_pv570.mvsm_). The paraview-6.0.0 should work by loading this pvsm, but could not directly reproduce the particle tracer using data. Also the problem is in paraview-5.13.1(\*pv513.pvsm)

[20201212\_pv513\_pTrace.pvsm](https://discourse.paraview.org/uploads/short-url/fP7Yy2wwnmhKetnDoxszKj4IPiA.pvsm) (532.4 KB)

[20201212\_pv570\_pTrace.pvsm](https://discourse.paraview.org/uploads/short-url/1XCUrb39lVfjc1cJj81wJLaUXAN.pvsm) (891.2 KB)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 15, 2025, 9:36am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/37 "2025-12-15T09:36:15Z")

</div>

Seems to work fine:

 ![particles](https://discourse.paraview.org/uploads/default/original/3X/1/a/1aabbdeddb4bc3b212e25e81125e826280f9cb9f.jpeg)

Here is the state file from ParaView 6.0.1:

[20201212\_pv601\_pTrace.pvsm](https://discourse.paraview.org/uploads/short-url/enEy7ZCLc8NUZNkUBLlDO7lSRom.pvsm) (1.1 MB)

---

<div class="post-metadata">

### Author: ![hugh-tong](https://discourse.paraview.org/user_avatar/discourse.paraview.org/hugh-tong/32/17347_2.png) [@hugh-tong](https://discourse.paraview.org/u/hugh-tong)
#### Post date: [December 15, 2025, 9:51am UTC](https://discourse.paraview.org/t/stream-tracer-movie/2115/38 "2025-12-15T09:51:56Z")

</div>

wow！ Thank you dear Mathieu! I will switch to the new version

[Previous page](https://discourse.paraview.org/t/stream-tracer-movie/2115.md?page=1)
