11.1 Simulations via OSP/EJS-Program

The interactive simulation of complex mathematical or physical objects is an attractive programming task, which provides a deeper understanding of the problems treated. It is a wonderful tool for the illustration of objects that are abstract or difficult to imagine or which can only be calculated with difficulty by hand. It appeals to the playfulness of the user and leads to intensive preoccupation with the subject. Therefore simulation has been seen as an effective didactic tool. Large efforts were directed to this end and the ministries of education in the states as well as at the federal level supported these efforts financially to some extent.

It was obvious to use common high-level standard programs, such as Microsoft Excel with Visual Basic for Applications (VBA). One finds many interesting examples of this approach on the Internet. A fundamental advantage of such technically relatively simple programming is that the user has open access via the standard program to the code. In addition, samples that are taken by third parties are therefore reasonably transparent , and the user can thus develop or modify the code, if the manufacturer has not built in artificial barriers. A major disadvantage is that files created in this way are platform dependent, and thus run only if the same operating system and application program, that are subject to licensing are used. It turns out even that successive versions of standard application programs are not fully compatible. For example, a file developed with Excel 2005 and VBA under Windows XP can be incorrectly formatted if run on another computer with Windows Vista. A technical disadvantage is, that the computing speed of a program developed in a high-level tool such as Excel is much lower than that of a low-level program running close to operating system level for the same task.

Therefore, efforts were made early, to use platform-independent and operating system-level programming languages, and the JAVA royalty-free language is considered as particularly suitable. However, this requires the creation of a special object-oriented simulation with JAVA programming experience of considerable depth, such that it appeared justified to thematically narrow down the options. Unfortunately, there was no systematic effort in Germany for defining a standard for mathematical and physical simulations, but rather there were the results of different schools, that existed more or less unconnected to each other. A resounding success in didactics was therefore not made, or was at least not obvious. OSP

A large body of preliminary work towards a such a standardization was done in the U.S. by the Open Source Physics (OSP) program, that was supported among others by the National Science Foundation. Its goal was to create a thesaurus of partial solutions specifically to provide for physical simulations, which could then be used in an object orientated way for programming specific simulations. The programs are made generally available under the GNU license-free Open Source Model, with the obligation that the same applies to new third party solutions built on OSP. GNU

GNU defines the goal as follows: ”The GNU General Public License is intended to guarantee the freedom, to share and change all versions of a program . It aims to ensure that the software remains free for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software, it applies also to any other works, the authors of which have released in this way. “

A leading pioneer of the OSP project was (Wolfgang Christian) at Davidson College, who built on a family of Java-Physlets, which he had developed previously. Together with his colleagues he created a number of program packages for the calculation and visualization of physics and engineering simulations, that respectively included specific methods.

This was connected with the development of a curriculum for the introduction in the structure and the technique of programming with OSP, and the development of a launcher by Doug Brown, which allows to combine a whole sequence of simulations on similar topics as a course inclusive of explanations in a single file. This can be done quite compactly, since the simulations share a common set of data, that are only needed once in the launcher package. Individual simulations can be called from this file or can also be isolated.

There is a wealth of partially simple and partially very refined physics simulations simulation to be found in the OSP program, and we will further on quickly introduce the most important packages that are now available.

If one wants to fully understand a simulation file, that has been created with OSP, one has to become quite familiar with its html source code.Using the teaching material this is quite possible, but still quite difficult. A second limitation of its general applicability lies in the fact, that the visualization requires by far the most effort and its development in html source code is quite unclear for the less experienced user. EJS

In this regard the development of theEJS package (Easy Java Programming) by Francisco Esquembre was a further breakthrough for OSP. This package consists of graphical user interface, that we want to quickly describe in the following. Its special appeal is the possibility to take the building blocks of the visualization from a large pre-built stock and to construct a realization tree from them via drag and drop. The individual icons are then connected to the variables of the simulation and to the easily callable standard methods. For the creation of the proper calculation code visual tools have also been provided. It is easy to become familiar with EJS using already existing example, such that one does not need extensive knowledge of the JAVA technicalities as such to develop simulations. Therefore EJS appears quite suitable for students of physics, whose concentrate their main interest into building physical models, rather then programming technique.

Another big advantage of the EJS program in its current version is, that one calls from inside of the individual simulations the universal creation program, the EJS-Console via mouse click, such that one can immediately dive into the programming, make changes or take individual building blocks for one’s new developments.

Thus the combination of EJS+OSP seems to be predestined to become the standard program for future didactically orientated simulations in the domain of physics and mathematics. We have used it almost exclusively in this work, although the author was previously more familiar with Excel/VBA and he first had to become familiar with the new methods. The two links on the right lead to a description of EJS by Wolfgang Christian and Francisco Esquembre. In the same directory you will also find further documentation.

EJS and OSP are under active development, and thus are a work in progress: you are therefore advised to orientate yourself on the supplied internet pages about the current status. JRE

To use the Java simulations the Java Runtime Environment must be installed at least in version Java/re5. You might want to install the free-of-charge current version (May 2009:jre6) via the link on the margin.