# Stream Function Confusion

• tiredryan
If you substitute in the stream function for u and y and simplify, you get\begin{array}{l}u\quad = \quad x^3\\y\quad = \quad x^3 + C\end{array}which is the same as the Batchelor equation.

#### tiredryan

In Batchelor's text (2000) on page 76, the stream function is defined as

$$\psi - \psi_0 = \int\left(u dy - v dx\right)$$

where $\psi_0$ is a constant

Now I begin with a simple function for $u$ where

$$u = x^3$$

From mass conservation,

$$\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0$$

$$3x^2 + \frac{\partial v}{\partial y} = 0$$

$$v = -3x^2y$$

Plugging this into the equation for the stream function

$$\psi - \psi_0 = \int\left(u dy - v dx\right)$$

$$\psi - \psi_0 = \int\left(x^3 dy + 3x^2y dx\right)$$

$$\psi - \psi_0 = \int\left(x^3 dy\right) + \int\left(3x^2y dx\right)$$

$$\psi - \psi_0 = x^3y + x^3y + C$$

$$\psi - \psi_0 = 2x^3y + C$$

Now using the equations for $u$ and $v$,

$$u = \frac{\partial \psi}{\partial y}$$

$$u = \frac{\partial (2x^3y + C - \psi_0)}{\partial y}$$

$$u = 2x^3$$

$$v = -\frac{\partial \psi}{\partial x}$$

$$v = -\frac{\partial (2x^3y + C - \psi_0)}{\partial x}$$

$$v = -6x^2y$$

I seems like the initial $v=-3x^2y$ and $u=x^3$ are off from the recalculated $v = -6x^2y$ and $u = 2x^3$ by a factor of two. Am I doing something wrong? Thanks.

Hello Ryan.

First off I recommend revising partial differentiation and partial differential equations.

In general with ordinary differential equations we add an arbitrary constant when we integrate them.

With partials you add an arbitrary function.

So your solution of the continuity equation should be

$$\begin{array}{l} \frac{{\partial v}}{{\partial y}}\quad = \quad - 3{x^2} \\ v\quad = \quad - 3{x^2}y\quad + \quad P(x) \\ \end{array}$$

Where P(x) is an arbitrary function of x alone.

You can see that if this is so then differentiation with respect to y will yield the same result, for any P(x) whatsoever.

$$\frac{{\partial u}}{{\partial y}}\quad = \quad \frac{{\partial v}}{{\partial x}}$$