The Application of Computer Algebra for the Discretization and Coding of the Navier--Stokes Equations

V.V. Goldman
J.A. van Hulzen

Department of Computer Science, University of Twente,
P.O. Box 217, 7500 AE Enschede, The Netherlands

A.E. Mynett
A.S. Posthuma
and H.J. van Zuylen

Delft Hydraulics, P.O. Box 177, Rotterdamseweg 185
2600 MH Delft, The Netherlands


For the solution of flow problems, the Navier--Stokes equations provide a suitable mathematical framework. For most situations, only the numerical solution of these equations is possible. The equations have to be discretized; i.e., mapped on a grid, after which a solution can be formulated in terms of the unknown variables: the mass flux components at particular locations in the flow. Then the discrete Navier--Stokes equations are linearized with respect to these unknown variables, after which a linear system of equations has to be solved.

The FORTRAN code to build the matrix of coefficients is quite complex, due to the strong logical coherence and the large number of transformations and approximations applied. Therefore the code is error-prone and difficult to maintain.

A solution was found by generating the code and maintaining it on a higher level of abstraction. Computer algebra was applied using the REDUCE package with GENTRAN and SCOPE. Instead of maintaining the source code, the knowledge needed to build the source code is documented and used to generate the source code. Maintenance is done on the documented knowledge.

Computer Algebra in Industry 2 Edited by A.M. Cohen, L. van Gastel and S.M. Verduyn Lunel
© 1995 John Wiley & Sons Ltd

Reproduced by permission of John Wiley & Sons Ltd, 1995

Go to:
Computer Algebra in Industry 2

Thierry van Effelterre
Last Update: June 24, 1997.