visibility ordering, Shirley and Tuchman (1990) presented the Projected ..... The authors would like to thank Mr. Yunhai C. Wang and Dr. David Henry Porter.
Volume Rendering Visualization of 3-D Spherical Mantle Convection with an Unstructured Mesh Shi Chen (1), Huai Zhang (1), David A. Yuen (2) , Shuxia Zhang (3) , Jian Zhang (1), Yaolin Shi (1)
(1) Laboratory of Computational Geodynamics Graduate University of Chinese Academy of Sciences 19A Yuqanlu Ave. 100049 Beijing, China (2) Dept. of Geology and Geophysics, Laboratory of Computing Science and Engineering and Minnesota Supercomputing Institute, University of Minnesota Minneapolis, MN 55455 U.S.A. (3.) Minnesota Supercomputing Institute University of Minnesota Minneapolis, MN 55455 U.S.A.
Submitted to Visual Geosciences, April ,2008.
ABSTRACT We propose a new approach to utilize the algorithm of Hardware-Assisted Visibility Sorting (HAVS) in the 3-D volume rendering of spherical mantle convection simulation results over unstructured grid configurations. We will also share our experience in using three different spherical convection codes and then taking full advantages of the enhanced efficiency of visualization techniques, which are based on the HAVS techniques and related transfer functions. The transfer function is a powerful tool designed specifically for editing and exploring large-scale datasets coming from numerical computation for a given environmental setting , and generates hierarchical data structures ,which will be used in the future for fast access of GPU visualization facilities. This method will meet the coming urgent needs of real-time visualization of 3-D mantle convection, by avoiding the demands of huge amount of I/O space and intensive network traffic over distributed parallel terascale or petascale architecture. Keywords: Volume Rendering, Visualization, Mantle Convection, Unstructured Mesh
1. INTRODUCTION Since the late 1960’s ( Torrance and Turcotte, 1971; Mc Kenzie et al., 1974) numerical modeling of mantle convection has developed a rich history . For numerical simulation of the mantle convective process, the spherical coordinate system is often employed for global geodynamical problems, such as, the coupled modeling of global plate tectonic with mantle convection physics, the multi-scale investigate of the D’’ layer and core-mantle boundary characteristics, the global 670 km discontinuity boundary atop the lower mantle, (Gable et al, 1991; Honda et al., 1993 , King et al, 1992; Tackley et al, 1998; Kameyama et al, 2006). Rapid progress of modern computing technologies is providing us with effective means for improving greatly the quality of spatial resolution and reduction in the runtime of our numerical models. Faced with the imminent threat of data tsunami produced by the evergrowing speed of multicore-computer technology, we have now a dire need for a direct and comprehensive method to display seamlessly the 3D spatial and temporal characteristics of physical variables being analyzed (Erlebacher, 2001; Rudolf, 2004; Hansen, 2005), and the demand of affordable and interactive visualization solution for the large-scale numerical simulation datasets is inevitable in geoscience community nowadays. In contrast to the traditional ways of visualization, such as the surface rendering, isoline, isosurface , etc.., the volume rendering technique is becoming more and more attractive to
geoscientists, who are recently making significant inroads into parallel visualization, using software tools such as PV3 and Paraview ( Jordan et al., 1996 ,Moder et al., 2007, Stegman et al., 2008 ). Previously, the multi-isosurface and streamline representation methods have been preferred and they have serve to visualize successfully the 3-D spherical mantle convection (Wang et al, 2007, Moder et al., 2007). These isosurfaces and streamlines can represent volumetric data field(s) on a 3-D surface by interpolating point data on regular or irregular grids. The disadvantage lies in that it lacks of showing successive scalar variations of physical field accurately in three-dimensional space. It is not enough to create one beautiful image from the data. One needs to create hundreds to thousands of such images at a time to make a movie of the simulated mantle convection. Under these circumstances, volume rendering technique has been espoused in recent years for making movies. But three-dimensional volume rendering in the past was costly. For this reason, this procedure was not popular , say six years ago. Volume rendering does not use intermediate geometrical representations as usual. Rather It makes a sharp decision for every voxel on whether or not one iso-surface passes through it and produces false positives (spurious surfaces) or false negatives (erroneous holes in surfaces) simultaneously. Particularly, this is very helpful in the presence of small or poorly defined features of a physical field by offering a distinct possibility for displaying weak or fuzzy surfaces, which may be missed otherwise. This strategy allows for substantial information to be displayed as a whole and enables the researchers to discover new physical phenomena hidden behind these preordained isosurfaces, which are strictly enforced in surface rendering. In the past few years volume rendering of regular grids and texturebased techniques is becoming more mature and easier to deploy. However, it is still very difficult to implement effective algorithms of volume rendering on unstructured grids or meshes from finite element method or finite volume method. The main difficulties lie on how to obtain accurate order visibility for each cell. One 3D interpolation algorithm was proposed in this paper to fulfill the transform from the unstructured grids (meshes) to uniform grids. However, this resampling process is computationally intensive and also results in numerical artifacts. Therefore it still poses a very big obstacle for efficient volumetric visualization, which is a first step toward interactive visualization ( Damon et al, 2008 ) To solve these problems from volume rendering of irregular grids and visibility ordering, Shirley and Tuchman (1990) presented the Projected Tetrahedra (PT) algorithm for the rendering tetrahedral cells. Williams (1992) also proposed the Meshed Polyhedra Visibility Ordering (MPVO) algorithm for getting the visibility order of cells before rendering them. In theory, the efficiency of MPVO algorithm is not satisfying and leads to longer rendering overhead in the runtime . We have investigated these novel volume rendering techniques and found that the Hardware-Assisted Visibility Sorting Technique (Callahan et al, 2005) was suitable for implementing visualization of mantle convection results over large unstructured meshes in spherical geometry.
Our main objectives of this paper are on how to implement the visualization of three-dimensional mantle convection on unstructured tetrahedral meshes and to present our experience in using these techniques in the Laboratory for Computational Science and Engineering (LCSE) in the University of Minnesota. Our paradigm of numerical mantle convection simulation involves three main numerical methods, as shown in Figure 1. Our computation was conducted at the BladeCenter of Minnesota Supercomputer Institute ( MSI ). The visualized technique employed the Hardware-Assisted Visibility Sorting (HAVS) for volume rendering (Callahan et al, 2005). Current version of HAVS uses the tetrahedron as the base cell for the volume rendering of unstructured meshes . The source code and compiled programs are freely available on the Internet (http://havs.sourceforge.net).
Figure 1. Overview of the visualization of 3D mantle convection with unstructured meshes.
2. Numerical Methods used in Mantle Convection Realistic mantle convection is a strongly coupled nonlinear system, which can be described by three governing nonlinear partial differential equations, the conservation laws of mass, momentum, and energy (McKenzie et al, 1974). The effects of Earth mantle’s heterogeneously distributed rheology can be characterized with its strong temperature, pressure and stress dependence (Zhong and Gurnis 1996), the dynamical effects of phase transitions (Schubert et al, 1975) and multi-component chemical flow (Zhong S, 2006). Different numerical approaches with unstructured meshes have been utilized to address these problems. The unstructured meshes can be employed to express the majority of the physical phenomena. The transformation between the different kinds of meshes is more easy and affordable than the computational time spent in doing the 3-D spatial interpolation. 2.1 Spectral method The spectral method deserves great merit because it has a higher accuracy than other numerical methods for the same number of grid points, but only for constant or depth-dependent physical properties. Zhang and Christensen (1993) have designed a 3-D code for spherical geometry based on higher-order finite difference method (Fornberg, 1995) and spectral expansion in the field variables in spherical harmonics along the circumferential directions. They also developed an iterative technique for solving the problem of lateral variable viscosity contrast up to 200 (Zhang and Yuen, 1996). For the mantle convection problem, spherical harmonics for the 3-D spherical shell can be used to express the horizontal dependence of mantle rheology. However, there are still some disadvantages for the spectral method, such as it cannot describe more realistic mantle convection problems and more complex heterogeneous material properties, such as non-Newtonian rheology and slab-like geometries near subduction zones. We use this 3-D spherical spectral finite-difference code of mantle convection to generate the numerical simulation result data. The generated data size is 257 ialong the longitude, 257 along the latitude and 34 in the radial direction. The data is based on the curvilinear coordinate systems. The data format does not fit the uniform requirement for traditional volume rendering. But for the size of this dataset, if using the resample method to get uniform mesh, it is very difficult. Therefore, we can directly use the HAVS technique to accelerate the process of volume rendering. But for using HAVS method, first we need to construct a tetrahedron mesh. More details about how to employ the HAVS technique are presented in the section 3. 2.2 Finite Volume method with ACuTEman
The finite volume method is a powerful numerical method for solving differential equations with strong nonlinearity and hyperbolic characteristics (Patankar, 1980). It also shares common merits with finite element and finite difference methods. According to this method, the discrete equations, second-order correct, are obtained by integrating equations over a control volume or cell. In the field of 3-D mantle convection numerical simulation, Kameyama et al.(2007) has devised a new simulation code of mantle convection in a three-dimensional spherical shell named as ACuTEMan. The major innovation of the code is that it has used two techniques as Yin-Yang Grid (A. Kageyama and T. Sato, 2004.) and ACuTEMan (M. Kameyama, A. Kageyama, and T. Sato,2006.) algorithm. The YinYang grid is an effective spatial discretization procedure which involves overlapping of two grids on spherical geometry whose boundaries resemble the seams of a baseball, shown in figure 2. This method overcomes the problem of the polar singularity inherent in spherical harmonic expansion. The ACuTEman algorithm , originally written for a Cartesian geometry , has recently been redesigned for large-scale spherical mantle convection problems.
Figure 2. The Yin-Yang mesh Scheme for spherical geometry In this section, we present a feasible approach for volume rendering, using the data generated from the ACuTEman (Kameyama, 2006) program. This program is different from the previous method in terms of the Yin-Yang grid processing, being used here. We need to combine the first two parts of Yin-Yang grid as one volumetric dataset and then re-mesh this to tetrahedral cells . To achieve this goal, we have employed the Amira software to pre-process the dataset format firstly. Amira is a comprehensive commercial tool for Geosciences Visualization. It was developed by Mercury Computer Systems, and available for Windows, Uni, Linux, and Macintosh (http://www.tgs.com) platforms. There are hundreds of modules within the entire software packages. In our case, we only used the LatToHex and HexToTet modules to re-mesh and apply a hybrid module for assembling together the Yin-Yang grid (Fig.3 a). After
assembling the Yin-Yang grid, we then used GridEditor tool for optimized the intersection of re-mesh cells (shown as Figure 3 b). We need to carry out a smoothing process for visualization in the part of intersection. Figure 3(c) and Figure 3(d) show the results of the combined grid using data smoothing process. Finally, the structured meshes in spherical system are transformed to the tetrahedral meshes.
(a)
(c)
(b)
(d)
Figure 3. pre-processing of the Yin-yang mesh
2.3 Finite element method with Citcoms The finite element method (FEM) is very effective in solving differential equations with complicated geometry and variable material properties, in this vein we employ the CitcomS (Moresi and Solomatov, 1995), which was developed by Louis Moresi (1995), to simulate mantle convection process in this section. Citcoms is a robust finite element package with the capability of solving thermal convection problem within a spherical shell. In the specifications of Citcoms, many parameters can be defined for simulating realistic mantle convection problem. Figure 4 (a) is one cap for regional convection computation and Figure 4 (b) shows how to combine the total 12 caps into a single spherical convection model.
The datasets used in this paper came from the incompressible mantle
Figure 4. The one cap and full model scheme in Citcoms (Tan E et al., 2007) convection model with Stokes equation and temperature-dependent viscosity. The Rayleigh number is 5×108, and the full model consists of 12 caps for parallel computing. The resolution of each cap is 33×33×65 points. For each cap, we need to generate the tetrahedral cells using the Amira modules. The process is similar to the methods described in the previous section (shown as in Figure 3). Because there is no intersection among the 12 caps, the pre-processing can be fulfilled easily by a method consisting of a combination of several directed steps.
(a)
(b)
Figure 5. The one cap and full model scheme
3 Strategy of Volume Rendering with Unstructured Mesh Volume rendering technique is widely used to display the 3-D discrete scalar fields. The optical model equation has been used to create an image. Image
processing is used to integrate the individual contribution from the object space to the image space along the viewing ray direction, using front-to-back or backto-front compositing algorithms. Direct volume rendering technique is more effective than the traditional isosurface operation for visualization of a scalar field. However, this method requires each sample value to be mapped to opacity with a certain color scale. This technique is accomplished with a “transfer function” , which can be a simple ramp, a piecewise linear function or an arbitrary table. Once converted to a RGBA (for red, green, blue, alpha) value, the composed RGBA result is projected with correspondence of the frame buffer pixels. However, for unstructured gird, the sample value and composed RGBA result and pixel projection are considerably complicated. The Projected Tetrahedral Algorithm ( Shirley P and Tuchman A, 1990 ) was the first solution for rendering tetrahedral cells using the traditional method. It appears that, the imaging speed will depend on the algorithm validity. With modern GPUs, Farias et al. (2000) has presented a new volume rendering algorithm for projection of unstructured volume rendering. Based on Farias’s work, Callahan et al. (2005) developed a new technique that uses rendering calculation and distributes part of this task to CPU, and then uses the GPU to complete the entire task. We will now put forward a new concept, which we will call “k-buffer” (Figure 6).
Figure 6. The HAVS Solution for Unstructured Mesh (Callahan et al., 2005 ) In this section, we present a simple flowchart (Figure 7) to show the implementation of visualizing of mantle convection simulation results. The entire process employed the Amira software for pre-processing and constructed the lookup table, afterwards the volume rendering was finished by the HAVS technique. For the different datasets generated by the various programs, we only need to consider how to rapidly obtain the requirement cells for HAVS algorithm. The transfer function can be conveniently acquired by using the colormap editor of provided by Amira modules, which was fully discussed in section 4.
Figure 7. Flowchart of Volume Rendering
Based on the above discussion, and after some practice, we gained deep experience on how to utilize HAVS technique for making interactive visualization of mantle convection. The rendering performance of HAVS is acceptable for our large scale dataset generated by the three software packages for the mantle convection problems. The time of rendering with 10 million tetrahedral cells is about 5-6 seconds on our workstation (SUSE Linux, AMD 64 bits duo core, Nvidia Quadro 256M graphic card). Figure 8 shows that it appears difficult to find some artifacts in the rendering result. For future research in interactive visualization, we will be able to change easily the LUT setting to explore the interesting features for the dataset of mantle convection. The time taken of the entire process is not so long. 4 Transfer Function designed for Specific Features of Mantle Convection The transfer function describes the mapping from grid values to renderable optical properties,such as the opacity, color field, emittance etc. An evident characteristic of the transfer function for volume rendering can be described as a time-consuming and not intuitive task. For the mantle convection problems, our main objective is to find the specific features of the convection pattern, such as the vertical boundary layers of plumes and slabs.
Figure 8. The result with 10 million grid points on an unstructured Mesh
In general, the audience looks at the upwelling, downwelling structures and detailed local features such as the eruption of boundary layer instabilities. Therefore, the transfer functions with different characteristics are required to direct volume rendering, and it can be either generated automatically or edited interactively using an intuitive color-map editor. In this paper, we employed Amira to create a transfer function. Using the color-map editor of Amira, we can semi-automatically edit the opacity and RGB color associated with the histogram of the original data values. Based on the instructions of Amira for the “am” file format of color-map, we can obtain the result of lookup table and convert it to input HAVS program consequently. Figure 9 shows a snapshot of the upwelling pattern associated with the colormap setting of Amira. It presented the illustrative specific features of mantle convection. Using the appropriate opacity strategy, we can explore the upwelling characteristics easilly. Figure 10 is another color-map setting for the same dataset. In these two figures, the black line of left figure expresses the opacity, the red line, green line and blue line express ‘R’, ‘G’ and ‘B’ colors. From the comparison between these two black lines, we find that the opacity of the low value region in Figure10 is wider than that of Figure 9. the opacity of the high value region in the Figure 10 has been entirely suppressed. Thus far, the transfer function can help us explore the specific convection features much more effectively.
Figure 9. The Colormap and the hot upwelling features. 257x257x34 points were used in the visualization grid.
Figure 10. Colormap and the cold downwelling features. Same number of points used for visualization as in Fig. 9. 5. Discussion and Perspectives We have discussed some of the problems arising from implementing volume rendering with unstructured mesh in spherical geometry , using the HAVS technique. Three approaches of numerical simulation of mantle convection have been applied for the volumetric visualization tests. Our experience has shown that the technique of HAVS is feasible for visualization of the 3-D datasets
generated by these numerical simulation codes. This HAVS’s strategy can also take full advantage of the GPU’s powerful capabilities effectively, and the entire visualization process can then be accelerated. The transfer function setting of Amira package can help us further in the future to explore the interesting features hidden in the volumetric datasets. These concepts were demonstrated by our actual visualization experiments. In coming work, more effective methods should be explored and be implemented in the near future, such as the capability to edit the color-map automatically by using ambiguous or specified rules, and this improvement can lead to expansion of the compatible file formats on the basis of HAVS technique. By doing this we can take a step in the right direction of visualization in 3-D spherical mantle convection. Such a tack will bode well for us in the future, especially in light of recent proliferation of GPU cards. Acknowledgements The authors would like to thank Mr. Yunhai C. Wang and Dr. David Henry Porter from M.S.I. for constructive discussions. We acknowledge that Dr. Masanori C. Kameyama has kindly provided us with his AcuteMan code. We thank Ms. Stephanie Chen for technical assistance. This project is jointly supported by National Basic Research Program of China (2004cb408406) and National Science Foundation of China under grants number (40774049, 40474038). The parallel simulation program is supported by Supercomputing Center of Chinese Academy of Sciences (INF105-SCE-02-12). Dr. David A. Yuen thanked NSF for support in CMG and ITR programs. References Callahan. S and Ikits.M and Comba.J and Silva.C, 2005. Hardware-Assisted Visibility Ordering for Unstructured Volume Rendering. IEEE Transactions on Visualization and Computer Graphics, 11(3), 285-295. Callahan. S and Comba.L and Shirley.P and Silva.C, 2005. Interactive Rendering of Large Unstructured Grids Using Dynamic Level-of-Detail. Proceedings of IEEE Visualization '05, 199-206. Callahan. S and Bavoil.L and Pascucci.V and Silva.C, 2006. Progressive Volume Rendering of Large Unstructured Grids. IEEE Transactions on Visualization and Computer Graphics, 12(5). Damon.M.R, Kameyama.M, Knox.M, Porter.D, Yuen. D, Sevre.E, 2007. Interactive Visualization of 3-D Mantle Convection. Visual Geosciences, 10, Springer. Erlebacher C, Yuen DA, and Dubuffet F (2001) Current trends and demands in visualization in the geosciences. Visual Geosciences 6: 59 (doi:10.1007/s10069001-1019-y).
Gable CW, O’Connell RJ, and Travis BJ (1991) Convection in three dimensions with surface plates: Generation of toroidal flow. Journal of Geophysical Research 96: 8391–8405. Hansen CD and Johnson CR (eds.) (2005) The Visualization Handbook, 962 pp. Amsterdam: Elsevier. Honda,S, Yuen, D.A., Balachandar,S. and D.M. Reuteler,(1993),Three dimensional Instabilities of mantle convection with multiple phase transitions, Science, Vol. 259, No. 5099, 1308-1311. Jordan, K.E., Yuen, D.A.., Reuteler, DM., Zhang, S., Haimes, R., 1996. Parallel interactive visualization of 3d mantle convection. Computational Science and Engineering, IEEE 3, 29–37. King SD, Gable CW, and Weinstein SA (1992) Models of convection-driven tectonic plates: A comparison of methods and results. Geophysical Journal International 109: 481–487. Kameyama M.C. and Yuen DA (2006) 3-D convection studies on the thermal state of the lower mantle with post perovskite transition. Geophysical Research Letters 33 (doi:10.1029/ 2006GL025744). Kameyama, M.C.,2005. ACuTEMan: A multigrid-based mantle convection simulation code and its optimization to the Earth Simulator, Journal of the Earth Simulator, 4, 2–10. Kameyama M., Kageyama A., & Sato T., 2005. Multigrid iterative algorithm using pseudo-compressibility for three-dimensional mantle convection with strongly variable viscosity, J. Comput. Phys., 206(1), 162–181. Kameyama M.C., & Yuen D.A., 2005. Enhanced Heating by Post-Perovskite Phase Transition: Implications for the Thermal and Mechanical State in the Lower Mantle. Proceedings from AGU Fall Meeting, MR23B-0062. McKenzie DP, Roberts JM, and Weiss NO, 1974. Convection in the Earth’s mantle: Towards a numerical solution. Journal of Fluid Mechanics 62: 465–538. Moder,C., Bunge, H.P., Igel, H. and B. Schuberth, (2007)Visualization in the Geosciences with Paraview in Proceedings of the 4th High-End Visualization Workshop, edited by W. Benger, R. Heinzl, W. Kapferer, W.Schoor,M. Tyaki, S. Venkataraman and G. Weber, pp. 147-156, Lehmanns Media, Berlin, ISBN:9783865412164. Moresi LN and Solomatov VS, 1995. Numerical investigation of 2D convection with extremely large viscosity variation. Physics of Fluids, 9: 2154–2164. Rudolf M, Gerya TV, Yuen DA, and De Rosier S (2004) Visualization of multiscale dynamics of hydrous cold plumes at subduction zones. Visual Geosciences 9: 59–71. Shirley P and Tuchman A , 1990. A Polygonal Approximation to Direct Scalar Volume Rendering. Proc. San Diego Workshop Volume Visualization, 24(5): 6370. Schubert G, Yuen DA, and Turcotte DL,1975. Role of phase transitions in a dynamic mantle. Geophysical Journal of the Royal Astronomical Society, 42: 705–735.
Silva.C and J. Comba and S. Callahan and F. Bernardon, 2005. GPU-Based Volume Rendering of Unstructured Grids. Brazilian Journal of Theoretic and Applied Computing, 12(2), 9-29. Stegman, D.R., Moresi, L., Turnbull, R., Giordani, J., Sunter, P., Lo, A. and S. Quenette, gLucifer: Next Generation Visualization Framework for High performance computational geodynamics,(2008) Visual Geosciences, in press. Tackley PJ (1998a) Three-dimensional simulations of mantle convection with a thermo-chemical basal boundary layer: D''. In: Gurnis M (ed.) The Core–Mantle Region, pp. 231–253. Washington, DC: AGU. Torrance KE and Turcotte DL, 1971. Thermal convection with large viscosity variations. Journal of Fluid Mechanics 47: 113–125. Tan E, Gurnis M, Armendariz L, Strand L, Kientz S, 2007. CitcomS User Manual Version 3.0.1, 25 pp,http://www.geodynamics.org Zhang S and Christensen U, (1993). Some effects of lateral viscosity variations on geoid and surface velocities induced by density anomalies in the mantle. Geophysical Journal International 114: 531–547. Zhang S and Yuen DA, (1995). The influences of lower mantle viscosity stratification on 3-D spherical-shell mantle convection. Earth and Planetary Science Letters, 132: 157–166. Zhang,S. and Yuen,DA, (1996). Various influences on plumes and dynamics In time-dependent compressible convection in spherical shell, Phys. Earthe Planet. Inter., 94, 241-267. Zhong S, 2006. Constraints on thermochemical convection of the mantle from plume heat flux, plume excess temperature and upper mantle temperature. Journal of Geophysical Research, 111: B04409 (doi:10.1029/2005JB003972). Zhong S and Gurnis M, 1994. The role of plates and temperature-dependent viscosity in phase change dynamics. Journal of Geophysical Research, 99: 15903–15917. Wang S.M., Zhang SX and Yuen DA, 2007. Visualization of downwellings in 3-D spherical mantle convection. Physics of the Earth and Planetary Interiors. 163:299–304 Williams PL, 1992. Visibility-Ordering Meshed Polyhedra. ACM Trans. Graphics, 11(2):103-126.