1171
\vgtccategoryResearch
\vgtcinsertpkg
\teaser
Visualisation of the divergence of the von Karman Vortex Street data set with two distinct reference regions (green). The visualization was obtained using backward integration with the parameters: , ,and .
Visualizing Similarity of Pathline Dynamics in 2D Flow Fields
Abstract
Even though the analysis of unsteady 2D flow fields is challenging, fluid mechanics experts generally have an intuition on where in the simulation domain specific features are expected. Using this intuition, showing similar regions enables the user to discover flow patterns within the simulation data. When focusing on similarity, a solid mathematical framework for a specific flow pattern is not required. We propose a technique that visualizes similar and dissimilar regions with respect to a region selected by the user. Using infinitesimal strain theory, we capture the strain and rotation progression and therefore the dynamics of fluid parcels along pathlines, which we encode as distributions. We then apply the Jensen–Shannon divergence to compute the (dis)similarity between pathline dynamics originating in a user-defined flow region and the pathline dynamics of the flow field. We validate our method by applying it to two simulation datasets of two-dimensional unsteady flows. Our results show that our approach is suitable for analyzing the similarity of time-dependent flow fields.
Human-centered computingVisualizationVisualization application domainsScientific visualization
Introduction
Researching flows is central to improving not only energy conversion processes but also understanding of natural phenomena such as ocean currents. By highlighting meaningful structures, flow visualization can reveal underlying dynamics to further this understanding. This is challenging, as fluid motion is a time-dependent, nonlinear, and possibly chaotic process. Techniques concerned with feature detection or the computation of Largangian Coherent Structures were shown to be beneficial to understanding, although for some structures, such as vortices, a robust and objective definition is still a current object of research.
In this work, we propose a method that takes a user-defined region of interest and visualizes (dis)similarity. The approach is based on pathlines for which we compute a strain/rotation progression using concepts from continuum mechanics. We construct dynamics distributions from the resulting progressions, which we use to compute similarity using the Jensen-Shannon divergence. Our method does not require a clear definition of the feature that should be detected. With the focus on dissimilarity, our method allows the user to select a base line, resulting in highlighting abnormal dynamics in relation to the chosen reference region.
Notation: We denote time-dependent velocity fields as , where is a position in the flow domain and is an instant in time within the time domain . We denote pathlines by . A pathline describes the trajectory of a massless particle that is advected by the underlying velocity field. It is a solution of the differential equation , with . The parameter describes the integration time.
1 Related Work
A common approach to visualize flows is to focus on specific flow patterns with spatial and temporal extent, that is, features. Features (e.g. vortices [15, 17, 22, 5], shock waves [29], splats [21]) allow for a purposive investigation of flow behavior, as they are associated with specific physical properties of the flow. Feature detection methods, for example, the [17] or -criterion [15], have drawbacks, as the results depend on the chosen reference frame. A body of research is concerned with objective flow characterization [9, 1, 8, 27, 28] or [11] for sparse trajectory data.
Instead of investigating specific features, the vector field topology [13, 14] was shown to be suitable for analyzing the underlying structure of flows, where the so-called topological skeleton is calculated and depicted. The topological skeleton consists of critical points, i.e. points in space in which the velocity vanishes, and separatrices seperating regions of the flow domain. Streamlines seeded within regions constructed by the separatices share the same source and sink. In their work, Günther and Rojo [7] provide a general overview of this class of techniques. Although vector field topology is only applicable to steady flow fields, Bujack et al. [4] provide a survey of techniques exploring time-dependent flow topology. The time-dependent analogy for vector field topology are Lagrangian Coherent Structures (LCS)[10]. The Finite-Time Lyapunov Exponent (FTLE) field proposed and discussed by Haller [12] is the most common technique used for LCS visualization.
Although we will utilize ideas developed in the context of LCS, our goal is not a direct detection of a specific flow pattern. Our method should extend existing techniques in such a way that, for example, a similarity field with respect to a detected feature can be computed fast.
In the context of similarity in 2D vector fields, Schlemmer et al. [24, 25] and Bujack et al. [2] proposed methods applying moment invariants for pattern matching. After visual selection, Bujack et al. [2] use statistical moments and normalization as rotation, translation, and scale invariant descriptors. In the following work [3], they used their technique to cluster similar flow patterns without predefined descriptors.
2 Background
2.1 Localized FTLE
Localized FTLE was introduced by Kasten et al. [18] and is an alternative to computing FTLE [12] using flow maps. Flow maps are constructed by advecting particles in the flow forward (or backward) in time. The flow map maps the initial positions of the tracer particles to their end positions after a specified integration time. The map gradient then describes the deformation gradient used for computing the right Cauchy-Green deformation tensor. Its spectral norm normalized by the integration time results in the FTLE field. In contrast, localized FTLE is based on the local deviation of the neighborhood along a pathline and allows the pathlines to be processed individually.
With the velocity field and a pathline , the deviation of infinitely close particles is governed by the spatial gradient of the velocity field along the pathline. We denote an infinitely close perturbed particle as , with the time-varying perturbation vector . At , is close to zero. Kasten et al. then approximated the temporal evolution of the deviation , by considering very short advection times. The solution of the differential equation for short advection times is then , where
Kasten et al. [18] applied this approximation for short time intervals along the pathline . Note that the samples are equidistant in time. They obtain the following description for the cumulative deviation along a pathline , where the matrix:
(1) |
maps the neighborhood of the point to the deviation after advection over the advection time . is the number of discrete time steps, and is the (small) temporal sample distance. The integration time satisfies . can be treated analogously to the flow map gradient. Although we will not apply localized FTLE directly, we will utilize the idea of computing the deformation gradient along pathlines by accumulating small deviations.
2.2 Jensen-Shannon Divergence
The Jensen-Shannon divergence (JSD) [20] is an information-theoretic divergence measure based on Jensen’s inequality [16] and the Shannon entropy [26]. It is similar to the common Kullback-Leibler divergence [19], which measures the divergence between statistical populations.
The Kullback-Leibler divergence is defined as follows:
(2) |
where and are discrete probability distributions defined in the same probability space . The Kullback-Leibler divergence is always larger than zero. As applies, this measure is not symmetric. Note that it can be made symmetric by defining the measure . The most significant drawback for our purposes is that the Kullback-Leibler divergence requires absolute continuity: . In our approach, absolute continuity is not guaranteed.
In our method, we apply the closely related Jensen-Shannon divergence:
(3) |
where . The JSD is a symmetric divergence measure that does not require absolute continuity, as applies by definition.
3 Methodology







Our method consists of two steps. In the first step, we construct a dynamics distribution, which represents the stretching and rotation that a fluid parcel undergoes during a specific timeframe along its trajectory. In the second step, taking a user-defined reference region, we compute the similarity of the dynamics distributions to the reference distribution using the Jensen-Shannon divergence.
In the following, we first describe how we utilize ideas from localized FTLE and infinitesimal strain theory to compute a set of transformations that describe the dynamics along a pathline. We then discuss how we apply these distributions for a fast computation of the similarity of pathline dynamics with respect to a reference distribution.
3.1 Dynamics Distribution
The finite-strain tensor is a common tensor in continuum mechanics and closely related to the right Cauchy-Green tensor. It is defined as , where is the deformation gradient, is the right Cauchy-Green tensor, and is the identity. Analogously to the Cauchy-Green tensor, it describes the deformation of a fluid volume from a reference configuration and captures nonlinear dynamics.
Note that the product integral described in Equation 1 computes the product of matrices. As matrix multiplication is not commutative, the gradient for short advection times must be applied in the correct order. By directly constructing and utilizing a distribution from the deformation gradients for short integration times that contribute to , we lose information on the correct order. Our goal is to construct a distribution based on (short) deformation gradients without order dependence, and thus without matrix multiplication. In order to describe the deformation dynamics as a distribution, we first require a description of the nonlinear strain tensor using summation, which is commutative.
After computing the pathlines (using the Dormand-Prince method [6]), we construct an infinitesimal strain tensor by applying the localized concept for short advection times. The deformation gradient for a short advection time is described and approximated by omitting the higher order terms of the Taylor series: , where is the (small) advection time, and is the spatial gradient of the velocity field at the corresponding position in space and time.
We can now calculate the finite strain for short advection times by inserting into the equation of and rearranging the equation to: . We choose the advection time to be very short (), so that is also small. We can then omit , as . This results in the so-called infinitesimal strain tensor, a common tensor from continuum mechanics: .
We now briefly show that the sum of infinitesimal strains along a pathline is a viable approximation for the finite strain tensor. Two consecutive transformations and result in the deformation gradient . When inserting into the equation for the finite-strain tensor, substituting for the approximation, and omitting the matrix products as shown in the equation for and , we obtain the following equation:
(4) |
Note that this only holds if . This construction is analogous to the construction of more consecutive transformations. This results in , which can be interpreted as a strain progression. This progression is the basis for our deformation dynamics. Note that the approximation error can accumulate for many terms. Here, we study the error introduced by our approach visually. Figure 1 shows the resulting FTLE field (far left) and the calculation of the principal stretch using the sum of the infinitesimal strain to approximate the finite stain. It is clear that an error is introduced, yet we found it to be tolerable for our approach, as the figure suggests a strong correlation between the FTLE values and the approximation sum.
In addition to the infinitesimal strain , we also consider the infinitesimal rotation tensor: .
We found that the invariant of the infinitesimal strain tensor and the rotation tensor are viable for the construction of the transformation distribution. Note that and for incompressible fluids apply. Here, we chose and . can be interpreted as the infinitesimal squared principal stretch of the fluid parcel, which is an objective measure. can be interpreted as the infinitesimal vorticity magnitude. As vorticity is not objective, we assume the resulting distribution to be not objective.
We now construct the progression set by first computing and along a pathline using the defined sample distance . applies, where is the integration time. We then compute a histogram by first constructing a histogram for the set and the set , respectively. The two one-dimensional histograms with bins are then concatenated to form a one-dimensional histogram with bins. Note that constructing a two-dimensional histogram would imply that the sets of invariants are independent, which is not the case, as they both depend on . We normalize so that the sum of all bins equals one.




3.2 Similarity Visualization
Our method is based on the visualization of the similarity of pathline dynamics using a reference deformation distribution and the deformation distribution computed earlier. For visualization, we first compute the reference deformation distribution . The user defines an area for the reference distribution. Here, we use circular regions, but any region is applicable. Now, we construct a distribution for every pathline, where by adding the bins of the corresponding pathlines. After normalizing by the number of elements, we obtain the reference distribution .
We can now calculate the similarity by computing the Jensen-Shannon divergence . Small divergence values indicate strong similarity, where a value of zero implies that and are the same distribution. Here, we normalize the resulting field by the upper bound, which is , when using the natural logarithm. The divergence is then displayed by color mapping.
3.3 Parameters
Amount of Bins: The amount of bins determines the quality of the dynamics distribution. Choosing a value too low leads to a greater variance of the values and within a bin. As a result, the algorithm can overestimate the similarity between distributions, leading to overall low divergence values. High values increase the computation time and produce a large amount of empty bins, especially if the number of samples is low. We found that the common rule of thumb produces viable results and a solid starting point for exploration. can be directly computed from the chosen integration time and sample distance (cf. Figure 2).
Sample Distance : The sampling distance determines the resolution of our pathline approximation and the quality of the infinitesimal strain tensor. It is straightforward to assume that the parameter should be chosen as small as possible. Increasing the resolution and thus decreasing leads to a longer computation time for the dynamics distribution. A high value of can lead to artifacts due to the omission of higher-order terms that have a greater impact for higher values of (cf. Figure 3e,f).




Integration Time : From the construction of the dynamics distribution, it is apparent that a decrease in integration times leads to a decrease in variance. This may lead to a more pronounced divergence. It is desirable to study long pathlines as it reveals more details in the visualized flow structures associated with dissimilarity (cf. Figure 3c,d).
4 Results

4.1 Datasets
We explore two data sets that describe a time-dependent 2D flow. They are provided by the Computer Graphics Laboratory of ETH Zürich and were used in the work of Günther et al. [8]. The data sets were generated using the Gerris flow solver [23]. The first data set represents the common flow pattern of a von Karman Vortex Street, where the flow is disturbed by a cylinder. The second data set describes a flow that develops due to buoyancy effects caused by a heated cylinder. The vortex street spans with a grid resolution of . It consists of time steps in the range of . The heated cylinder data set spans the domain with a grid resolution of . It consists of time steps in the range of .
4.2 Performance
The following computation times were obtained on a Linux system with Ubuntu 20.04 LTS, 32GB of RAM, and an Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz chip (2 physical processors and 32 threads). This construction of the dynamics distribution is the most costly, as it requires numeric integration for every point. This is only required once for a specified timestep, integration time, and sample distance. Note that we store the dynamics sets and for a fast recalculation of the reference distribution. In a grid with vertices and input parameters and , this results in values that must be stored in memory. This results in a large but manageable memory footprint for 2D flows on modern workstations. Using the rule of thumb mentioned above, the distributions have a memory footprint of . For the buoyancy data set with the parameters specified in section 4, we measured a computation time for the construction of the dynamic distribution of approximately 13 seconds. The computation of the similarity visualization takes approximately 1 second for this case and does not require additional memory. As the integration and computation of and are independent of each other, we parallelized these computations using OpenMP.
4.3 Use Cases
The resulting visualization is shown in Visualizing Similarity of Pathline Dynamics in 2D Flow Fields and Figure 4. The reference region in Visualizing Similarity of Pathline Dynamics in 2D Flow Fields (top) and Figure 4(left) corresponds to the use case in which the user investigates the dissimilarity (high divergence) from a known base line. This reveals abnormal behavior, which is in this case associated with vortex shedding or, in the case of the heated cylinder, turbulent motion. Visualizing Similarity of Pathline Dynamics in 2D Flow Fields(bottom) corresponds to the use case in which the user is aware of the location of a specific feature. By choosing the reference region to be completely within the feature, focusing on similarity (low divergence) reveals the other similar features. Figure 4(right) is a case in which the user expects turbulence and aims to declutter the visualization. When the reference region is chosen in such a way that turbulence is captured within the reference region, abnormal behavior is more easily identifiable. Note that Visualizing Similarity of Pathline Dynamics in 2D Flow Fields, reveals structures akin to LCS. We assume this to be the result of choosing a reference region with a low (or high) , since dissimilarity to a low (or high) alpha is equivalent to a high magnitude of stretching.
5 Conclusions
In this work, we provided a novel user-guided approach to visualize similarity. Our technique utilizes the concept of strain progression to encode the strains and rotation along a pathline as distributions. We then compare these distributions using the Jensen-Shannon divergence, which measures the difference between two distributions. The benefit of our strain-based method is that the entire evolution of fluid parcels is considered when computing similarities.
In the future, we will expand our method to three dimensions and apply the approach to turbulent flows. This is of interest because visualizations of turbulent flows are often cluttered, as self-similar patterns occur on many scales. Figure 4 suggests, that our method is able to ”encode” turbulence in the reference distribution and potentially increasing the quality of the similarity visualization. We also want to improve on the description of the reference distribution and explore clustering techniques.
In addition, we will explore techniques to speed up the computation and improve the memory footprint, which is critical when taking 3D flows into account.
Acknowledgements.
This work was partially funded by the German Federal Ministry of Education and Research within the project Competence Center for Scalable Data Services and Solutions (ScaDS) Dresden/Leipzig (BMBF 01IS14014B).References
- [1] H. Bhatia, V. Pascucci, R. M. Kirby, and P.-T. Bremer. Extracting features from time-dependent vector fields using internal reference frames. In Proceedings of the 16th Eurographics Conference on Visualization, EuroVis ’14, p. 21–30. Eurographics Association, Goslar, DEU, 2014.
- [2] R. Bujack, J. Kasten, I. Hotz, G. Scheuermann, and E. Hitzer. Moment invariants for 3d flow fields via normalization. In 2015 IEEE Pacific visualization symposium (PacificVis), pp. 9–16. IEEE, 2015.
- [3] R. Bujack, J. Kasten, V. Natarajan, G. Scheuermann, and K. I. Joy. Clustering Moment Invariants to Identify Similarity within 2D Flow Fields. In E. Bertini, J. Kennedy, and E. Puppo, eds., Eurographics Conference on Visualization (EuroVis) - Short Papers. The Eurographics Association, 2015. doi: 10 . 2312/eurovisshort . 20151121
- [4] R. Bujack, L. Yan, I. Hotz, C. Garth, and B. Wang. State of the art in time-dependent flow topology: Interpreting physical meaningfulness through mathematical properties. Computer Graphics Forum, 39(3):811–835, 2020. doi: 10 . 1111/cgf . 14037
- [5] M. S. Chong, A. E. Perry, and B. J. Cantwell. A general classification of three‐dimensional flow fields. Physics of Fluids A: Fluid Dynamics, 2(5):765–777, 1990. doi: 10 . 1063/1 . 857730
- [6] J. Dormand and P. Prince. A family of embedded Runge-Kutta formulae. Journal of Computational and Applied Mathematics, 6(1):19 – 26, 1980. doi: 10 . 1016/0771-050X(80)90013-3
- [7] T. Günther and I. Baeza Rojo. Introduction to vector field topology. In Topological methods in data analysis and visualization vi, pp. 289–326. Springer, 2021.
- [8] T. Günther, M. Gross, and H. Theisel. Generic objective vortices for flow visualization. ACM Trans. Graph., 36(4):141:1–141:11, July 2017. doi: 10 . 1145/3072959 . 3073684
- [9] G. Haller. An objective definition of a vortex. Journal of Fluid Mechanics, 525:1–26, 2005. doi: 10 . 1017/S0022112004002526
- [10] G. Haller. Lagrangian coherent structures. Annual Review of Fluid Mechanics, 47:137–162, 2015.
- [11] G. Haller, N. Aksamit, and A. P. Encinas-Bartos. Quasi-objective coherent structure diagnostics from single trajectories. Chaos: An Interdisciplinary Journal of Nonlinear Science, 31(4), 04 2021. 043131. doi: 10 . 1063/5 . 0044151
- [12] G. Haller and G. Yuan. Lagrangian coherent structures and mixing in two-dimensional turbulence. Physica D: Nonlinear Phenomena, 147(3–4):352–370, 2000. doi: 10 . 1016/S0167-2789(00)00142-1
- [13] J. Helman and L. Hesselink. Representation and display of vector field topology in fluid flow data sets. Computer, 22(8):27–36, 1989. doi: 10 . 1109/2 . 35197
- [14] J. Helman and L. Hesselink. Visualizing vector field topology in fluid flows. IEEE Computer Graphics and Applications, 11(3):36–46, 1991. doi: 10 . 1109/38 . 79452
- [15] H. JCR, A. Wray, and P. Moin. Eddies, stream, and convergence zones in turbulent flows. Center for turbulence research report CTR-S88, pp. 193–208, 1988.
- [16] J. L. W. V. Jensen. Sur les fonctions convexes et les inégualités entre les valeurs Moyennes, Nov. 1906. doi: 10 . 1007/bf02418571
- [17] J. Jeong and F. Hussain. On the identification of a vortex. Journal of fluid mechanics, 285:69–94, 1995.
- [18] J. Kasten, C. Petz, I. Hotz, B. R. Noack, and H.-C. Hege. Localized finite-time Lyapunov exponent for unsteady flow analysis. In M. Magnor, B. Rosenhahn, and H. Theisel, eds., Vision Modeling and Visualization, vol. 1, pp. 265 – 274, 2009.
- [19] S. Kullback and R. A. Leibler. On Information and Sufficiency. The Annals of Mathematical Statistics, 22(1):79 – 86, 1951. doi: 10 . 1214/aoms/1177729694
- [20] J. Lin. Divergence measures based on the shannon entropy. IEEE Transactions on Information Theory, 37(1):145–151, 1991. doi: 10 . 1109/18 . 61115
- [21] B. Nsonga, M. Niemann, J. Fröhlich, J. Staib, S. Gumhold, and G. Scheuermann. Detection and visualization of splat and antisplat events in turbulent flows. IEEE Transactions on Visualization and Computer Graphics, 26(11):3147–3162, 2020. doi: 10 . 1109/TVCG . 2019 . 2920157
- [22] A. Okubo. Horizontal dispersion of floatable particles in the vicinity of velocity singularities such as convergences. Deep Sea Research and Oceanographic Abstracts, 17:445–454, 1970. doi: 10 . 1016/0011-7471(70)90059-8
- [23] S. Popinet. Free computational fluid dynamics. ClusterWorld, 2(6), 2004.
- [24] M. Schlemmer, M. Heringer, F. Morr, I. Hotz, M. Hering-Bertram, C. Garth, W. Kollmann, B. Hamann, and H. Hagen. Moment invariants for the analysis of 2d flow fields. IEEE Transactions on Visualization and Computer Graphics, 13(6):1743–1750, nov 2007. doi: 10 . 1109/TVCG . 2007 . 70579
- [25] M. Schlemmer, I. Hotz, B. Hamann, and H. Hagen. Comparative visualization of two-dimensional flow data using moment invariants. In M. A. Magnor, B. Rosenhahn, and H. Theisel, eds., 14th International Workshop on Vision, Modeling, and Visualization, VMV 2009, November 16-18, 2009, Braunschweig, Germany, pp. 255–264. DNB, 2009.
- [26] C. E. Shannon. A mathematical theory of communication. The Bell System Technical Journal, 27(3):379–423, 1948. doi: 10 . 1002/j . 1538-7305 . 1948 . tb01338 . x
- [27] A. Wiebel, C. Garth, and G. Scheuermann. Localized Flow Analysis of 2D and 3D Vector Fields. In K. Brodlie, D. Duke, and K. Joy, eds., EUROVIS 2005: Eurographics / IEEE VGTC Symposium on Visualization. The Eurographics Association, 2005. doi: 10 . 2312/VisSym/EuroVis05/143-150
- [28] A. Wiebel, C. Garth, and G. Scheuermann. Computation of localized flow for steady and unsteady vector fields and its applications. IEEE transactions on visualization and computer graphics, 13:641–51, 07 2007. doi: 10 . 1109/TVCG . 2007 . 4293009
- [29] Z. Wu, Y. Xu, W. Wang, and R. Hu. Review of shock wave detection method in cfd post-processing. Chinese Journal of Aeronautics, 26(3):501–513, 2013. doi: 10 . 1016/j . cja . 2013 . 05 . 001