Status: draft. Verified steps and screenshots to come.
In this lesson you will draw streamlines through a simulated flow in ParaView, and color them by temperature. Time: 10 minutes · Branch: Vector fields · Program: ParaView · Also in: MATLAB
| Before this | Data | You'll need |
|---|---|---|
| Start ParaView on OnDemand | disk_out_ref.ex2: air around a heated, spinning disk. It comes with ParaView (BSD-3) |
A running ParaView session |
Note
Cluster details. Highlighted values are placeholders. AMA27's queue names, module versions, paths and addresses go in when the cluster is deployed.
Why this matters
Arrows give the direction of the flow at single points. Streamlines follow it, so recirculation, dead zones and mixing show up as shapes you can recognise. The same steps work on other vector fields: water velocity, magnetic fields, ion flux, wind.
Key idea
Streamlines start from seeds. A streamline is traced from a starting point, its seed, by following the flow direction step by step. A speck of dye dropped in a river traces out one the same way. What you get is therefore a picture of the flow near the seeds, and nowhere else. If a region you care about looks empty, move or spread the seeds before deciding nothing happens there.
Steps
Step 1: Open the data as an outline
Open disk_out_ref.ex2 as in the ParaView starter and click Apply. Then set the Representation drop-down on the toolbar from Surface to Outline.
You should see: a box outline, so you can see inside the flow domain.
Screenshot: the Representation drop-down set to Outline
Screenshot to come: The toolbar's Representation drop-down set to Outline, with the data shown as a box outline
Step 2: Add a stream tracer
Select disk_out_ref.ex2 in the Pipeline Browser and choose Filters ▸ Alphabetical ▸ Stream Tracer. In Properties, set Vectors to V. Set Seed Type to Point Cloud and untick Show Sphere. Click Apply.
You should see: thin lines swirling through the domain, starting from a cloud of points near its middle.
Screenshot: Stream Tracer's properties, with Vectors and Seed Type marked
Screenshot to come: The Properties panel for StreamTracer1, with Vectors set to V and Seed Type set to Point Cloud marked
Step 3: Make the lines visible
With StreamTracer1 selected, choose Filters ▸ Alphabetical ▸ Tube and click Apply.
You should see: the lines become tubes, which are thicker on screen and easier to read for depth.
Step 4: Color by temperature
With Tube1 selected, choose Temp in the toolbar's coloring drop-down and click Rescale to Data Range. Choose the Viridis preset (see Step 5 of the starter).
You should see: tubes colored by the air's temperature: hot near the heated disk, cooler where fresh air enters.
What you should see

disk_out_ref.ex2, colored by temperature with Viridis, drawn by the lesson's script. Yellow is the hottest air.Step 5: Save the picture
Choose File ▸ Save Screenshot… and save to ~/scratch/streamlines.png at 1600 by 1200.
You should see: the image in the Files app. To make the same picture without clicking, run scripts/streamlines.py with pvbatch.
Check your understanding
Your streamlines all bunch up in one corner and miss the region you care about. What do you change first?
The seeds. Move or enlarge the point cloud, or switch Seed Type to Line and draw a line across the inflow. Then the flow through your region gets traced.
Why color the streamlines by temperature instead of drawing them in one color?
The paths show where the air goes and the colors add a second variable along those paths. Together they show where the hot air travels, which neither picture gives on its own.
If something goes wrong
| What you see | Why | What to do |
|---|---|---|
| Stream Tracer makes nothing | Vectors isn't set to the velocity, or the seeds are outside the data | Set Vectors to V, and reset the seed position (the reset button next to the point-cloud settings) |
| Only a few short lines | The seed cloud is small, or the flow is slow near the seeds | Raise Number Of Points and Radius under the seed settings, then Apply |
Temp and V aren't in the lists |
Your ParaView shows variable names in lower case | Choose temp and v instead |
Next
Credits
Data: disk_out_ref.ex2, ParaView example data (Kitware/Sandia), BSD-3-Clause. Steps follow the ParaView 6.0.1 documentation. Written for SBSC; text CC-BY 4.0.
