Programming in Turbo Pascal
Speaking about Pascal, it is clear that the Delphi Programming Environment is
the most significant nowadays. Indeed, programs in Turbo Pascal tend to become
outdated on Windows systems. Sad remark: Turbo Pascal executables nevertheless
are significantly smaller & faster than their 32-bits counterparts.
As an inheritage from my Turbo Pascal period, only the graphical results
have been retained, for three problems. And, meanwhile, all TP code has been
converted to Borland Delphi.
As far as Delphi is concerned, a sad remark is in place, though: Turbo Pascal
executables were significantly smaller & faster than their 32-bits
Delphi counterparts. And the higher the Delphi version, the more inefficient
it has become.
Numerical Analysis
- Small matrices can always be inverted directly by a method which is
closely related to reciprocal base (reciproc.pas)
theory
- Why is it that the Fast Hadamard Transform (spektrum.pas) seems to be so much less well known than the Fast
Fourier Transform ?
In particular, complex (kompleks.pas) calculations
are needed for the latter, but not for the former.
Here are some
Delphi 5 versions of the Fourier Transform,
nevertheless.
- Comparison of linear equations
solvers against each other:
- Successive Overrelaxation
- Fast Poisson Solver
- Full MultiGrid (morph08.txt)
see 1-D predecessor
All of them applied to an example of morphing
ronsweet.pas
in two dimensions.
Maybe (3.) is linked to the
Four Colour Problem as well.
General Units
Every TP program consists of a specific part and more general parts, the so
called Turbo Pascal Units (TPU's).
The following is a list of the more
general units in the TP ZIP archive.
The Mouse Library was developed originally for the purpose of
mimicking (muistest.pas)
the excellent X-Windows drawing program called
'xfig',
but I did'nt finish this part of the job.
The performance of Skew Upwinding has been somewhat disappointing, despite of
my theoretical and (zoek3uit.pas) programming effort spent on the subject.
Attempts to generalize the idea to multiple dimensions (say 3 + 1 = space
plus time) seem to be even more discouraging. There exist 58 tetrahedra which
share their corner points with those of one cube in 3-D. (This strategy is quite
different from the one which was outlined in previous work and which should be characterized now as rather incomplete).
In 4-D there exist 3008 such pentahedra, however, as has been found by
running another little (combine4.pas) program. Imagine
what calculation time would be involved with just one of these space-time
elements!
The Labrujère Problem
The following issues are dealed with:
- Ideal Flow velocity distribution around a circular cylinder
A Least Squares Finite Element Method has been implemented
for this purpose.
- Potential lines and Streamlines calculated from the velocity field
Also calculated with a Least Squares Finite Element Method.
- Potential and Streamline function calculated conventionally
by employing a common Finite Element Method.
- Velocity distribution derived from both the Potential and the Streamline
function
using "numerical differentiation" (not really).
ZIP archive contents:
These programs are associated with chapter 7 (Dutch) in my
book, known (to me at last) as
Labrujère's Problem.
Check out here for more relevant parts.
The results are displayed graphically.
Corroding Reinforced Concrete
This program calculates the distribution of the electrical potential,
and the electric field, in a piece of re-enforced concrete.
A standard
2-D finite element method has been implemented for this purpose.
ZIP archive contents:
The results are displayed graphically.
Intermediate Heat eXchanger
Transport Phenomena in a Heat Exchanger are calculated
and theory is checked against temperature measurements.
As follows:
- Ideal Flow velocity distribution at the inflow region
- Potential lines and Streamlines at the inflow region
- Pure Convection at the inflow region (along with streamlines)
- Primary and Secondary Temperatures in the tube bundle
A Least Squares Finite Element Method has been implemented for this
purpose.
Straight and Skew Upwind Finite Element Difference
(SUFED) schemes are used for convection.
Direct as well as iterative methods
are employed for solving the system of linear equations.
ZIP archive contents:
Statistics
Here are some of my Turbo Pascal programs I developed while studying a little
bit of Statistics
(though I'm particulary bad in this area):
(Note: many of these programs will not work anymore anyway, without the
Borland BGI stuff, which must then be placed in the C:\TP\BGI directory.)
The first two programs are characterized by the use of recursion.
Back to the Computer Programming page