MAE 360 Aerodynamics

Stream Function Tutorial

Please enter your name:

This lesson should take you approximately 30 minutes to complete. Do not forget to SUBMIT your results at the end of the lesson.

Let us define a function of two variables, , for which we will define the first derivatives as:

For now, is simply the first derivative of with respect to , and is the negative of the first derivative of with respect to . Notice that, for these definitions of and , the function, , automatically satisfies the steady continuity equation in two dimensions: Therefore, if we can define a function that satisfies:

that function, called a "stream function," will describe a legitimate steady, two-dimensional flow. It seems like a very tall order to find such a function, but a sizable number of close-to-realistic flows with engineering significance can be described in such a simple manner. Consider the following example:

Which of the following represents the velocity within this flow field?

The stream function, , is a scalar function of position, i.e., for some value of and some value of the function has some assigned scalar value. In general, can have the same scalar value for different sets of pairs. In the example given above, will equal 1 whenever , so a curve of constant is equivalent to the curve . Consider the case constant . Then the differential of along the curve can be written: Rearranging the last of these equations leads to along the curve . This implies that a curve of constant for which and will have slope given by . To envision the meaning of this, refer to the figure, which illustrates the scenario described by equation 2. The velocity vector, , is tangent to the curve at point so that the ratio is the slope at point . Thus, any curve described by constant is everywhere tangent to the velocity vector. This is the definition of a streamline.

Figure 1. The slope of the curve at point, P, is w/u. By definition, the curve is tangent to V.

Now that we know constant represents a streamline, we can find the streamlines for the flow represented by equation 1 above. The following MATLAB code will plot 11 streamlines for this flow. The plot is restricted to the first quadrant.

% program to compute streamlines from stream function psi = xy

% the function "corner(y,x,p1)" contains the function xy - p1, where p1 is the current constant

clear; warning off; x = linspace(0,5,51); p0 = linspace(0,10,11); hold on; for i = 1:11 p1 = p0(i); if p1 == 0 p1 = .0001; end

clear;

warning off;

x = linspace(0,5,51);

p0 = linspace(0,10,11);

hold on;

for i = 1:11

p1 = p0(i);

if p1 == 0

p1 = .0001;

end

for j = 1:51 y(j,i) = fzero(@corner,1,[],x(j),p1); end

for j = 1:51

y(j,i) = fzero(@corner,1,[],x(j),p1);

plot(x,y); axis equal; title('Streamlines for the stream function \psi = xy for x,y > 0'); axis([0 5 0 5]);

Figure 2 shows the plot of the streamlines. Note that the stream function does not directly tell us the flow direction.

Figure 2. Streamline pattern for flow into a corner.

In which direction is the flow moving? ------------------ Down and to the right To the left and up

Explain how you determined your answer to the above question:

Notice that one of the streamlines in the flow pattern is the x-axis. What is the value of the stream function constant for this streamline?

Keeping in mind your answer to the previous question, what streamline is missing in Figure 2? Explain.

Equation 1 gives the stream function for flow into a corner. The x- and z-axes are the boundaries of the corner. Recalling the definition of a streamline - that the velocity is everywhere perpendicular - the boundaries must then be streamlines since no fluid can pass perpendicular to a solid surface. Conversely, any streamline could represent a solid boundary since the boundary condition that the velocity is everywhere tangent is satisfied at every point on any streamline.

Because of its property that constant defines a streamline, the stream function provides a straightforward way of finding flow patterns. However, streamlines can be determined directly from the velocity field. MATLAB has functions streamline and stream2, which plot streamlines given velocity data.

If a flow is irrotational, the curl of the velocity is zero, or Substituting in the expressions for velocity in terms of the stream function, Thus, the stream function satisfies the Laplace equation for an irrotational flow. As an exercise, show that the stream function defined in eq. (1) satisfies the governing Laplace equation.

Note that the flow must be two-dimensional for the stream function to be defined, whereas the velocity potential exists for three-dimensional flows as well. It is important to remember the differences between the stream function and the velocity potential. Both satisfy Laplace's equation. One can obtain the velocty components from either of them according to

This document created by Scientific WorkPlace 4.0.