Moving Picture Computer Output

Moving Picture Computer Output

J. Eddie Welch

Los Alamos Scientific Laboratoryt

1965

UAIDE

ABSTRACT

A description is given of the way in which results from fluid dynamics calculations can be displayed using the S-C 4020 Microfilm Recorder. Included are figures showing plots of pressure contours, velocity vectors, stream function contours, streak lines, and fluid configuration. Special emphasis is given to the production of moving pictures from 4020 plots. Selected frames have been chosen from several cinema sequences illustrating calculations of the flow of water from a broken dam, the passage of a blast wave through a bomb shelter tunnel, the flow of water around an obstacle in a channel, the impact of a meteor with a missile surface, and the flow of water from a sluice gate.

INTRODUCTION

For the past several years, group T-3 of the Los Alamos Scientific laboratory has been involved in developing numerical techniques for high speed computers, to solve time-dependent problems in both compressible and incompressible fluid flov in two dimensions. These techniques are discussed in detail in a number of reports and technical journal articles. [1], [2], [3], [4] For the purposes of this paper, the details of these techniques vill not be discussed. However, it is necessary to show the basic processes used in these techniques, in order to illustrate meaningfully the manner in which we make the flow fields visible.

In all of the above-mentioned techniques, the fluid moves through a two dimensional mesh of cells; that is, the volume occupied by the fluid is broken up into small segments, each of which contains a small but finite quantity of fluid. Each of these cells is of length ΔX and width ΔY. The physical properties of the fluid (density, velocity, pressure, internal energy, etc.) are defined for each cell in the mesh. The cell pressure, for example, is interpreted to mean the average pressure in the fluid over the volume of the cell. In this way, the complete state of the fluid is represented throughout the calculation by a finite number of quantities, which then are capable of being stored in tbe memory.of a computer.

Knowing the properties of the fluid at a given time, t, and using finite difference approximations to the differential equations, it is then possible to calculate the properties for each of the cells at a slightly later time, t + Δt (where Δt is the finite time step used for advancing the flow). This process is continued for as long as the flow is of interest.

Several of the programs have one other important feature. The fluid configuration is defined by a set of marker particles (see Fig. 1). These particles are moved with an interpolated value of the four nearest cell velocities. They are used primarily for display purposes, and to keep track of the position of the fluid when a free surface is present. (In one of the compressible fluid techniques these particles enter in even more detail into the calculation.)

welch01

Figure 1: Sketch of typical mesh of calculational cells. An actual calculation would be much more finely resolved, using up to several thousand cells.
Full Size Image

The primary purpose of this paper is to discuss techniques used to display the results produced by these fluid dynamics computer programs. If the physical properties of the fluid were merely printed for each time cycle, there would be piles and piles of listings to pour through in order to analyze the results. Our solution to this problem has been to use the SC 4020 Microfilm Recorder to display the data in an easily digestible form. These 4020 plots can there be made into motion pictures quite easily.

PARTICLE PLOTS

In the programs employing marker particles, perhaps the most descriptive pictures and the easiest to obtain are those of particle configurations. Each marker particle has an X and Y coordinate stored in memory. By plotting these coordinates, and drawing the boundaries which define the system, we get a picture which shows the shape of the fluid and its relationship to the confining walls of the system.

Figure 2 shows a set of particle plots which represent the flow of water from a broken dam. The first frame in the picture shows the fluid configuration an instant after the dam has broken (dam pieces have been removed). Subsequent frames show the water as it flows downstream and collides with an immovable object. The mesh of cells is not shown in these plots.

welch02

Figure 2: Particle configuration plots for the flow of water from a broken dam using the MAC technique for incompressible flow. [1] There were 2100 computational cells used for this problem (cells are not shown).
Full Size Image

The flow of water under a sluice gate and into a quiescent pool of water is illustrated in Fig. 3. The initial frame shows the water at rest just after the gate has been quickly opened. The extruded water then proceeds to flow into the quiescent shallow pond and form a backwards breaker. In addition to the force of gravity, a surface pressure was applied to the water behind the gate so that the water would be forced under the gate more rapidly. These frames were picked from among hundreds of such pictures which describe the complete flow from beginning to end.

welch03

Figure 3: Particle configuration plots for the flow of water under a sluice gate. This problem was run using the MAC technique. [1]
Full Size Image

The calculations shown in Figs. 2 and 3 were performed with the MAC technique for incompressible flows. [1]

Figure 4 shows the hypervelocity impact of a cylindrical projectile with a flat plate. Because of the high velocities, this behaves as a compressible fluid. A somewhat different computing technique was therefore required; in this case we used the PIC method. [2] Notice the compressions formed in both materials.

welch04

Figure 4: Hypervelocity impact of a cylindrical projectile with a flat plate using the PIC method for compressible flow. [2]
Full Size Image

Another type of picture which may be produced using particles is a plot of smoke (or streak} lines. In Fig. 5 there is a continuous input of fluid from the left, and a continuous output of fluid on the right. As the fluid comes in from the left, it flows past an obstruction. The smoke lines are formed by feeding in particles from the left, and allowing these particles to move downstream with the motion of the fluid. The effect is the same as that of injecting lines of smoke into a wind tunnel, or jets of dye into water flowing down a channel. As the fluid flows past the obstruction and into the channel, eddies are formed. The smoke particles visually demonstrate this quite well. The computing method,in this case is another one for incompressible flows, developed by Fromm. [3]

welch05

Figure 5: Smoke lines for the van Karman Vortex Street, using Fromm's method for incompressible flow [3]. Fluid flow is from left to right, vith a rectangular obstruction at the far left.
Full Size Image

Particle plots, then, have the advantages of giving a nice visual effect, and of being relatively easy to obtain. They do not, however, convey all of the information with respect to the details of the flow. A single particle plot, for example, does not show the direction of flow, or any information about internal energies, pressures, or velocities.

VELOCITY VECTORS

For showing the direction of flow and the velocity field of the fluid, we use velocity vector plots ( Figs. 6 and 7). For each cell in the system, we draw one velocity vector starting at the cell center, with a length proportional to the cell velocity and a direction which is the local flow direction. For each cell there is an X component of velocity (U), and a Y component of velocity (V). We create a velocity vector by plotting two points, and connecting them with a straight line in the following manner:

X1 = Xcell
Y1 = Ycell
X2 = X1 + kUcell
Y2 = Y1 + kVcell

where k is chosen in such a way as to give the vectors a reasonable length for display.

Figure 6 shows velocity vector plots for the passage of a blast wave into a bomb shelter tunnel. From these plots it is relatively easy to see the position of the shock front as it reflects down the tunnel. The first picture shows the configuration just as the blast has reached the tunnel entrance. Subsequent frames show the progression of the shock down the tunnel. For this type of calculation, the FLIC method for high-speed flows [4] is utilized.

welch06

Figure 6: Velocity vector plots for the passage of a blast wave through a bomb shelter tunnel. This problem was run using the FLIC technique for compressible fluid flow. [4]
Full Size Image

Velocity vector plots for the Raleigh-Taylor Instability are shown in Fig. 7 along with the corresponding particle plots. This type of incompressible fluid motion can be achieved by turning a glass of water upside down. Instead of the water all flowing downwards, it breaks into a series of spikes, which fall down, and bubbles, which progress upward. The velocity vector plots show this movement quite clearly, illustrating a second type of output also available from a MAC [1] calculation.

CONTOUR PLOTS

A useful method for showing visually such properties as pressure, temperature, internal energy, and density, is to make contour plots. This is done by plotting lines of constant Z (where Z is the particular property we are interested in). That is, each contour line represents a given value of Z, and a given contour plot will show lines for several values of Z, separated by a prescribed contour interval. The effect is the same as that of geographical contour maps, where each contour represents a certain altitude.

As long as our data are relatively smooth, the contour plots will provide us with a very useful and informative picture. However, a knowledge of the problem under consideration is necessary in order to decide whether the lines show increasing values or decreasing values of Z, since the values of the individual lines are not printed on the plots. We do, however, know the value of the lowest and highest contours, and the contour interval. From these values it is possible to figure out the values of the other lines.

Contour plots are not easy to produce. It is necessary to first find the maximum and minimum values for the variable. From these values the contour interval, ΔZ, is calculated in such a way as to give a desired number of lines. It is also desirable that ΔZ be a rounded number so that the contour plots can be more easily read and interpreted. One solution is to allow the number of contour lines for a given plot to fall somewhere between N and 2N, where N is an integer to be chosen. If we calculate

ΔZ = (Zmax - Zmin) / N

and then change ΔZ to the next lower power of 2, we have accomplished two things. First, ΔZ has been rounded off, and second, the number of lines will fall somewhere betveen N and 2N. Since ΔZ vas originally calculated to give exactly N lines, using the next lowest power of 2 will never give more than 2N lines. An appropriate value for N depends largely on the type of problem under consideration.

welch07

Figure 7: Particle plots and velocity plots for three different times, showing the Raleigh-Taylor Instability. Gravity in this case is downwards. The MAC method vas used for this run. [1]
Full Size Image

Having found the contour interval, the next step is to find the locations of the contour lines within our system of cells. If Z is defined at the cell center for each cell in the system, then the positions of these values of Z form a rectangular array of points. These points can be thought of as forming a series of triangles (Fig. 8). It can be shown that if a contour line passes between the two points which form one side of a triangle, it must also pass between the two points forming one of the other sides of the triangle (but never both of the other sides). The point where the contour line enters, and the point where the line exits, can be found by a simple linear interpolation and can then be connected by a straight line. Therefore, if we consider each triangle individually, and draw the short segment for each contour line which passes through the triangle, we will have a completed contour plot.

welch08

Figure 8: The positions of the variables form a rectangular array of points which can be thought of as a series of triangles for use in making contour plots.
Full Size Image

Another method used for contour plots is to follow each contour all the way through the system before going to the next contour line.

Figure 9 shows.a set of pressure contour plots for the same problem as that shown in Fig. 7. Each line represents a line of constant pressure. In this problem, the contour interval was an input number and remained the same throughout the run, with only the number of contour lines varying.

The plots in Fig. 10 are four different kinds of plots taken at the same time for the flow of air past a cylindrical cone. The first frame is a velocity vector plot. The second frame is a contour plot of densities. Lines of constant internal energy are shown in the third frame, and the last one is a plot of pressure contours. Although these plots contain much useful information, it is necessary to know somewhat more about the problem in order to meaningfully translate these pictures. They are included here principally to demonstrate another use for contour plots, in this case, as obtained from a FLIC [4] calculation.

welch09

Figure 9: Pressure contour plots for the problem shown in Fig. 7.
Full Size Image

In one of the computer techniques [3], the stream function is one of the variables. Plotting lines of constant stream function produces stream lines. These stream lines show the direction of flow throughout the fluid for the time under consideration. Figure 11 shows stream line plots for the problem illustrated in Fig. 5.

welch10

Figure 10: Four different types of plots for flow past a cylindrical cone using the FLIC method. [4] These plots were all taken at the same time and are, from top to bottom: ·velocity vector plot, lines of constant density, lines of constant internal energy, and lines of constant pressure.
Full Size Image

MOIION PICTURES

In a given computer run, there are usually several hundred time cycles. If plots are made for every time cycle, we have a motion picture which will last for several seconds. These motion pictures are sometimes very useful for demonstrating our techniques, and also give us additional information concerning the nature of the flow.

The most graphic movies are those made from marker particle plots. Marker particle movies have been made for the flow of water from a broken dam (Fig. 2), the flow of water under a sluice gate (Fig. 3), the hypervelocity impact of a cylindrical projectile with a flat plate (Fig. 4), and the Karman Vortex Street (Fig. 5).

A movie of velocity vectors has been made for the bomb shelter problem shown in Fig. 6. Velocity vector movies are not quite as graphic as those made from particle plots, but still clearly show the movement of the fluid in a form which has a nice visual effect.

The streamline plots shown in Fig. 11 have also been put into movie form, and are very appropriate for demonstrating the swirling effect achieved downstream from the obstruction.

These movies have been formed into a short silent film with appropriate titles.

welch11

Figure 11
Full Size Image

SUMMARY

The SC 4020 Microfilm Recorder has been shown to be an effective tool for displaying the results from numerical fluid dynamics computer calculations. These results have been displayed as plots of particle configuration, velocity vector plots, and contour plots.

It has also been shown that a complete sequence of these plots can be made.into a motion picture which shows the fluid flow in a very descriptive form.

ACKNOWLEDGEMENTS

Material for these figures was obtained from A. A. Amsden, R. E. Martin, J.P. Shannon, and J.E. Fromm.

This work was performed under the auspices of the United States Atomic Energy Commission.

REFERENCES

1. The MAC Technique:

F. H. Harlow and J.E. Welch, "Numerical Calculation of Time-Dependent Viscous Incompressible Flow of Fluid with Free Surface," The Physics of Fluids, to be published.

F. H. Harlow, J. P. Shannon, and J.E. Welch, "Liquid Waves by Computer," Science, to be published.

F. H. Harlow and J.E. Welch, "Numerical Study·of Large Amplitude Free Surface Motions," The Physics of Fluids, to be published.

2. The PIC Method:

F. H. Harlow, "The Particle-in-Cell Method for Numerical Solution of Problems in Fluid Dynamics," Proc. Symp. in Appl. Math., Vol. 15, American Mathematical Society, Providence, 1963. (Contains references to earlier applications and variations of the method.)

A, A. Amsden and F. H. Harlow, "Numerical Calculation of Supersonic Wave Flow," AIAA Journal, to be published.

3. Fromm's Method:

J.E. Fromm, "A Method for Computing Nonsteady, Incompressible, Viscous Fluid Flows," Los Alamos Scientific laboratory Report LA-2910, September 1963.

J. E. Fromm and F. H. Harlow,· "Numerical Solution of the Problem of Vortex Street Development," The Physics of Fluids~, 975, July 1963.

F. H. Harlow and J.E. Fromm, "Dynamics and Heat Transfer in the von Urman Wake of a Rectangular Cylinder," The Physics of Fluids 7, 1147, August 1964.

F. H. Harlow and J.E. Fromm, "Computer Experiments 1n Fluid Dynamics," Scientific American, Vol. 212, No. 3, pp. 104-110, March 1965.

4. The FLIC Method:

M. Rich and S.S. Blackman, "A Method for Eulerian Fluid Dynamics," Los Alamos Scientific laboratory Report LA-2826-MS, 1963. The present calculations use a modified version, developed by R. A. Gentry and R. E. Martin, Los Alamos Scientific Laboratory Report, in preparation.