Vector Field Visualisation : global view Visualisation Lecture 12 Institute for Perception, Action & Behaviour School of Informatics Vector Visualisation 1
Vector Field Visualisation : local & global Vector Fields specify flows through the field aim : visualise flow in field Two properties of vector fields to visualise local view global view with respect to a fixed point (last lecture) e.g. glyphs, lines, warping, displacement etc. trajectory of particles transported by vector field today Vector Visualisation 2
Steady / Unsteady Flow Steady flow remains constant over time state of equilibrium or snapshot Unsteady flow varies with time implications to tracing particles Vector Visualisation 3
Stream/Streaklines Showing where the vector flow has come from/going to shows flow features such as vortices in flow only shows information for intersected points need to initialise in correct place clutter problem in 3D Vector Visualisation 4
Particle trace Particle trace : the path over time of a massless fluid particle transported by the vector field The particle's velocity is always determined by the vector field dx=v dt Express in integral form : x t = V dt t Solve using numerical integration methods. Vector Visualisation 5
Steam & Streak lines : the difference Streakline : the set particle traces at a particular time that have previously passed through a specific point (snapshot) Path of the particles that were released from a point x0 at times t0< s < t Streamline : integral curves along a curve s satisfying: s= V ds, with s=s x, t s at a fixed time t Integral in the vector field while keeping the time constant Vector Visualisation 6
Streamlines Always tangent to the vector field Fluid do not cross streamline streamlines technically not particle traces For steady flows streamlines == streaklines 2 are equivalent For unsteady flow Every streamline only exists at one moment in time Always changing its shape Vector Visualisation 7
Example : convection streaklines Ventilation simulation of a kitchen. - Steady state or equilibrium. Thirty streaklines initiated under a window. Colour mapped (lecture 5) by air pressure (with is scalar). Note the warm air convected by the hot stove. Vector Visualisation 8
Showing motion over time A scaled, oriented line is an approximation to a particle s motion in the flow field dx If velocity V = dt Displacement of a point is dx=v dt Need to integrate in order to draw streamlines / streaklines Vector Visualisation 9
Numerical Integration Numerical Integration : beyond scope course Accuracy depends on step size dt Results require careful examination But... What do we mean by error in the context of visualisation? At least to make it appear nice Should avoid the path to diverge! It is numerically and visually bad! Vector Visualisation 10
Numerical Integration : Euler's Method Seed point. V i Δt x t = V dt t x i Euler's method : x i 1 x i 1 = x i V i Δt New position x i 1 = old position, xi plus instantaneous velocity times incremental time step 2 Numerical Error is O Δt Vector Visualisation 11
Problem with Euler's method r r Rotational flow field. With Euler s method, integrated flow occurs in a spiral. With a rotational flow field Euler's method wrongly diverges due to error Vector Visualisation 12
nd Runge-Kutta method, 2 Order Seed point. Euler's method : x i 1 = x i V i Δt Runge-Kutta method : Δt x i 1 = x i V i V i 1 2 V i 1 is calculated using Euler's method. Error is O Δt 3 (assuming 0 < t < 1) Vector Visualisation 13
nd 2 Order Runge-Kutta Improves accuracy, but more expensive additional function evaluation N.B. 0 < t < 1 Larger time-step for same error 4th Order Runge-Kutta also popular for integration Best method depends on data and interpretation Vector Visualisation 14
Example : thunderstorm simulation Massless particles are introduced in a regular grid Orange indicates ascending Blue indicates descending http://www.mediaport.net/cp/cyberscience/bdd/fich_050.en.html Vector Visualisation 15
Example : thunderstorm simulation Streamers indicate air movement, colours are used as before. Rotation of air is shown by a ribbon. http://www.mediaport.net/cp/cyberscience/bdd/fich_050.en.html Vector Visualisation 16
Computational Issues Computing particle traces is expensive: Interpolation need to interpolate velocity from grid points and in time in the case of unsteady flows Searching need to locate grid box that contains particle Coordinate transformation need to transform from global to local coordinates to perform integration Vector Visualisation 17
Variable step Euler method P3 In 2D (lines through cells) Assume vector is constant across cell. P2 P0 P1 Calculate closest intersection of cell edge with ray parallel to vector direction using ray-ray intersection. Iterate for next cell position. Vector Visualisation 18
Initialisation of Streamlines Streamlines usually initialised along a curve, or rake Often initialised at a source (e.g. engine thrust) Results can vary depending on placement of rake NASA Ames, FAST system Vector Visualisation 19
Rakes : stream origins Streams originate at rake What can a rake show? spreads apart divergence rotates - vorticity What shapes can we put a rake in? Line shows rotation around the line Closed shape - 2D or 3D Vector Visualisation 20
Lines & Points visualise particle trace with points show all points simultaneously (like time-lapse photograph) or animate the points over time (for trajectory trace) can connect the points with lines colour mapping to show speed, or use dashes, with length proportional to speed Use ribbons or tubes to show other properties (next lecture) Vector Visualisation 21
VTK : Streamlines vtkstreamer base class performs numerical integration to generate particle paths vtkstreamline derived class produces connect stream lines from integration results vtkdashedstreamline / vtkstreampoints derived classes Vector Visualisation 22
VTK : Stream Points Stream Points (points along stream line at given separation) N.B. rake = 2D grid Vector Visualisation 23
VTK : Dashed Stream Line Uses vtkgylph3d to specify shape to use for dash Vector Visualisation 24
Example : carotid artery Visualisation using VTK streamlines solves clarity issues of glyphs streamv.tcl Vector Visualisation 25
Summary Global View of Vector Fields visualising transport requires numerical integration Euler's method Runge-Kutta computational issues rakes (where it all begins!) stream {lines points glyphs } next lecture : visualising flow using ribbons, surfaces & texture Vector Visualisation 26