# Graph function help - fluid mechanics/streamlines related

1. Nov 29, 2006

### elle

Graph function help plz - fluid mechanics/streamlines related

I'm not too sure whether I should have posted this in the Physics section or in the maths Please move this topic if its in the wrong place!

this probably seems like a silly question but is it possible to plot x*y + c on a graph where c = a constant? I'm working on a question on fluid mechanics where I have to find the streamfunction and plot the stream lines. However I'm in doubt whether i have done the question correctly in the first place.

1. The problem statement, all variables and given/known data

For the 2D velocity field u = xi - yj find the streamfunction 'psi' (apologises, I'm not too familiar with Latex)

2. Relevant equations

given above

3. The attempt at a solution

After partially differentiating and using formulas from my notes, i got psi = x*y + c

2. Nov 29, 2006

### HallsofIvy

Staff Emeritus
What do you mean by "plot x*y+ c". That's neither a function nor an equation. If you mean xy= c or xy+ c= 0, then, yes, of course, you can plot it- it's a family of hyperbolas.

Then $\nabla \psi= x\vec{i}- y\vec{j}$, right?
So
$$\frac{\partial \psi}{\partial x}= x$$
and
$$\frac{\partial \psi}{\partial y}= -y[/itex] That should be easy to integrate. Perhaps I am misunderstanding your "stream function". I get the orthogonal family to xy= C which would be the potential function. 3. Nov 30, 2006 ### arildno You are confusing "stream function" with "velocity potential", HallsofIvy! A stream function may always be defined if the velocity field is solenoidal, i.e, [tex]\nabla\cdot{\vec{v}}=0$$
In the 2-D case, we may define: $$\vec{v}=\nabla\times\psi\vec{k}$$, where $\psi$ is the scalar stream function.

The analogue in electro-magnetism is called the magnetic vector potential, I believe..

Last edited: Nov 30, 2006
4. Nov 30, 2006

### HallsofIvy

Staff Emeritus
Very likely- it's been a long time since I have looked at fluid dynamics.

So the equations are
$$\frac{\partial \phi}{\partial x}= y$$
and
$$\frac{\partial \phi}{\partial x}= x$$

Yes, that tells us that $\phi(x,y)= xy+ c$.
Since the stream lines (again, if I remember correctly!) are the lines on which $\phi$ is a constant they are given by xy+ c= c' or xy= C, the hyperbolas that my family, $x^2- y^2= c$ are orthogonal to.

elle, perhaps your only problem was not realizing that you get an equation to graph by setting your solution for $\phi$ equal to a constant.

5. Nov 30, 2006

### elle

ohh yeah! I forgot that its equal to a constant Thanks guys for the help