[vtkusers] streamlines: behavior at edges

Berk Geveci berk.geveci at kitware.com
Mon Aug 23 08:52:27 EDT 2004


> As the streamline goes closer to the edge of the cell, the influence of the
> distant vertices of the cell diminishes, until only the endpoints of the
> touched edge contribute with their vectors. Is this strategy correct?

There is really no "correct" way :-) You should think of it in terms of
the order of the interpolation. Currently, the velocity field is
interpolated using the cell's local interpolation function. In most
cases, this is linear or bi-linear (or tri-linear) and does not use any
information from neighboring cells. A higher order or better
interpolation is possible, the best probably being the same 
interpolation scheme used by the simulation (assuming we are not talking
about measured flow field). In the case of uniform rectilinear or
curvilinear grids, this is relatively easy. In case of unstructured
grid, more information than what is passed to VTK through
vtkUnstructuredGrid is needed.

> I doubt the correctness of this strategy from a very simple reason: If one
> has a quad, one can use it as is or one can triangulate it. The two 
> situation
> generate completely different streamlines. Intuitively this should not 
> happen,
> because the vector field and points geometry have not been altered.

This is not correct. The vector field has been altered. Not the discrete
field maybe but the interpolated continuous field. Quad uses a bi-linear
interpolation whereas a triangle uses a linear interpolation producing
different values inside the cells (same on edges). To produce the same
result, you have to make both cell types use the same interpolation.

vtkStreamTracer uses a class called vtkInterpolatedVelocityField to
perform the interpolation of the velocity field at a point. I was asked
a while ago to change the class so that a sub-class of this can be
substituted. Somehow it slipped my mind and I am only getting to it now.
Once I make this change, it will be possible to substitute a different
interpolator in order to use a different interpolation scheme.

-Berk





More information about the vtkusers mailing list