Applet gallery
This page is under construction. I intend to gradually add
applets that can be run locally, from a web browser, to illustrate simple
physical processes. For now, the "gallery" only contains two such applet
as described below.
1) Ideal gas box
-
This applet is intended to illustrate mixing and irreversibility in an
an ideal gas. The applet is also set up so as to enable some simple experiments.
In summary, a given number of particles may be distributed randomly in
a rectangular domain. The ones initially in the left part are blue, while
the ones initially in the right are red. The distribution of particles
and their initial velocities are random. The user may try several initial
conditions, by pressing the "Load" button more than once. Once an initial
condition is considered to be satisfactory, the simulation is started by
pressing the "Start" button. When a particle reaches a wall, it is reflected,
in part, specularly, and in part, by adding a random momentum in the parallel
and perpendicular directions.
-
Here are some questions that you may try answering with this applet:
-
For a given particle, what is the mean residence time, say, in the left side of the box?
-
On the average, what fraction of the time does any given particle spend
in the left side of the box?
-
For a given number of total particles, N, how long does it take, in units
of mean residence time, for all blue particles to go back to the left side
of the box? In the same units, how long does that event last? How do these two times scale with N? Hint: The first time increases very rapidly with N, so start experimenting with small values of N.
-
For a given N, what is the mean value of the total number of particles
on the left side?
-
How long does it take, in units of mean residence time, for the distribution
of red and blue particles to be essentially uniform in the box?
-
At the early stage of the mixing process between blue and red particles
(before they become uniformly distributed), plot the evolution of number
of red particles on the left side. Do you see any significant (above the
noise level) oscillations? Hint: Here, it helps to work with a large number
of particles.
-
Click here to run the ideal gas
applet. I hope that this will be entertaining, as well as instructive.
Feel free to send any suggestion.
2) Aranea: an unstructured triangular mesh generator
-
This applet was made from "Aranea", a java application for constructing
two dimensional unstructured triangular meshes of the type used in finite
element codes. A complete description of Aranea is contained in an article
in Computer Physics Communications (Vol. 139, pp. 172-185, 2001).
All source files are available from the CPC program library.
-
A tutorial is also available
in html format. I strongly recomment reading it before running Aranea.
-
Please note that, for now, the applet is unsigned and that all windows
will run as "Unsigned Java Applet Window". It should therefore not be possible
to save any result on your local file system. In any case, neither I nor the
University of Alberta will assume any responsibility concerning the accuracy
or usefulness of the program, or for any damage that may result from its use.
If you wish to use Aranea for generating unstructured triangular
meshes, I strongly recommend that you get all the source and example files
from the CPC program library. If you choose to experiment with Aranea from the following
applet, you may do so by clicking
here. Happy mesh generation!