Showdown Data Set 5: Plasma Simulation on Poloidal Grids

Visualization by Frank Suits

Summary

Key concepts shown by Data Explorer:

  1. Creating a large tetrahedral mesh from points in space given specific rules defining their connectivity.
  2. Mapping the resulting space filling data onto arbitrary query surfaces: lines, planes and tori.
  3. Algorithmic "looping" in the visual programming environment to build connectivity arrays based on rules.
  4. Using categorical tools to uniquify and remap position and connection arrays.
  5. Understanding the data by creating quick "scratch" visualizations to see patterns and structure.
  6. No custom code needed for import or visualization: data import, gridding, and visualization all done in the visual programming environment


View of the final connected toroidal volume, showing data mapped onto slices and an inner, centered toroidal surface.


Raw view of the input positions with color based on data. The visual program to see this took approximately ten minutes to create.


Close up of one slice of the data, showing its 7329 points in a grid of concentric circles.

The goal is not only to triangulate each of the 40 slices, but to connect them in a tetrahedral mesh. We can't simply connect each disk individually since triangles may appear that span more than two radial grids.


Map the positions into a rectilinear grid, with theta horizontal and radius vertical.

The radius values must be binned so that the y-coordinate is exactly the same for all points on a horizontal grid line.


Connect the entire set of points without regard for extraneous triangles on the sides.


Close-up of the lower corner, showing extraneous triangles.


Cull the unwanted triangles.

Culling is done by checking the vertices of each triangle and removing any that span more that two radial grids. This will not leave holes since all the interior triangles span exactly two grid lines. Culling is done by a simple "Compute" and "Include."


Close-up of the lower corner, now with no extraneous triangles.


Replace the positions with their original values, warping the grid back to its original shape.

Also, the two outer edges were "stitched" by simply extracting the left and right edge positions and trianglulating them from top to bottom.


View of two triangular prisms, each split into three tetrahedra.

Now that each disk has been triangulated we need to form triangle prisms that connect one disk to the next. The rules for connecting one disk to another were sketched by the person providing the data. Apparently each position is paired with its appropriatly offset (by 7329) twin in the next disk, except for the first two disks, for which special shifts must be applied. This is all because the radial grids are rotating at different rates as you go around the torus.

Not only must the vertices of each triangle be paired with their twins in the next surface to make a triangular prism (skewed due to differential rotation of the grids), but each prism must be broken down into three constituent tetrahedra in a way that guarantees the results will "neighbor" each other, i.e. any interior tetrahedral face will correspond to one of the triangles of its neighboring tetrahedra. This will allow the data to fill the space without gaps, resulting in smooth isosurfaces and the ability to map data onto arbitrary query surfaces.

The two prisms shown above correspond to the only two types in the data set: "up," with its base on a radial grid and the odd vertex pointing up, or "down," with the base on a radial grid and the odd vertex pointing down. Here "up" and "down" correspond to the radial direction. From careful study of the image above, you can see that as long as the prisms are decomposed into tetrahedra exactly as shown, then "up" prisms will properly neighbor all the adjacent "down" prisms, and vice-versa.

Identifying the direction of each triangle and creating the appropriate tetrahedra is done with a few "Compute" modules operating on the positions.


Boundary of one tetrahedral segment connecting one disk to the next.


Close-up of segment edge.


Close-up of inner region.


Side view of tetrahedral segment.


Slice at end of tetrahedral segment, showing original triangle connections.


Slice just in from end of segment, showing thin triangles from neighboring tetrahedra.


Final result, showing torus with two isosurfaces and multiple slices.


Data mapped onto arbitrary plane.


Data mapped onto constructed inner torus.


Times to create and execute visualization

  1. Ten minutes to import the data and get a quick view of the colored positions.
  2. Approximately two days to create the mesh. Much of this time was wasted because I thought the index shift had to be applied between each pair of disks, which resulted in convoluted meshes. At no point did I contact the data provider for clarification on the rules for connecting disks.
  3. Once the mesh was created, the visualizations were done in a few hours. Straightforward isosurfaces, mapping, coloring, etc.
  4. The entire mesh was created without corrupting the indices into the original data arrays, so that other time steps drop directly into the mesh. Since the original mesh had redundant positions and all connections had to be to a unique position list, special handling was done to guarantee referencing a unique list of positions.
  5. No C-code or external programming was needed. Several resuable utility macros for creating and manipulating the tetrahedra were created that may have general application.