Run the Applet | Examples | Source Code | Old Versions |
---|

Instructions

Ideal Flow Machine/Mapping Window

The Ideal Flow Machine is designed for students learning elementary ideal flow. The term 'Ideal flow' describes the way in which a fluid (liquid or gas) moves when the effects of compressibility and viscosity are negligible. Ideal flow is often the first type of fluid motion that student engineers and scientists study, because it is the simplest. Large parts of the flows past ships, submarines, cars and light aircraft are closely ideal.

This applet is designed to give students an environment where they may
experiment with and visualize elementary two-dimensional ideal flows and
thus better understand them. The following description assumes the reader
has had some theoretical introduction to this subject (e.g. as given by
J. J. Bertin and M. L. Smith, *Aerodynamics for Engineers*, Second
Edition, Prentice Hall, 1989, or for more advanced readers Karamcheti K, "
Priciples of Ideal Fluid Aerodynamics", 2nd edition, Kreiger, 1980). However, this does not mean that you have
to understand this stuff to use and enjoy the applet.

**If you are not a fluid dynamicist**, you may wish to skip the following
and straight to the applet (its
still a fun way of generating some pretty graphics patterns) If so, I suggest
that after launching the applet you start by clicking anywhere on the grid (this will start the flow moving
at speed 1 from left to right - just like a real air or water flow you
can't see the flow until you put dye or some other marker in it). Then
select 'Source Sheet', change the strength to 2 and then click and drag
the mouse to create a vertical line in the middle of the grid. Finally
select 'Draw Streamline' which allows you to put dye in the flow so you
can see where it is going. Click anywhere towards the left hand side of
the grid. Keep on clicking at a range of different points within the grid
and you will see a flow pattern emerge that looks like this.
Note that the color of the streamlines depend on the speed of the flow.
You may then add any number of other flows (sources, sinks, doublets, source
panels and vortex panels) and see what they do by drawing more streamlines.

Back to the technical details...

Ideal fluid flows are solutions to Laplace's equation. This differential equation is linear, which means that adding together (superposing) any number of ideal flows produces a new ideal flow. One approach to finding the solution to complex flow problems - termed superposition - is therefore to begin with very simple ideal flows, that are easily understood and described, and then to add them together to produce the complex flow patterns desired. This is exactly the process modelled in The Ideal Flow Machine.

When you go to the applet page and press the button, you will see a window like that shown below -

You may run as many versions of the applet simultaneously simply by repeatedly pressing the button. You can resize the window at any time by grabbing its corner (or using whatever other method your operating system prefers). You can also move onto another web page without loosing the applet.

The window shows a grid (the rectangular region containing the gray '+'s, origin at the big '+'), three buttons labeled 'New Flow', 'Show Data' and 'Show Mapping', four text fields labeled 'Strength', 'Angle' 'X' and 'Y', and a choice menu with the selections 'Freestream', 'Source', 'Vortex', 'Doublet', 'Source Sheet', 'Vortex Sheet', 'Circle', 'Circle with K.c.' and 'Draw Streamline'. With the exception of 'Circle', 'Circle with K.c.' and 'Draw Streamline' these selections are the elementary ideal flows from which you are going to build your own complex fluid flow. The fields 'X' and 'Y' show the position of the mouse on the grid, the fields 'Strength' and 'Angle' may be edited - you can enter any numeric value you wish.

In short, what you do is select the type of flow you want to add, type in the strength and angle, as appropriate, and then click the mouse on the grid at the point where you want that flow to appear. You may add any number of sources, vortices doublets, source sheets or vortex sheets. Then you select 'Draw Streamline' and the computer will draw streamlines starting wherever you click your mouse on the grid. The whole thing is supposed to be a little like a real water tunnel, in which you set up your flow and then visualize the streamlines by adding dye at specific points (i.e. a Hele Shaw table, for those who remember). Please note the following;

- When adding a freestream (a uniform flow in a given direction) both the strength and angle may be specified, but as long as you click somewhere in the grid, the position is irrelevant (this flow is the same everywhere). The freestream direction is indicated by an arrow that appears in the top left hand corner. It only makes sense to have one freestream. If you add a second it will simply overwrite the first.
- When adding a source (a flow out from a point, or into a point when the strength is negative) the angle is irrelevant (this flow is axisymmetric). The source is indicated by a small blue circle containing a '+' if the strength is positive and '-' if it is negative.
- When adding a vortex (flow circulating around a point) the angle is again irrelevant. The vortex is indicated by a red dot with an arrow indicating the direction of circulation (positive strength = counterclockwise circulation).
- Each doublet (flow out of one side of a point and back into the other) is indicated by a black arrow showing the direction of the outward flow with two circles on either side. 'Strength' and 'Angle' are both relevant for a doublet.
- A source sheet is a source stretched out into a line. Likewise for a vortex sheet. These are indicated by blue and red lines respectively. To add a sheet you click on the place where you want the sheet to start and then drag the mouse to draw out the sheet. Note that the 'Angle' value is irrelevant for these flows.
- When you draw a streamline it will be colored, and the color may change along its length to indicating the varying speed of the flow. The color may be interpreted as an actual speed by comparing with the legend at the bottom of the applet. Note that when the streamline comes to a point where the flow is stopped (a stagnation point) it will stop (just as dye would if injected into a flow). If the streamline goes through the exact point where singularity (source, vortex, doublet, sheet ends) is located it will also stop, since the flow is undefined there. Note that if you reduce the size of the applet after drawing some streamlines only those streamlines with starting points within the new window will be redrawn.

If you are unfamiliar with the types of flow described here, add one of them (and nothing else) and then draw some streamlines to see what it looks like. The examples are some suggestions for slightly more complex flows you may like to try.

The choice-menu selections 'Circle' and 'Circle with K.c.' allow you to apply the Milne Thompson Circle Theorem to a flow. This theorem allows you to create a circular streamline in any flow, simply by manipulating the function that describes that flow. To use this feature, first put together a flow in which you want to create a circular streamline using the tools described above. Then select 'Circle'. Click the mouse at a point within the grid where you want your circular streamline to be centered and then drag the mouse to select the radius. Visualize the results using the 'Draw Streamline' option. Note that you can only add one circular streamline at a time (adding a second simply overwrites the first). The option 'Circle with K.c.' functions in the same way, except that it allows you, additionally to specify the point at which the flow detaches (or attaches) to the circular streamline (i.e. you get to specify a Kutta Condition). This point is specified by the location where you release the mouse after dragging it to create the circle. A good way to test both of these options is to try them on a uniform flow. Note, however, that they will work on any flow, however complex.

There are three buttons at the bottom of the frame. 'New Flow' allows you to erase whatever elementary flows (and circle) you have created so that you can start with a clean slate. 'Show Data' brings up a window which (after a short delay for computation) shows a list of the X and Y coordinates of the last streamline plotted and the velocity components U and V at those coordinates. These data can be cut and pasted into any other spreadsheet/graphics application, so that you can plot such things as surface pressure coefficient distributions and, at least to some degree, store the results of your efforts. The (necessary) security features of the Java Language prevent saving data directly to files. The third button 'Show Mapping' enables you to modify the flow you have generated using conformal mapping, as discussed below.

Pressing the 'Show Mapping' button in the Ideal Flow Machine window brings up a second window in which you can explore elementary conformal mapping techniques. Conformal mapping is an advanced topic, usually taught to seniors or graduates.

Conformal mapping follows from the description of two-dimensional ideal flows in terms of complex numbers (described for example by Karamcheti K, " Principles of Ideal Fluid Aerodynamics", 2nd edition, Kreiger, 1980). This description is a very natural one. Suppose you use a complex number to represent positions in two dimensions, e.g. z = x + iy. Then, by definition, any analytic (differentiable) function of the complex variable 'z' is a solution to Laplace's equation - the governing equation of ideal flow. We can therefore describe any 2D flow as a function of z.

The problem with this result is that one does not know * a priori * which function
of z will produced the specific flow of interest. We have already met one approach to
this problem - the method of superposition - where we add very simple ideal flows
together to produce the complex flow patterns
desired. The description of ideal flows in terms of complex numbers, however, allows for
an additional route - the distortion of one flow into another by conformal mapping.
Conformal mapping involves the transformation of the complex coordinate 'z' into
a different coordinate, say, z_{1} = x_{1}+iy_{1} via a function,
i.e. z_{1}=z_{1}(z). This process also
transforms the flow, described say by a function F(z), to a new flow F_{1}(z_{1}) = F(z(z_{1})).
As long as the derivative of the
mapping function z_{1}=z_{1}(z) is not zero, then it turns out that the mapped flow is a
solution to Laplace's equation and is thus valid. At points where the derivative
is zero, termed critical points, the mapped flow is not valid. Paradoxically,
these points turn out to be particularly useful when trying to create sharp corners
in a flow, such as at the trailing edge of the airfoil.

This process of mapping a flow in the complex plane is what is illustrated by the mapping window.

When you press the 'Show Mapping' button, a window like that shown below will appear-

Unlike the above image, the mapping window you see will contain a copy your flow
(or at least its streamlines). The mapping window has a button labelled 'Apply Mapping', two text fields labelled 'a' and 'b' and a choice
menu with the selections 'z_{1} = z', 'z_{1} = az^b', 'z_{1} = a(z+b/z)', 'z_{1} = a ln(z) - ib',
'z_{1} = a(exp(bz) + bz), and 'z_{1} = (z-a)/(az-1) + b'. These control
the mapping function. The default mapping function is just z_{1}=z (i.e. duplication) which
is why you see a simple copy of your flow in the mapping window. To change the mapping function
use the choice menu to select the functional form, the 'a' and 'b' text fields to enter the constants, and
press 'Apply Mapping'. (Note that, depending on the functional form you choose there are
a few values of 'a' and 'b' that lead to meaningless results. If you happen to choose
these an error window will warn you.)
Choose a mapping other than 's = z' and press OK. If there are any critical points
in the mapping you have chosen, they will appear as yellow filled dots in the both the
z-plane (the original Ideal Flow Machine Window) and the z_{1}-plane (the mapping
window). The streamlines in the mapping window will be redrawn to reveal the mapped flow.
If you add more streamlines to your original flow, the corresponding streamlines will be
added to the mapping window.

The mapping also has labels that show the x_{1} and y_{1} position of the mouse
in the mapped plane, a legend that as before relates the color of the streamlines to the
velocity of the flow, and a button labelled 'Show Data'. This button works in the same way
as the 'Show Data' button in the Ideal Flow Machine window, except that it lists the coordinates
and velocities in the mapped plane.

The basic effects of most of the mappings are illustrated in the examples and are described in many standard texts (e.g. CRC Standard Mathematical Tables, 27th Edition, CRC Press, 1986). Somewhat unusual is the mapping 's = (z-a)/(az-1) + b' which maps the space in an annulus to the space outside two circles.

One important effect to watch out for is branching. A single flow in the z-plane
can map to several different, and overlapping, flows in the z_{1}-plane (branches). This is
entirely correct, but it can be very
ugly when you get overlapping streamline patterns. The number of possible branches can be trimmed somewhat by restricting the range
of angles in the z-plane to 0 to 2Pi (as is done here). There are still plenty of
combinations of mapping and flow that will produced multiple branches though, so if you
just want to see one branch be careful where you click that mouse!

Please email me (using the hypertext at the bottom of this and the other IFM pages) if you have comments or suggestions (or you discover bugs).

William Devenport

Run the Applet | Examples |
---|