# Grid Systems

#### Table of Contents

People who are new to computational modeling may be a little bewildered—even intimidated—by the process known as grid generation. This note describes the most common types of three-dimensional grids with comments on their advantages and disadvantages.

Gridding is the process of subdividing a region to be modeled into a set of small control volumes. Associated with each control volume are one or more values of the dependent flow variables (e.g., velocity, pressure, temperature, etc.) Usually these represent some type of locally averaged values. Numerical algorithms representing approximations to the conservation laws of mass, momentum, and energy are then used to compute these variables in each control volume.

## Control Volume Choices

Some computational schemes use grids that deform to follow the motion of a fluid (Lagrangian grids) while others use fixed grids (Eulerian grids). Sometimes a combination is used so that moving grids don’t become too distorted (Arbitrary-Lagrangian-Eulerian grids). In this note we will only address issues associated with the subdivision of space into a set of control volumes and leave the question of moving versus stationary grids for another note.

Grids may be structured or unstructured. A structured grid means that the volume elements are well ordered, and a simple scheme (e.g., I,J,K indices) can be used to label elements and identify neighbors. In unstructured grids, volume elements can be joined in any manner, and special lists must be kept to identify neighboring elements.

## Structured Meshing of Control Volumes

Structured grids come in several varieties, depending on the shape of their elements. The simplest grid is generated from a rectangular box by subdividing it into a set of rectangular elements whose faces are parallel to the faces of the box. Most often the elements are ordered by counting in the x then y and finally the z-direction, so that grid element (I,J,K) would be the i^{th} element in the x-direction, etc.

Grids composed of regular brick elements have the simplest structure since it is only necessary to define three one-dimensional arrays for the x, y, and z values of the surfaces defining the element surfaces. If I,J, and K are the maximum indices in the x, y, and z directions, then the total number of values needed to define the grid is I+J+K. Rectangular grids with slowly varying element sizes also exhibit a regularity that helps to maintain numerical accuracy.

One limitation of rectangular elements is that geometric surfaces are usually approximated by blocking out entire elements, which leads to boundaries having discrete steps. These steps introduce flow losses and produce other undesirable effects (No Loss With FAVOR™).

There are two ways to get better geometric representations of curved obstacle surfaces. One is to deform the grid elements to conform with specified geometric shapes. The resulting elements then have general hexahedral shapes, and the grid is often referred to as a body-fitted grid. Another technique is to keep the rectangular elements but supplement them with some means of defining obstacles cutting through their interiors. A technique of this type, called FAVOR™, is used in * FLOW-3D*. The FAVOR™ method is described in more detail below.

## Rectangular and Deformed Mesh Comparisons

Hexahedral elements require three coordinates to locate each corner point, or 3*(I+1)*(J+1)*(K+1) values for the entire grid, which is much larger than the I+J+K values needed for rectangular grids. In addition, other three-dimensional arrays are usually kept, such as their face areas and volumes, so these quantities don’t have to be constantly recomputed.

This uses a large amount of stored memory and increases memory retrieval times. Although memory is becoming inexpensive, the amount of memory to be retrieved is becoming an important consideration in parallel computing.

The distortion of elements away from a purely rectangular shape has several consequences. For one thing, distortion may reduce numerical accuracy because numerical approximations are no longer centered (or symmetric) about the centroid of the volume element. This drawback, however, may be balanced by the increase in local grid resolution afforded by the distortion.

Another consequence of distortion is that numerical approximations become more complex. Not only must forces and fluxes be converted to normal and tangential components at element faces, but it is generally necessary to include data from all surrounding elements (i.e., the 26 face, edge, and corner neighbors of a hexahedral) in the approximations for a given element. In purely rectangular grids, only the six neighbors having a common face with a given element must be directly coupled.

Another consequence of distortion is that numerical approximations become more complex. Not only must forces and fluxes be converted to normal and tangential components at element faces, but it is generally necessary to include data from all surrounding elements (i.e., the 26 face, edge, and corner neighbors of a hexahedral) in the approximations for a given element. In purely rectangular grids, only the six neighbors having a common face with a given element must be directly coupled.

Finally, it should be noted that it is not always possible to deform a structured rectangular grid into any shape. For example, attempts to deform a straight section into an L-shape results in collapsed or inverted elements in the inside corner. Solutions to this limitation consist of either coupling together more than one structured grid block for a simple kind of unstructuring or resorting to fully unstructured grids.

## Unstructured Meshing of Control Volumes

Unstructured grids have the advantage of generality in that they can be made to conform to nearly any desired geometry. This generality, however, comes with a price. The grid generation process is not completely automatic and may require considerable user interaction to produce grids with acceptable degrees of local resolution while at the same time having a minimum of element distortion. Unstructured grids require more information to be stored and recovered than structured grids (e.g., the neighbor connectivity list), and changing element types and sizes can increase numerical approximation errors.

A popular type of unstructured grid consists of tetrahedral elements. These grids tend to be easier to generate than those composed of hexahedral elements, but they generally have poorer numerical accuracy. For example, it is difficult to construct approximations that maintain an accurate propagation of one-dimensional flow disturbances because tetrahedral grid elements have no parallel faces.

In summary, the best choice for a grid system depends on several factors: convenience in generation, memory requirements, numerical accuracy, flexibility to conform to complex geometries, and flexibility for localized regions of high or low resolution.

In ** FLOW-3D** a compromise is employed called Free Gridding. The program uses a simple grid of rectangular elements, so it has the advantages of ease of generation, regularity for improved numerical accuracy, and requires very little memory storage.

Geometry is then defined within the grid by computing the fractional face areas and fractional volumes of each element that are blocked by obstacles. This Fractional Area Volume Obstacle Representation (FAVOR™) method requires that we store three area fractions and one volume fraction for each element, which is relatively little information compared with body-fitted grids.

The philosophy behind FAVOR™ is that the numerical algorithms are based on information consisting of only one pressure, one velocity, one temperature, etc. for each control volume, so it is inconsistent to use an excessive amount of information to define geometry. Thus, the FAVOR™ technique retains the simplicity of rectangular elements while representing complex geometric shapes at a level consistent with the use of averaged flow quantities within each volume element.

Grids and geometry are free to be defined independently of one another with the FAVOR™ method. We refer to this as Free Gridding. The advantages of Free Gridding are that grids and geometries can be generated and modified with very little time or effort on the part of a user. It is the computer that does all the work of computing the intersections between a grid and an obstacle description, which is what automated computing is all about.