http://weelookang.blogspot.sg/2010/11/ejs-open-source-lorentz-force-on.html

Lorentz force on a wire

This program simulates the force exerted by a magnetic field between two magnets on an electrical current trough a wire.

The wire is suspended on a spring and will oscillate when the battery (which is connected to the ends of the wire) is turned on and off, the angle of the wire with respect to the magnetic field is changed, or the poles of the magnets are switched.

new remixed version by lookang 20 Dec 2010

original version by Professor Francisco (Paco) Esquembre

Credits:

The Lorentz force on a wire model was created by Francisco (Paco) Esquembre, customized by Loo Kang Wee using the Easy Java Simulations (EJS) version 4.2 authoring and modeling tool.  An applet version of this model is available on the NTNU website < http://www.phy.ntnu.edu.tw/ntnujava/ >.

You can examine and modify this compiled EJS model if you run the model (double click on the model's jar file), right-click within a plot, and select "Open EJS Model" from the pop-up menu.  You must, of course, have EJS installed on your computer.  Information about EJS is available at: <http://www.um.es/fem/Ejs/> and in the OSP comPADRE collection <http://www.compadre.org/OSP/>.