Choice of the mesh

Especially in two — or three-dimensional codes the limitation on the total number of mesh points due to the capacity of the computer and to its speed can be very restrictive. It is then necessary to reduce the total number of mesh points to a minimum.

As it is obvious from the derivation of the difference equations the mesh should be small where the flux is expected to vary rapidly, while it can be larger in regions of flat flux. Numerical difficulties can also be encountered if

Xm+t-Xm xm — Xm-,

is either too large or too small (where X represents any of the chosen space coordinates). This means that the mesh size has to vary smoothly. Very often the only way of knowing if a mesh is sufficiently fine is to test whether appreciable changes in the results occur when a finer mesh is used. This is not always possible on the full size geometry and has to be tried in simplified cases. There are codes like CRAM(7) where it is possible to give an instruction “double”, in which case after convergence is reached with the given mesh the calculation is continued with a doubled number of mesh points, using as a flux guess values interpolated between the results of the first calculation. This is theoretically very useful, but its use is limited in practice by the fact that eventually doubling the number of mesh points leads to the computer-storage capacity being exceeded.