of solution aimed at (simple time March, Poincaré map or Lyapunov exponents);
3) Solution parameters (initial conditions, time-span, time-steps, transient cut-off
time, error tolerance, etc.); and 4) miscellaneous parameters that are only rarely
changed (printer, font size, graphics file format, variable increments for real-time
simulation, etc.).
Compute solution Starts the ODE-solver, checks for keyboard interrupts while
solving, displays progress in percentage of total task.
Display solution Calls up a sub-menu for choosing a particular feature of the
solution to display. Here, ‘Order analysis’ visualizes the relative magnitude of
equation terms (to check possible assumptions regarding these), whereas ‘animation’ displays an image of the physical system on screen, with its parts moving
according to the calculated solution (see below). Time histories, phase planes and
spectra are displayed using existing curve plotting software (see below), and may be
sent to a printer or saved as graphic files for inclusion in text documents.
Simulate system Loads a ‘real-time’ simulation/animation module. The differential
equations are solved small time-steps ahead, while images of the changing states of
the physical system (e.g., a beam or a pendulum) are displayed on screen. The
physical parameters of the system can be changed ‘on the fly’ by pressing
pre-defined keys. For example, pressing ‘F’ may raise the frequency of harmonic
excitation in small increments, whereas pressing “f” lowers the frequency. For
low-dimensional systems the impression is created that one controls and views the
system in real-time, even on a modest PC. A graphical panel displays values of
numerical values that could be measured for a similar laboratory experiment, e.g.,
the instantaneous system time, state, amplitude and frequency.
Animation of the physical system is performed by using the basic graphical
routines accompanying most compilers, or – for portability – graphical libraries
available for most operating systems and compilers, such as OPENGL with GLUT
(freely available, see below). For this one can employ the following procedure:
1) Display the physical system in its instantaneous state while the ODE-solver
computes the next state, 2) Redraw the state using background color, and 3) Draw
the new state in visible color. Alternatively one can employ two graphical pages,
drawing on a background page and swapping pages each time the ODE-solver
completes a time-step. To slow down animation, a time-delay is employed while the
system is shown in visible color. Delays can be coded via dummy-loops (e.g.,
adding two numbers an adjustable number of times), or by using the internal timing
routines supplied with most compilers.
Analytical predictions Calls up a module for calculating, displaying and exporting
results of analytical predictions of system response, e.g., as obtained by theoretical
perturbation analysis.
A modular design allows one to rather easily adapt the program to a wide range
of different systems. Typically, one should have to change only the definition of
differential equations, the set of system parameters, and the graphical image of the
Appendix A: Performing Numerical Simulation
453
Précédent

- 467/539

Suivant