Streamfunction?
What's the definition of streamfunction?
I have seen several articles with steamfunction contour plot showed.Imagining that we have known the velocity field, how to compute the streamfunction? 
Re: Streamfunction?
u =partial p/partial(y) v=partial p/parital(x)

Re: Streamfunction?
The stream function is used in twodimensional incompressible flow. If the flow is divergencefree, then there exists a scalar function (the stream function) such that the flow (velocity) is the curl of this stream function. If one draws contour plots of the stream function, the coutour lines are (stream) lines of flow of the fluid, that is, the flow is tangent to the contour lines.
There are two ways to get the stream function from the velocity. The first is based on the condition that the line integral between two points of the component of the velocity perpendicular to the path is the difference of the stream function values at the end points. Thus if one has divergencefree velocity values at points on a grid, one can assign an arbitrary value of the stream function to one point and find the stream function at an adjacent grid point by computing (or approximating) the line integral above from the original point. Continuing this process, one can assign stream function values to all grid points. A second way, using finite element bases, is to assume an expansion for the stream function with unknown coefficients. One then fits (least squares?) the curl of this stream function to the known velocity field. Of course the flow problem could be solved using the stream function in a Leray decomposition/representation, and calculate the velocity from this. This may have the advantage of solving a smaller system of equations. In three dimensions, one does not have a single stream function. One CAN define stream SURFACES, and the stream lines are the intersection of two stream surfaces. If phi and psi are two such surfaces, then the velocity field can be written as u=((grad psi) cross (grad phi)). (I have tried very hard to find a good use for this, but I have not been successful yet.) I might remark though that in two dimensions, if one considers the stream function as one surface and a plane parallel to the flow plane as the second stream surface, then the coutour (stream) lines are the intersection of these two surfeces. 

how do I call the integral? http://www.cfdonline.com/Forums/vbL...168b0fff1.gifPsi=(Vx)*(y2y1) ????
Yes, that would be OK for flow through a vertical face, with a similar expression for flux through a horizontal face to advance in the xdirection (to the next column?) You use the integral to start the value for next column. Of course you would use a good estimate of Vx, say linear or higher order interpolation. Remembering that the stream function is independent of path, you can check the accuracy of your result by comparing different paths. I do not know fluent. 
I'm working with natural convection in a cavity and when I say next column I mean in the mesh....
thanks for the help! 
All times are GMT 4. The time now is 10:45. 