CITS4241 Visualisation Lectures 20 and 21 Flow Visualisation Flow visualisation is important in both science and engineering From a "theoretical" study of o turbulence or o a fusion reactor plasma, to the "practical" design of o airplane wings or o jet nozzles. The main challenge Find ways to represent and visualize (very) large, multidimensional, multi-variate data. Do this accurately, and Be computationally tractable 2 Flow data in an N-dimensional space can be univariate (N-dimensional scalar fields), N-variate (N-dimensional vector fields) or even N 2 -variate (N-dimensional second order tensor fields) Visualisation of results from a numerical flow simulation, Often a Computational Fluid Dynamics (CFD) calculation CFD studies the flow of fluids in and around complex structures Large amounts of supercomputer time are often required to derive the scalar and vector data in the flow field Flow visualisation will typically consist of 3 phases Grid generation, where the grid may be o rectilinear, o curvilinear, o unstructured, or a o hybrid - structured and unstructured. o Typically the calculation over 10 5-10 6 grid points Flow calculation solution of a system of Navier-Stokes equations that simulate the flow conditions Computationally intensive - generates data for several quantities typically, momentum, density, energy and velocity Equations may be solved for 10 4 + time steps. 3 4 1
Visualisation Render results obtained from phases 1 and 2 into a form easily understood by humans We are already familiar with many of the issues associated with visualisation Interactive visualisation is not possible because of the size of the problem Problem Size Example Problem and solution data requirements for some numerical aerodynamic simulations Clipped Delta Wing Grid Points 250,000 Grid File 4 MB Solution File (per time step) 9MB Time Steps 5,000 X 3 cycles Total per Simulation 135GB Descending Delta Wing 900,000 16MB 36MB 90,000 3,240GB SOFIA Airplane 3.2E+06 53MB 119MB 10,000 1,190GB 5 6 In interactive visualisation, it is ideal to store all time steps of the data in physical memory, clearly the results from 3D unsteady flow data are too large (from the table earlier) to enable interactive visualisation Even storing a few time steps becomes prohibitive! Post-visualisation is usually performed, I.e. Data are saved first, and visualisation is carried out later Post-visualisation Several approaches: 1. Load into memory as many time steps of the saved data as possible, For small dataset o this approach is attractive, and o interactive visualisation is possible For large dataset o only an unacceptably small number of time steps can be loaded 2. Sub-samples the saved data at lower grid resolution so that more time steps can fit in memory Not favoured approach because it is expensive to sub-sample, and resolution of the flow is poor Important flow features, eg vortices, can be missed 7 8 2
Post-visualisation (cont.) Several approaches: 3. Load into memory every step of the saved data without subsampling This requires that the system has enough memory to store at least a few time steps of the data This approach of visualising flow data at instants in time is sometimes referred to as instantaneous flow visualisation Visualisation mappings The process of visualisation involves Data processing, which can involve o Interpolation o Filtering o Deriving fitted functions o Visualisation mapping Translation of data into a suitable (iconic) representation (which involves deciding which features in the data are meaningful) o Rendering The generation of the final image that conveys the information to the user 9 10 Icons Hesselink and Delmarcelle [4] define three types of elementary vector icons used in flow visualisation. These are point icons, line icons, and surface icons 1. Point icons: When drawing arrows at selected points in the flow field, point icons are often superimposed in the field to denote the tails of the arrows Point icons are also used to highlight important features, such as critical points, of vector fields. Critical points in vector fields can be o points in the flow where the flow magnitude vanishes, or o points in the flow where the slope of the streamline ( see later) is locally undefined (e.g. approaching infinity), or o points where streamlines cross note that streamlines never cross each other except at critical points. 11 Icons (cont.) An example of point icon Note the small dots displayed at one end of each line segment 12 3
Icons (cont.) 2. Line icons Line icons are lines/curves drawn to show the directions and magnitudes of the flow vectors Line icons are more efficient in the sense that they provide a continuous representation of the data, thus avoiding mental interpolation of point icons. Common line icons used are: o Particle traces Particle traces are trajectories traversed by fluid elements over time. A collection of particle traces therefore gives a sense of the complete time evolution of the flow o Streaklines The streakline of the point x 0 at time t 0 is formally defined as the locus at time t 0 of all the fluid elements that have previously passed through x 0 Streaklines therefore emphasize the past history of the flow Icons (cont.) o Streamlines Streamlines at time t 0 are curves that are everywhere tangential to the vector field v(x, t 0 ). A collection of such streamlines therefore provide an instantaneous picture of the flow at time t 0 In general, particle traces, streaklines, and streamlines are distinct from each other, but these 3 families of trajectories coincide in steady flows. 13 14 Icons (cont.) An example of Streamlines Some important features that were 'hidden before are now visible Particle traces are clearly better here! Streamribbons We will look at two more line icons here: streamribbons and streamtubes Streamribbons are narrow surfaces between two adjacent streamlines They are built from a front with only two particles They reflect flow divergence through changing width, and Vortices are shown in the degree of twist in the ribbon 15 16 4
Streamtubes An easy way to generate streamtubes is to sweep an N- sided polygon along each streamline. The rotation of the edges found in the tube represent streamwise vorticity and the cross-section encodes cross flow divergence. Streamtubes (cont.) another example The streamtube has hexagonal cross-seciton A streamline and streamribbon are added for comparison and stream ribbons or stream tubes are arguably better still. Streampolygon (cross-section of streamtube) Rotation of edges vorticity Area of polygon divergence 17 18 Surface Icons Streamsurfaces This is the third type of elementary icons Generation of streamsurfaces Start with user-defined rake Generate streamlines from rake particles Construct a polygonal mesh to join adjacent streamlines Difficulties Field divergence can cause streamlines to o separate image interpretation difficulties or even o cross over not physically possible!! Surface Icons Streamsurfaces (cont.) Streamsurfaces provide additional information Any point on the surface is a tangent to the flow No particle can pass through the surface In a fluid dynamic (or similar) application, represent constant mass flux o Could view them as contours for the flow density Streamsurfaces are better than vector glyphs They don't require interpolation (by viewer) between icons 19 20 5
Streamsurfaces An Example Streamsurfaces work well in certain cases Extra streamlines added here Note the divergence Original particle front is a line segment of 6 particles, Surface is generated by polygonal tiling between pairs of adjacent streamlines Tensor Mappings Many physical quantities in fluid flows are tensors Their visualisation can provide significant insight into behaviours in fluids. Next level of difficulty! o (above scalar and vector data) Expected that there are fewer mapping idioms developed. Tensor data tends to be 2 or 3 times more multivariate o Recall vector data is N-variate and tensor data is N 2 -variate) than vector fields more complex to visualise! 21 22 Tensor Mappings (cont.) One of the more natural representations of tensor data is as a set of eigenvectors. This may appear easy one can associate a simple icon with a vector, but this representation is not intuitive when dealing with sets of vectors. Humans are not well versed in the visualisation of tensor data Abstraction is necessary to give a meaningful image Symmetric tensor data We will restrict ourselves to R 3 space (tensors can be represented as a matrix), and Symmetric tensors of the form U = [U ik ] and U ik =U ki. I.e. U is a 3x3 symmetric matrix. Equivalent to three orthogonal vector fields U has three (3) real eigenvalues r i and three (3) real, orthogonal eigenvectors e i ( i=1,2,3 ) for each point x in space Construct three orthogonal vectors: v i = r i e i Adopt the convention: r 1 > r 2 > r 3 This results in v 1, v 2, v 3 being the major, medium and minor eigenvectors respectively 23 24 6
Symmetric tensor data Point icons in tensor mapping? Visualising U is equivalent to simultaneously visualising three (3) vector fields v i, Each has o amplitude (r i ) and o direction (e i ). Clutter is an even greater problem with tensor data Density of the icon placement must be even less than usual Requiring significant mental interpolation between icons to discern the structure of the tensor field 25 26 Hyperstreamlines Line icons improve ability to visualise a continuous tensor field, just as it did for vector mappings. One could Use a streamline representation for one of the vector fields v i This will emphasise the continuity of that field but not highlight the correlations that exist between the three eigenvector fields The icon we need must represent all tensor information along the trajectory, or encode the continuous distribution of ellipsoids (an equivalent viewpoint) Generalise vector streamlines tensor hyperstreamlines Hyperstreamlines (cont.) Generation Streamlines are constructed by creating a streamline through one of the three eigenvector fields v i, and then sweeping a geometric primitive along the streamline (I.e. stretching the transverse plane under the action of the other 2 eigenvector fields) Typically, an ellipse is often used as the geometric primitive o The major and minor axes of an ellipse can represent the other 2 fields o Sweep this ellipse along the first vector field Use polygons to join ellipses 27 28 7
Hyperstreamlines Hyperstreamlines Object with 2 compressive loadings 'Cones' sweep along one strain direction (streamline for one eigenvector) Cross-section through cone ellipse representing 2 other strain directions Object with 2 compressive loadings 'Cones' sweep along one strain direction (streamline for one one eigenvector) Lower blue regions are streamribbons for the 'other' strains - they are everywhere to the principal strain 29 30 References 1. Thierry Delmarcelle and Lambertus Hesselink, "Visualizing Second-Order Tensor Fields and Matrix Data", Proc. IEEE Conference on Visualization,1992, pages 316-323. Article available at IEEE Xplore. 2. Thierry Delmarcelle and Lambertus Hesselink, "Visualizing Second-Order Tensor Fields with Hyperstreamlines", IEEE Trans. on Computer Graphics and Applications, vol. 13, No. 4, 1993, pages 25-33. Article available at IEEE Xplore. 3. Thierry Delmarcelle and Lambertus Hesselink, "A Unified Framework for Flow Visualization", in Computer Visualization: Graphics Techniques for Scientific and Engineering Analysis (R. Gallagher, editor), chapter 5, CRC Press, 1995. 4. L. Hesselink and T. Delmarcelle, Visualization of Vector and Tensor Data Sets, in Scientific Visualization Advances and Challenges, edited by Rosenblum et al., Academic Press, 1994. 5. David A. Lane, "Scientific Visualization of Large Scale Unsteady Fluid Flow" in Scientific Visualization Surveys, Methodologies and Techniques, IEEE Computer Society Press, 1996, pages 125--145. Article available at http://citeseer.nj.nec.com/lane97scientific.html 6. F. J. Post, T. van Walsum, and F. H. Post. "Iconic techniques for feature visualization". In Proceedings Visualization '95, pages 288-295, 1995. 7. Will Schroeder, Ken Martin, and Bill Lorensen, "The Visualization Toolkit - An Object-Oriented Approach to 3D Graphics", 2nd Ed., Prentice-Hall, 1998, Section 6.5, pages 185-186; Section 9.2, pages 363-364, pages 369-371. 31 8