Monday 18 February 2013

Streamlines & Streamfunctions

In any fluid flow situation, the basic quantity of interest is the velocity field. How the velocity of the fluid is distributed in space and how it changes with time is to be described in some convenient fashion. Simply writing the velocity field as $ \vec{V}(x,y,z,t) $ will do this task for us. (Read that as the velocity vector being a function of both space and time). But we would like to find out if there are some clever ways of describing this velocity field so that it becomes easy to visualize the flow or simplifies the mathematical analysis considerably.


Streamlines are one such way of representing the flow field. A streamline is drawn such that the flow is parallel to it at every point. Let us take the example of flow over a circle. Look at the following figures.

Streamline pattern of flow over a circle



Flow of water over a circular cylinder. Streamlines are made visible by aluminum powder
Note that these show the flow at very low speed. In both the figures, we see a smooth flow over the shape of the circle. We also see that the streamlines, which started out equally spaced in the beginning, tend  to become closer near the top and bottom of the circle. It is found that the velocity is higher in the regions near the top and bottom of the circle. This can be explained in the following way:

Since streamlines are parallel to the flow direction, there is no fluid flow across them. So, whatever mass of fluid that had entered the region between two streamlines has to continue to flow between the same streamlines. Assuming steady mass flow rate, we expect the velocity to increase when the streamlines become closer together. This is just like the situation where slightly closing the mouth of a garden hosepipe leads to increase in water speed. Both phenomena are explained by the conservation of mass principle which states that whatever mass that goes in, comes out provided nobody adds/subtracts anything inside.

Though the pictures show the streamline pattern of two-dimensional fluid flows past a circle, it is not difficult to imagine streamlines in three-dimensional flows.

If someone gives us the velocity field of a flow, how do we draw the streamlines? It is very simple. Let $ \vec{ds}$ be a small segment of a streamline. Then, since streamline is parallel to the velocity vector at every point, we expect that the cross product of $\vec{ds}$ and $ \vec{V}$ is zero. i.e.,
$$ \vec{ds} \times \vec{V}= \vec{0} $$
Simplifying this, we get,
$$\frac{dx}{u}=\frac{dy}{v}=\frac{dz}{w}$$

which are the differential equations for the streamlines.
(Note: $ \vec{ds}=dx  \hat{i}+dy  \hat{j}+dz  \hat{k}  ;   \vec{V}=u \hat{i}+v \hat{j}+w \hat{k}$)

Usually, the streamlines are given as constant lines of a function called the streamfunction $\psi (x,y)$ which is defined in the following way:
$$u=\frac {\partial \psi}{\partial y} ;  v= -\frac {\partial \psi}{\partial x}$$

If we define the streamfunction in this way,  we see that it is not straightforward to extend this idea to three-dimensional flows. Also, many text books state that the streamfunction is used only in two-dimensional flows. This is surprising since we know that streamlines can also be drawn for 3-dimensional flows. Why is it so? To answer this, the idea of streamlines must be introduced in a more general way as follows.

Consider streamlines in a three-dimensional fluid flow. Any curve in three-dimensional space can be thought of as the intersection of two surfaces. Let us say these surfaces are $\psi_1$ and $\psi_2$. We must be able to get these surfaces $\psi_1(x,y,z)=c_1$ and $\psi_2(x,y,z)=c_2$ as integrals of the differential equations of the streamline. Assuming that we have got them, lets have a look at the following figure.



Since the velocity vector $\vec{V}$ is lying on the streamline and hence on the surface $\psi_1$, we expect that grad $\psi_1$ is perpendicular to $\vec{V}$. So,
$$ \vec{V}\cdot \vec{\nabla\psi_1} = 0$$
Since the streamline also lies on $\psi_2$, this is also true for the surface $\psi_2$.
$$ \vec{V}\cdot \vec{\nabla\psi_2} = 0$$

In three dimensional space, if a vector is perpendicular to two different vectors, then it must lie perpendicular to the plane created by those two vectors. In other words, the first vector must be expressible from the cross product of the other two vectors. i.e.

$$\mu \vec{V}= \vec{\nabla\psi_1}\times \vec{\nabla\psi_2}$$

where $\mu$ is a constant and it changes from location to location. ($\mu =\mu(x,y,z) $). This is the equation that expresses the velocity field in terms of streamfunctions in three-dimensional flows.

From vector calculus, we know that if $\psi_1$ and $\psi_2$ are two scalar functions of position, then,
$$\nabla \cdot  (\vec{\nabla\psi_1}\times \vec{\nabla\psi_2}) = 0 $$

Hence, we require that,
 $$\nabla \cdot (\mu(\vec{r}) \vec{V}) = 0$$

This condition needs to be satisfied by $\mu (\vec{r})$.

Thus, in three dimensional flows, if we want to to introduce the streamfunction, we are effectively introducing 3 new scalar functions of position, namely, $\psi_1(\vec{r}) , \psi_2(\vec{r})$ and $ \mu(\vec{r}) $. The velocity vector field is itself made-up of three scalar fields, namely the components $u(\vec{r}),v(\vec{r})$ and $w(\vec{r})$. So we are not simplifying anything by rewriting the velocity field $\vec{V}$ in terms of streamfunctions, but in fact we are complicating stuff here. Because all this $\psi$ comes under a gradient sign and a cross product. We also need to solve a new equation $\nabla \cdot (\mu\vec{V}) = 0$. This is not what we want to do to simplify the analysis. Hence, in three dimensional flows, though it is possible to define streamfunctions, it is just not practically efficient.

In some special cases, we already know the function $\mu$ for the flow. They are the cases where the idea of a streamfunction could simplify the analysis. For example, consider incompressible fluid flow. The continuity equation states that,
 $$\nabla \cdot \vec{V} = 0$$
So, here we know a priori that $\mu=1$ everywhere in the flow field. Still, this leaves us with two scalar functions to represent the velocity field. But in the case of two-dimensional flows, the equation of streamlines read,
$$\frac{dx}{u}=\frac{dy}{v}=\frac{dz}{0}$$
From the last equation, $dz = 0$. Then, 
$$ z = constant $$  
Thus the plane of the flow is a streamsurface. We just need to find out where the other streamfunction intersects this to draw the streamlines. Hence, knowing one of the streamfunctions $\psi_1$ beforehand, only one unknown scalar function, namely $\psi(x,y)$, is required to describe the velocity field. This simplifies the mathematical analysis considerably as expected. 

The answer to our question becomes clear now. In two-dimensional incompressible flow, the introduction of a streamfunction simplifies the analysis. But in other cases, it is not practically useful to do so. 

P.S.:- It can be shown that introducing a streamfunction is useful in steady, 2-D compressible flows and axisymmetric flows by similar arguments.