Discretization
Computer models must represent fluid behavior with finite amount of
information. This reduction from infinite to finite is discretization. Three different
aspects of discretization are involved in building a numerical model:
- Reduction of the real number space to a finite subset of rational
numbers
- Discretization of a continuous field in space and time
- Translation of differential laws of dynamics into algorithms
We will deal with the first aspect of discretization later; in this
lecture we will discuss methods for discretizing continuous fields. I
will mention four techniques:
- Grid points
- Control volumes
- Finite elements
- Spectral methods
How we discretize the field would determine how we would construct the
algorithm for the model.
Grid Points
The most straightforward way to discretize a continuous field, such as
concentration of a chemical, is to evaluate it at finite number of
distinct locations called grid points.
Structured and unstructured grid
Typically, these points are organized into a criss-cross pattern (grid or mesh); in two dimensions it
resembles a matrix, and in three dimensions it would resemble a crystal
lattice. Each grid point can then be designated with two or three
indices respectively. Such a grid is called structured.
A grid can also be unstructured:
it may have no discernible structure other than a degree of uniformity
of spacing. Such grid points can be designated with a single ordered
index, but which two points would interact does not follow a
straightforward pattern.
Obviously an unstructured grid is more flexible; however, it is much
simpler to formulate a numerical model over a structured grid, and a
structured-grid code is also easier to optimize through a compiler
(since the order in which gridded information is to be processed is
more obvious).
Control Volumes
Another way to discretize a continuum is to divide the underlying space
into cells called control volumes.
This is a particularly intuitive way to discretize the concentration
field, since we can then formulate the model in terms of the amount of
the concentrate, or inventory,
in each control volume, and its budget. Control volumes can also be
structured or unstructured; often, the average concentration for the
volume is assigned at the centroid point of the volume, giving the
model a hybrid character that would also let us use the finite difference as well as finite volume method to construct
the numerical algorithm.
Finite Elements
In finite element
discretization, space is again divided into small cells or elements. However, within each
element the field is still variable; the variability is represented in
terms of a simple function, such as a linear gradient. The field will
be made continuous across the boundary between elements. The effect is
rather like representing a continuous surface with a number of flat
facets.
Finite element discretization is particularly well-suited to
unstructured grids, and is a very popular approach in these cases where
the geometry is too complicated for a structured grid.
Spectral methods
The previous three methods one way or the other discretize the space
itself. An altogether different approach is to construct the field as a
weighted sum of known functions, such as a truncated Fourier series.
Spectral representation has some highly desirable mathematical
properties; for instance, using the spectral method it is possible to
arrive at algorithms that would globally minimize the discretization
error, giving us a model that is optimal in accuracy. Also, when we use
functions that are eigenfunctions of some of the terms in the equation
(e.g. trigonometric functions for second derivatives), the algorithm
can be greatly simplified (but other terms, such as non-linear terms,
could become greatly complex).
The main drawback of a spectral representation is that it requires the
underlying domain to be of relatively simple shape like a rectangle or
a sphere (or it could be mapped easily to simple geometries). Because
of this, spectral models are rarely used outside of idealized,
process-oriented experimental models such as direct simulation of
turbulence.
We shall not discuss spectral methods further, since its application in
oceanography is rather limited.
Next