home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- - ODE -
-
-
-
- A program for the interactive solution of systems of
- ordinary differential equations
-
-
-
-
-
-
-
-
-
-
- IBM PC version 2.5 October 16, 1990
-
-
-
-
-
-
-
-
- Written by Keith Briggs
- PO Box 75
- Heidelberg West 3081
- Australia
-
-
-
-
-
- IMPORTANT NOTICE
- ________________
-
-
- This brief documentation is for the shareware version of ODE only.
- It is not intended to be complete. For more information refer to the help
- screens (Press F1). Registered owners will receive a full printed manual.
-
- The shareware version of ODE may be freely distributed, as long as no charge
- is made for copies, and all files are distributed together.
-
-
-
- RESTRICTIONS IN SHAREWARE VERSION
- ---------------------------------
-
- No printed manual.
- No saving of ODE files.
- No sixth order Runge-Kutta method.
- No Bulirsch-Stoer method.
- No fixed step size.
- No transient steps.
- No printer support.
- No mouse support.
-
- These options appear in the menus, but are black and unselectable.
- Registered owners will receive a full version without these restrictions.
-
-
- HOW TO REGISTER
- ---------------
-
- In Australia: Send $A 75 to the above address.
- Elsewhere : Send a bank cheque for $US 75 to the above address.
- ODE full version and printed manual will be sent airmail.
-
- Email address for enquiries: matkmb@lure.latrobe.edu.au.oz
-
-
-
- PURPOSE
- -------
-
- ODE solves numerically initial value problems for systems of ordinary
- differential equations such as arise in all branches of science. The
- solution is presented graphically or as a table of values. ODE contains a
- text editor for manipulating the equations. It is suitable for teaching and
- small research problems.
-
-
-
- HARDWARE REQUIREMENTS
- ---------------------
-
- ODE runs on an IBM PC, XT, AT, PS/2 or compatible with one of the following
- graphics cards: CGA, EGA or VGA. A 80x87 numeric coprocessor is recommended.
-
-
- INSTALLATION
- ------------
-
- To install the program on a hard disk, type the following at the DOS
- prompt:
-
- cd\
- a:install
-
- and follow the directions on the screen. This will install the main program,
- and several sample programs. (These have the extension .ODE)
-
-
- GETTING STARTED
- ---------------
-
- Type ODE at the DOS prompt to start the program. The ODE main menu will
- appear.
-
-
- Try the following:
-
- F3
- (to start an ODE file.)
-
- firsttry
- (ODE will create a new file of this name, because one does not
- currently exist. ODE will then place you in the text editor.
- Enter the following text:)
-
- # exponential growth
- y = 1
- a = 1
- y' = a*y
- <Esc>
-
- (Pressing the escape key quits the editor and compiles the program.
- If you have made any errors ODE will place you back in the editor.
- Press <Esc> and correct the error.
-
- This system has the solution y(t)=exp(at). The first equation sets the
- initial value of y, the second sets the parameter a, the third defines the
- differential equation. The first line is a comment. Spaces are ignored,
- so you may use them freely to make the equations more readable.)
-
- F4
- (i.e. solve. This solves the equation over the default range (0,1).)
-
- any key
- (to exit from graph mode)
-
- F9
- (to examine the current values of the variables. Y should be
- e=2.7182818...)
-
- e
- (to edit your program. Change line 3 to a=1, 0.5, 0.2. Use <Esc> to quit
- the editor.)
-
- F4
- (The solution will now be graphed with the three different values of a.)
-
-
-
- THE MAIN MENU
- -------------
-
- The most important main menu options are the following:
-
- E - invokes the built-in text Editor.
-
- F - File submenu.
- L allows loading a previously created File, or creating a new file if the
- name entered is not in the default directory.
-
- F3 - Loads a file into the editor.
-
- F4 - Solves the system.
-
- F9 - displays the current value of all Variables.
-
- Q - Quits ODE.
-
-
-
- METHOD SUBMENU
- --------------
-
- Yellow indicates the currently active setting.
-
- 1,2,3,4,5 - Selects the order of the numerical method used.
-
- All numerical solutions to differential equations are approximate.
- The order of a method describes how the error scales with stepsize.
- For example, if you halve the stepsize with a fourth order method,
- the error will reduce by about a factor of 2^4=16.
-
- 3,4 are classical Runge-Kutta methods.
- 5 is the Runge-Kutta-Dormand-Prince method.
- 4 is the default and is suitable for most simple problems.
- 1 (Euler method) and 2 (midpoint method) are included for teaching
- purposes only. They can be unstable and are not recommended for
- serious work.
-
-
- N - selects the number of steps.
- The initial stepsize will be the independent variable range divided by the
- number of steps.
-
- T - sets the tolerance for the automatic stepsize selection. The N option can
- be used to control the initial stepsize, because the first stepsize tried
- is equal to the independent variable range divided by the number of steps.
- T controls the accuracy of the computed solution. It represents an
- relative tolerance, except when the solution is near zero.
-
- D - selects single point graphing.
- C - selects small crosses.
- J - selects straight lines joining the computed solution points.
- S - selects cubic spline interpolation to the computed solution.
- The spline will be one dimensional if the x axis variable is monotonic,
- else two dimensional. Use splines for the smoothest looking graphs.
-
- H - allows manual control of the Horizontal axis scaling. Use <enter> to
- accept the displayed defaults.
- V - as H for Vertical scaling.
-
- <Esc> - return to main menu.
-
-
-
- EDITOR COMMANDS
- ---------------
-
-
- Cursor keys (Up,Down Left,Right) - moves cursor.
- <CTRL> Left or Right - next word left or right.
-
- <Enter> - New line. If the cursor is at the end of a line, the new line
- will be below the cursor, else above it.
-
- <HOME>,<END> - moves cursor to start or end of the line.
-
- <CTRL y> - Deletes line.
-
- <Backspace> - Deletes character before cursor and backspace.
- <DEL> - Deletes character at cursor.
-
-
- <Alt F2> - quits the editor without compiling.
- <ESC> - quits the editor and compiles the program.
-
-
- The editor in ODE version 2 has no block moves. If you need to make large
- changes to your program, quit ODE and use any ASCII text editor or word
- processor to make the changes.
-
-
- ODE LANGUAGE
- ------------
-
- The rules are mostly common sense. Differential equations must be written
- with the '= notation. In all equations, all variables on the right hand
- side must previously have appeared on the left hand side of an equation.
- Initial values must be set before the corresponding differential equation.
- The independent variable is anonymous. If it corresponds to a physical
- quantity in your system, you can name it (say time) by including the
- following two statements:
-
- time=0
- time'=1
-
- This becomes essential if time appears explicitly in the equations.
-
- ODE is insensitive to the case of alphabetic characters, or to blanks.
- Variable names may be up to 20 characters, starting with an alphabetic and
- containing a..z,_,0..9. The following are valid:
-
- Fish_population TIME Delay_period Omega1 Retarded_Distance0_1
-
-
- Valid binary operators are + - / ^.
- (But use sqr and cub instead of ^2 and ^3).
-
-
- The following functions are recognized:
-
- abs - absolute value.
- sign - +1 if argument nonnegative, else -1.
- sin, cos, tan.
- atan or arctan.
- exp
- ln (or log - both mean natural log).
- sqrt - square root.
- sqr - square.
- cub - cube.
- pi - pi times its argument. Use pi(1) for 3.1415926535.....
-
- Commas separate alternative initial or parameter values.
- # introduces comments - everything to the right of # is ignored.
-
-
- DIFFICULTIES
- ------------
-
- All solutions are computed with the extended (10 byte or 19 decimal place)
- precision of the 8087 chip. However, a solution is aborted if any
- variable exceeds 1e38 in magnitude. If this happens, the reason is one of the
- following:
-
- 1. The solution is correct. In this case, rescale the problem. For
- example, if the problem involves very large physical constants (as in an
- astronomical problem), choose new units which make the physical
- quantities become of order one.
-
- 2. The solution is correct but diverges, for example an exponential growth.
-
- 3. The numerical method is unstable. If you suspect this, try a higher
- order method or smaller steps with fixed stepsize. If the solution is
- markedly different, it is likely that the lower order method is unstable.
-
- Another possible difficulty is very slow calculation of the solution with
- automatic stepsize. In this case, you may abort the solution with <ESC>.
- Try a different order method. If the problem remains, it is likely that the
- problem is stiff, which means it is beyond the capabilities of ODE.
-
- If a problem such as the log or square root of a negative number arises, ODE
- will give a fatal error message and quit to DOS after giving you the chance to
- save your file. If this happens, there must be a mistake in the formulation
- of your equations.
-
- ----- END of ODE25.doc -----
-
-