# Particle Tracing until predefined z-coordinate

Hey,

I got a flow in a pipe in z-direction and like to trace the particle.

I like to evaluate the homogenity of an inserted point source at the end in a x-y sectional view.
Unfortunately I get very different z-coordinates in the last integration step with stream tracer or particle path.

For example: pipe with 50mm length and a radius of 10mm --> 5 particles
Results:
x y z
5.23 1.34 49.98
9.13 5.43 49.47
1.49 3.34 49.32
7.01 9.21 49.67
2.61 6.62 49.11

My problem is that for example the particle with z=49.11 should have other x-y-coordinates at z=49.98. So the results are inaccurate if I like to set know the x-y-coordinates at z=49.5.

Is there any possibility for paraview to interpolate until a predefined z-coordinate? I tried for example to cut off the flow area at 49.5 but this didn’t work. The problem is only shifted.

Maybe I could lay in a plane into the fluid area and say paraview to save the x-y-coordinates when the tracers pass the plane?

Best regards
Max

Would using the `Clip` filter on the output for the stream tracer or particle path work?

Thanks for your Reply. But the clip filter doesnt solve my problem. I could try to send a higher number of tracers into the current area and extract the points at the end with approximately the same z-coordinates with the clip filter.

But if I like to send 5 points in a source in the flow area I will get the upper point list where I can’t extract similar z-coordinates.

Maybe its possible so say paraview to interpolate until z=49.5

@gesli Are you saying that you want a a point to be traced until z=49.5 but it is stopping before 49.5?

The ParaView stream tracer will trace as far as it can. If a particle does not reach z=49.5, it is because the stream tracer has reached a “termination condition.” Obviously, the stream tracer cannot trace particles forever or the filter would never return. You can get information about why a stream was terminated (i.e. why it stops) by coloring the streamlines by the `ReasonForTermination` field that is created. The following are some reasons why the stream tracer would stop tracing a particle, and some suggestions on what you can do about it.

• The stream tracer will stop tracing a particle after a certain streamline length. This is to handle conditions where the flow field can enter loops that can go on forever. If this is the reason for termination, then `ReasonForTermination` is 4. You can try increasing the `Maximum Streamline Length` parameter to tell the stream tracer to trace particles for a longer distance.
• Likewise, the stream tracer will stop tracing a particle after a certain number of steps. This is similar to stopping for the length of the streamline, but is counted by the number of steps the stream tracer took instead of physical length. If this is the reason for termination, then `ReasonForTermination` is set to 5. You can try increasing the `Maximum Steps` parameter.
• The stream tracer will stop tracing any particle that stops moving. If the particle moves into part of the vector field where the magnitude of the vector is too small, it will assume that the particle has come to rest and will stop tracing it. If this is the reason for termination, the `ReasonForTermination` is set to 3. You can try decreasing the `Terminal Speed` parameter.
• The stream tracer will stop tracing any particle that leaves the boundary of your mesh. If the particle leaves the mesh, then the stream tracer has no way of knowing where it might go from there. If this is the reason for termination, the `ReasonForTermination` is set to 1. There could be a number of reasons why the particle is traced outside of the mesh.
• It could be that the flow field legitimately flows out of the boundary of the mesh. If that is the case, then that is where the streamline goes, and it just doesn’t go where you want it to go.
• The computed stream lines are really just approximations, so it is possible that the streamline works its way outside of the mesh when it should be flowing inside. You could try playing with the parameters in the `Integration Parameters` group to try to make the integrator more accurate.
• If the stream seems to terminate in the middle of the mesh and reports that it has left the boundary, that probably means that the stream tracer failed to find the next cell that the stream entered. This probably means that the connectivity of the mesh is not quite right or that you have poorly shaped cells. There is not much you can do than either remeshing your data (not something ParaView is designed for) or adjust your seeds to try to miss the trouble spots.
• It is also possible for the integrator to compute an “unexpected value” (`ReasonForTermination` = 3). I’m not sure the reasons for this happening, but your best bet is to either play with the `Integration Parameters` or shift around the seed points.

I hope that some of that helps.