IN4086P Flow visualization
For today's lesson, we will be studying the visualisation of a 200 GB (yes, you heard me, 200 gigabytes) meteorological dataset. Fortunately, you will only be looking at a small subset of this time-dependent multi-scalar vectorial dataset as our supercomputer is currently busy playing poker online.
Meteorologists are interested in cloud behaviour.
A bad first impression of Vector Field Visualisation
For the first sub-exercises, you will be working with one timestep of the dataset. Download and unpack clouds.vti.zip from the in4086p dataset page. This dataset contains both scalars and vectors.
|
Load the clouds.vti dataset. Start by making an arrow plot (the "Glyph" filter) of the velocity field, making sure that the glyphs are also coloured according to speed. Experiment with streamlines (StreamTracer module). These visualisations are clearly not effective, mostly due to problems inherent in 3D vector field visualisation. Discuss these problems with your assistant. |
Adding context
A number of the problems above are due to the fact that you are trying to visualise the whole 3-D domain in one go. Having some kind of context, or regions of interest, would probably improve matters greatly.
The dataset you are investigating is actually all about clouds and their effect on the weather. Clouds are defined as regions where even miniscule amounts of water are present in liquid form.
|
Visualise the clouds in two ways: by surface-rendering and by direct volume rendering. Marvel at their beauty. |
Rendering a number of transparent nested isosurfaces is sometimes called "The Poor Man's Volume Renderer".
|
Make use of this idea to visualise the relation between the (internal) cloud structure and attributes such as liquid water, total water, temperature and velocity (NB: to get access to liquid water for coloring, remember to activate the Contour filter's Compute Scalars function). It should look something like the image below. Discuss these relations with your assistant. |
Thermals
Thermals refer to rising hot bodies of air. Clouds and thermals go hand in hand. Now that you know where the clouds are, you should also be able to make more effective use of glyphs and streamlines.
|
By intelligently seeding streamlines, show the behaviour of thermals within cloud bodies. Color the streamlines based on vertical velocities, so that upward or downward streams become directly obvious. Try to combine this with your previous visualisation. |
Back to the Future
We will now be switching to a time-dependent dataset. Save your previous state and clear the pipeline browser by selecting File | Disconnect from the main menu. Download and unpack lea_data.zip from the in4086p dataset page. When you load this data, make sure you load the vf.pvd file, and not the vti files.
|
Using glyphs and streamlines, visualise the vector field over time (use the VCR and current time toolbars). Try to emphasise the vortices with for example your colour map. Show these to your assistant. Below is a first try. |
Particles!
A Pathline is defined as the trajectory a fluid particle would take in a given flow. We will now apply this principle to a new time-dependent dataset, known as the LEA dataset.
First we need to be able to insert clusters of points into the dataset. Because the dataset is 2-D, but interaction is in 3-D, we have to create a filter that can project points into the plane in which the dataset is defined. First create a Point Source, set its Number of Points to 100 and its radius to 5. Notice how you can now place this cluster of points anywhere in 3-D, and that it's actually quite difficult to keep the points on the data plane. Now create a Programmable Filter with the Point Source as input, and then cut and paste the following code into its Script box:
1 from paraview import vtk
2
3 pdi = self.GetPolyDataInput()
4 pdo = self.GetPolyDataOutput()
5 new_pts = vtk.vtkPoints()
6 num_pts = pdi.GetNumberOfPoints()
7
8 for i in range(num_pts):
9 x,y,z = pdi.GetPoint(i)[0:3]
10 new_pts.InsertPoint(i, x, y, 0.0)
11
12 pdo.SetPoints(new_pts)
13
|
Explain to your assistant what this code is doing. |
Because the ParticleTracer filter in ParaView is quite picky about the type of input you give it, we're going to have to trick it. So, first connect a TemporalShiftScale filter to the data. This filter performs no actual changes on the data, but instead modifies the meta information about what time range and steps are available. This is useful for cases where the time in a source or file needs to be shifted and or scaled.
Now select the TemporalShiftScale filter and create a ParticleTracer. It should have the TemporalShiftScale as "Input" and the Programmable Filter as its "Source1". You might want to set "Force Reinjection Every NSteps" to 0 in order to see just your initial set of particles. If everything has gone according to plan, you should now have pretty particles flying all over the scene!
Due to a bug in the current version of ParaView (3.4.0), you might see an error message appear when you apply the TemporalShiftScale filter. Just ignore it.
|
Combine streamlines and particles in your time-dependent visualisation. Experiment to see what the relation is between the particle trajectory and the streamlines as they change for each and every timestep. Demonstrate and discuss with your assistant. |
Texture-based flow visualisation
Wouldn't it be nice if there were a more dense visualisation that could show me all my data as it changes over time? Glyphs, streamlines and particles sample my data domain, I could be missing something...
We have just the thing for you. We're going to make use of a state-of-the-art Lagrangian Eulerian Advection (LEA) implementation developed by colleagues of ours at the CSCS in Switzerland. A brief description of LEA can be found in the following article in the Data Visualization reader: R.S. Laramee, H. Hauser, H. Doleisch, B. Vrolijk, F.H. Post, D. Weiskopf, The State of the Art in Flow Visualization: Dense and Texture-Based Techniques, p. 215. An extensive description is given in the article:B. Jobard, G. Erlebacher, M.Y. Hussaini, Lagrangian-Eulerian Advection of Noise and Dye Textures for Unsteady Flow Visualization IEEE Transactions on Visualization and Computer Graphics 8(3), July-September 2002, pp. 211-222.
Download LEA.tar.gz from the in4086p dataset page and untar it in your working directory with:
tar xvfz LEA.tar.gz
Go into the created directory and run CMake:
cd ParaView3 ccmake .
Press 'c' and wait for the first configuration stage. It will now complain that it can't find ParaView_DIR. Change this field to /opt/paraview-3.4.0 and press 'c' again. Finally press the magic 'c' one more time and then 'g' to generate. Now type 'make' and watch it build. Congratulations, you have just built your first downloaded ParaView plugin.
Now go to Tools | Manage Plugins, and then load libCSCSLEA_SMPlugin.so and libCSCSLEA_GUIPlugin.so as Local Plugins. You will obviously have to navigate to the directory where you built the downloaded plugin.
|
Combine the now-available LagrangianEulerianAdvection (LEA) filter with streamlines and particles to visualise your time-dependent data. Below is an example of what you can expect. |
Note: the LEA filter is known to be a bit buggy. If ParaView keeps crashing when you try to add the filter, try restarting ParaView, loading only the vf.pvd dataset and then applying the filter. If this works, you can use Load State to quickly bring in the other elements of your visualization (provided you saved them earlier).
|
Mark in the visualisation the two vortex cores. Are the vortices rotating in opposite or in the same direction? What do cross-shaped patterns mean? (as shown at the upper left in the image above) |

