Data Visualization CSS543
Coursework 1 - Double Glazing Visualization

1. Introduction

The subject of this reort is to visualize the air flow with influences of temperature and pressures within the cavity. The situation which could be encountered with double glazing where the air flows between two plates, where one is hot and the other is cold. The input data which is collected from simulation process provides information on temperature, pressure and velocity of the air flow on a grid of 18 x 18 x 10 points. The use of proper visulization techniques such as slicing, isosurfacing, and stream tubes greatly enhance the engineer understanding of the cavity's temperature, pressure, air flow velocity and how they affect each other within the cavity.

VTK 4.0 is used to implement the visulization techniques and the VTK program is written using Tcl/Tk 8.3 Wrapper under Red Hat Linux 7.3 environment.


2. Importing Data

The input data file dglazing.dat, contains one line for each point:
XYZTemperaturePressure
However, the format of the input data shown above does not suitable for VTK processing where further re-organizing of the data is required. Therefore we have applied VTK dataset format to re-organize the data. We are using Structured Points dataset format to organize the data as 3D structured point datasets accordingly to 18 x 18 x 10 dimension. The Structured Points dataset are organized as ASCII format file with point attributes of scalars(temperature and pressure) and vectors(velocity). Below is the snip code of our re-organized input data file:
VTK HeaderScalar Attributes Vector Attributes
# vtk DataFile Version 2
Thermally Driven Cavity
ascii
DATASET STRUCTURED_POINTS
DIMENSIONS 18 18 10
ORIGIN 0 0 0
SPACING 1 1 1
SCALARS pressure float
LOOKUP_TABLE default
0.00E+00
0.00E+00
0.00E+00
0.00E+00
0.00E+00
0.00E+00
VECTORS velocity float
0.00E+00 0.00E+00 0.00E+00
0.00E+00 0.00E+00 0.00E+00
0.00E+00 0.00E+00 0.00E+00
0.00E+00 0.00E+00 0.00E+00
0.00E+00 0.00E+00 0.00E+00
0.00E+00 0.00E+00 0.00E+00
0.00E+00 0.00E+00 0.00E+00


3. Exploring the Temperature Distribution


Figure 1A

Figure 1B
Red-1, Blue-0
From both images above, red color depicts hotter temperature while the blue color shows cooler temperature. The animation GIF file 1A shows clearly the flow of normalized temperature across the cavity by running slicing plane(probing). The 2D slicing method is applied on X, Y and Z planes to allow the engineer to view the temperature distribution within the 3D volume cavity. From the slicing animation, we can clearly identify that the steady behaviour of temperature distribution within the cavity where hot and warm temperature concentrated at each plane.

However, from the Figure 1B which is showing the isosurface for the normalised temperature ranging from 0 to 1, we may discover the shape of isosurface and the temperature distributed not uniformly. The lowest temperature area(blue) is concentrated bottom right near the cold plate and the highest temperaure area(red) concentrated top left conner near the hot plate. In addition, we also discover that hot temperature area at the bottom gets cold faster compared to other area and this may be caused by the pressure distribution and the flow of hot air. The 0.5 value of temperature isosurface is highlighted in the generated VRML object shows the temperature a shape of inverted letter S distribution within the volume. The isosurface is generated by using Marching Cube algorithm that is only available in VTK 4.0.



4. Exploring the Pressure Distribution


Figure 2A

Figure 2B
Red-1, Blue-0

The pictures above shows the distribution of pressure within two plates, each hot and cold at alternate plate. The isosurface of temperature distribution in Figure 2B shows higher pressure at the top than the bottom. However, only small area at left top conner in the cavity is having higher pressure distribution. This fenomena shows higher pressure area exist near the hot plate. At the middle of the cavity, the pressure is nearly close to 0 and this fenomena again proves the temperature does affect the pressure distribution as the temperature at this area is neither hot nor cold. Therefore, we may deduce that high temperature may resulted in high pressure as well and vice versa.



5. Exploring the Air Flow


Figure 3
Red-1, Blue-0

In order to visualize the air flow within the cavity, we are using streamtubes from particle advection method to visualize the steady air flow. Below is the basic steps required to generate the streamtubes from the given vectors:

a) Scalar value of the air flow speed(magnitude) is derived from the given vectors by using formula:
speed = sqrt((Vx*Vx) + (Vy*Vy) + (Vz*Vz)) [1]

b) The derived speed scalar value and vectors are organized into a VTK data file as similar structure points shown above.

c) We may start to visualize the air flow by seeding the streamtubes with a spherical cloud of points which is referred as rake points.

From the Figure above, we may see that the streamtubes started approximately in the center of the cavity. The path of the seeding particles are traversed by trilinearly interpolating the velocity vectors at each particle location, and then integrates the velocity vectors along its path by using Runge-Kutta's 4th Order integration scheme. The starting point above is actually the critical point where we need to run isosurfacing method to identify the critical point in the cavity. This is quite simple where we need only to identify the isosurface of iso value near to 0 to identify the critical point. On the other words, in order to locate the critical point, we need to identify the velocity magnitude which is the speed near to 0. Thus, the color of the streamtube near to the spherical cloud seed points(critical point) is blue which refers to lower value of speed. The derived speed values are mapped in the range of 0 to 0.371.

Once the critical point is identified, we may start to render the streamlines by integrating the vectors. In this piece of work, we are using Runge-Kutta 4th Order integration and small value of integration step length to generate more precise streamlines. Runge-Kutta 4th Order integrates the vectors more accurate compared to 2nd Order or Euler's method. In addition, small integration step length also greatly improve the quality and precise stream lines. At each timestep, all seeding particles position are updated.

Once the streamlines are generated, they are wrapped with tubes. The radius size of the tubes are vary according to vector's value. The higher vector values are represented by tubes with bigger radius size. On the other hand, the color of the streamtubes is representing the speed magnitude associate with the corresponding vector.

From the figure above, we can identify that the air flow achieve greatest magnitude of speed near to the hot plate. The air flows circularly in between hot and cold planes in the close-wise manner. The air flows steadily with constant magnitude speed in both top and bottom of the cavity.



6. Visualizing all components working together

Firstly, it is noticable that the air flows downward near the cold plate and flows upward near the hot plate. This explains that hot air will flow upward and cold air flows downward. Besides that, it is also proves that the temperature is distributed from hot area to cooler area to balance up the total cavity's temperature. As we observed from isosurfacing simulation on pressure distribution, the highest pressure distribution is concentrated at top left conner of the cavity. Similarly, the highest air speed and temperature also appeared in the same area. The high temperature fenomena exists in that area because the air has travelled along the hot plate and accumulated heat from the plate. Consequently, the pressure increases as the temperature increases. The inverted case of hot plate applies on the cold plate. Note that there is only a few air flow in the middle of the cavity, the temperature and pressure distibuted constantly.

As the given data is representing half of the cavity, the symetry exists in the XY direction.