An inviscid mixing toy.
L. F. Rossi
Department of Mathematical Sciences
University of Delaware
Welcome! Come on in and play!
You do not have to know about mathematics or fluid dynamics to have
some fun with fluids. I wrote a more primitive applet a long time ago
to demonstrate inviscid mixing in a simple rotating fluid. Many enjoyed
playing with it, and I promised to refine the project one day. Well, that
was many years ago. This year, I spent a few hours updating the code and
adding more educational features to it. I hope you enjoy it.
What you need.
This applet requires a
Java 2 plugin. Most browsers will
offer to grab one for you if you do not have one already.
What is here:
In the applet below, you can see two small square windows and some
sliders.
- Some fluid: The window in the upper right contains the
fluid. Actually, only the fluid in the circle can move. You cannot see
the fluid, but it's there within the circle. The only way to visualize
the fluid is to put markers in it. You can do this by moving the mouse
into the circle and clicking and dragging. If you use the left button,
you add black markers. If you use the right button, you will add blue
markers. If you have a center button or wheel, you can use it to add red
markers. This is similar to having a glass of water and adding some dye
to it. There are only a limited number of markers available, so if you
use them all, the applet will take away the oldest ones to make room for
new ones.
- Stirring controls: To the right of the fluid, there are
some stirring controls. The stir/stop toggle button allows the
fluid to move. The fluid moves in concentric circles about the center, but
the rotation rate may vary as a function of radius (see angular velocity
control below). In other words, every marker moves in a circular path,
and the rate of rotation varies with distance from the center. Press it
again to freeze the fluid in place. The refresh interval slider
controls the speed of the animation. Lower the interval to speed up the animation.
Your top speed will depend upon your computer hardware. The clear
button removes all the markers. The reverse button negates
the angular velocity curve so that the flow will start running in the reverse
direction.
- Angular velocity control: The lower left window is a graph
of the angular velocity of the fluid while it is stirred. This
is the time rate of change of the angle made by a particle as a function
of distance from the center. For instance, if the angular velocity curve
were flat, the angular velocity would be uniform across the fluid. The means
that no matter where a particle sits, the period of its orbit stays the same.
The angular velocity curve can be adjusted by moving the parameter settings.
Each parameter slider corresponds to the position of one of the
interpolation points on the curve marker with a red dot. Parameter 1 corresponds
to the leftmost dot. Parameter 2 corresponds to the next dot to the right
and so forth.
For curious science geeks:
It's hard to mix without diffusion, so you might argue that no mixing
goes on here. In fact, if you reverse any flow field in these experiments,
you can reverse the mixing effect. This goes contrary to anyone
who has every stirred cream into their coffee. There are two important
mixing processes that are relevant to this discussion.
- Lagrangian mixing: This is the process shown in the applet.
Essentially, big patches can be stretched and deformed, much like
a taffy puller, so that marked and unmarked fluid become intermingled.
- Molecular diffusion: This is an irreversible process where
molecules of the passive marker (think of food coloring for instance)
diffuse among the molecules of the bulk fluid. The ratio of the
fluid forces to diffusive forces is known as the Peclèt number.
The larger the number, the lower the tendency for the fluid to diffuse.
In this applet, I did not implement any molecular diffusion, and
so the Peclèt number is infinite.
Inviscid mixing greatly enhances molecular diffusion. Diffusion
works well over very short distances but terribly over moderate distances.
Effective inviscid mixing can intermingle the passive quantity among
the bulk fluid so that the distances are very small. Then, molecular
diffusion can act quickly to mix the two together. This is why it
is not enough to simply add cream to coffee... it must be stirred if you
hope to enjoy it right away.
For curious computer geeks:
Feel free to take this applet, play with it, modify it and use it on
your own web site. It's not pretty. I just coded it up for
fun. If you do take it, you must abide by the terms of the GNU Public
License. (Essentially, this means you need to keep the code open.)
The applet accepts two parameters. One is NPARTICLES that places
an upper limit on total number of markers that can be released into the
fluid. The second parameter is POLYN which sets the order of the polynomial
used for the velocity profile. I use a Lagrange polynomial interpolant
on a uniform mesh for the radial velocity profile, so POLYN is the total
number of interpolation points.