# How can I apply a streamtrace to a 2D csv file?

**URL:** https://discourse.paraview.org/t/how-can-i-apply-a-streamtrace-to-a-2d-csv-file/6190
**Category:** ParaView Support
**Created:** [January 9, 2021, 8:10pm UTC](https://discourse.paraview.org/t/how-can-i-apply-a-streamtrace-to-a-2d-csv-file/6190 "2021-01-09T20:10:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dr\_pfeffier](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/ec9cab/32.png) [@dr\_pfeffier](https://discourse.paraview.org/u/dr_pfeffier)
#### Post date: [January 9, 2021, 8:10pm UTC](https://discourse.paraview.org/t/how-can-i-apply-a-streamtrace-to-a-2d-csv-file/6190/1 "2021-01-09T20:10:31Z")

</div>

I’ve looked through the other available posts on here, but none of the suggestions work. I have a structured table with columns X, Y, n, u0, a, […] where my data is 2-Dimensional. I would like to apply a stream trace to the 2D data using ux as the x velocity and uy as the y velocity (I will likely use a ‘calculator’ filter to compute momentum, but for now I just want to get it working).

The CSV is structured such that the Y column holds ‘0’ for rows 1 to 51 while X sweeps from -1 to 1, then Y increments and X sweeps from -1 to 1 again, and so forth. I’ve tried the ‘table to structured grid’ filter, but it keeps giving the error messages

> ERROR: In /build/paraview/src/ParaView-v5.8.1/VTK/Filters/General/vtkTableToStructuredGrid.cxx, line 88
> 
> vtkTableToStructuredGrid (0x55d31518fa90): The input table must have exactly 5406 rows. Currently it has 250 rows.

I can generate a result using a ‘table to points’ → ‘Dalaunay2D’, but the streamtrace option remains grayed out. How can I generate a streamtrace using paraview? This is a trivial matter in tecplot360, but I prefer to use paraview for other reasons.

Many thanks,[Output.csv](https://discourse.paraview.org/uploads/short-url/9aDw6qbJcpQyagcX7ZAiTncaHPg.csv) (9.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: [January 11, 2021, 9:16am UTC](https://discourse.paraview.org/t/how-can-i-apply-a-streamtrace-to-a-2d-csv-file/6190/2 "2021-01-11T09:16:37Z")

</div>

Regarding your TableToStructuredGrid issue, here is why it is not working:

1. You also need a Z array containing only zeroes, you can add it using the calculator
2. You need to specify the extent, in your case it is 0-49, 0-4, 0-0

See the attached state file: [struct.pvsm](https://discourse.paraview.org/uploads/short-url/yuZBMrx9GUYYqB2mAvcyJcxwGbZ.pvsm) (240.4 KB)
