The wavepacket simulatorStuart Lynn (s.lynn@sms.ed.ac.uk) and Owain Kenway (o.a.kenway@sms.ed.ac.uk), the School of Physics at the University of Edinburgh.Introduction The wavepacket simulator is a java applet which allows you to build up wave packets, either by manually inputting waves which are superimposed or by inputting a mean wave number and spread. The applet has three modes (auto-packet, manual and lecture). Lecture is probably the least useful as it is specific to a course taught here at Edinburgh, but it does show a nice example wave packet. Note: The applet has a forth mode called "Tabbed" which allows you to switch between the three modes of the applet using a tabbed interface. Unfortunately, due to Graphics2D bugs on some platforms, (Apple's JDK 1.4 for OS-X for example) it can at times be unusable. Underlying Physics This applet is based on the physics of wave propagation. When two waves are present in the same media they combine constructively where there maxima coincide and destructively when there maxima are out of phase by 180 degrees. By adding together many infinite waves, say on a wire we can create more complex wave forms(experiment with the manual section of the applet). One of the most important of these combinations are wave packets as they are used to send information. These can be formed by adding together a large number of waves with very close wave numbers and equal amplitude. However the speed at which each wave propagates through the media is dependent on its wavelength, this means that as time goes on the component waves of the wave packet will drift from there initial configuration and the wave packet will lose its shape. This behaviour is called dispersion and is characterised by a media's dispersion relation. Excercises
To use the wavepacket simulator applet, you require a web browser which a java plugin later than 1.2 (note it has not been tested with 1.2 - only 1.3.1 and 1.4), for example the latest JRE from Sun or Apple's JDK on Mac OS-X. You can also use the AppletViewer provided with your chosen JRE/JDK. It is not recommended that you use a remote X-session to run this applet as it draws to the screen a lot and the resulting lag makes the animation jerky. Installation Unpack the applet - if it came with a group of other applets from the School of Physics at the University of Edinburgh, it should be in the wave subdirectory. Inside the wave directory should be some java code, classes and a number of html files, including an index.html which should contain links to this documentation, JavaDoc for the simulator and some pages with example configurations of the applet. Usage The provided html files give you some example configurations of the applet. "wave.html" shows the tabbed interface, "wavepacket.html" shows the automatic packet generator, "wavemanual.html" the manual packet generator and finally, "wavelecture.html" shows the demonstration wave packet. The custom parameter that this applet has is "interfaceType" which can be set to 0 (tabbed), 1 (lecture), 2 (packet) or 3 (manual). If it is not set, or has another value, the applet defaults to tabbed. You can set the size of this applet as usual. Below is an example html file which embeds a tabbed 900 pixels by 500 pixels version of the applet.
How the applet is used is up to the user - it could be used in lectures, embedded in online course material or any other use that could be conceived. Creating wave packets First, lets take a look at the manual wave packet generator. The screen shots below show it on Mac OS-X and Windows XP. As you can see, there are two fields and four buttons. To add a wave to the superposition (in the white box at the bottom), put in its wave number and amplitude and click "Add". Add another wave and note that the black wave at the top is the superposition of the two waves. To see the wave move, click "Start", to pause it click "Pause" and to start over click "Clear". Now let's look at the automatic packet generator interface. This time there are three fields and the same four buttons. To create a wave packet, enter a mean wave number, spread of wave number and the number of waves (make this fairly high) and click "Add". Your wave packet will be generated, and displayed in the white box below. To remove it, click "Clear". As before, "Start" and "Pause" will animate it. Known Bugs
Additional Documentation There is complete JavaDoc for the classes in this applet in the "javadoc" subdirectory of the applet directory. |