stream function
Does anyone have a handy code to calculate stream function if the velocity field is given? Thanks.

Re: stream function *NM*

Re: stream function
if you have a velocity (both X and Ydirection) at each of the grid points and you know the distance between each of the grid points it is a simple loop using finite difference to calculate the stream function based on its definition and your bondary conditions

Re: stream function
Assuming use of the finite element method with rectangular elements and velocity data at each corner node, use a Hermite stream function element with stream function and solenoidal velocity component degreesoffreedom at each corner node. The curl of this element gives a divergencefree (vector) velocity element. Use least squares to fit this velocity to your velocity data. This will give the stream function (and fitted velocity) at each node. Interpolation of this data with the original stream function element will give the stream function at any point.

Re: stream function
i have velocity in both i and j direction at all grid points solved by using finite volume method..can any one tell how to calculate stream function using this method..

Re: stream function
I have not done this, but others recommend it: Assign a value to the stream function at some node (perhaps on a noflow boundary). Integrate the normal component of velocity from that node to the next node on a cell. This flux is the difference in stream function value between the nodes. Add this to the stream function at the first node and assign it to the new node. Repeat along all edges of all cells.

velocity vector, streamline and stream function
Dear Sir
My name is Hussam Ali Khalaf, postgraduate student in Iraq and Am currently working on “A Solution Algorithm for Transient Fluid Flow with Multiple Free Boundaries” I have results for velocities values (u and v) in directions x and y for undular bore evolution (please, note the file attachment), rectangular uniform mesh (2Dimension, (i,j)=(22,10)) consists of 20 cells in the horizontal direction (length=12 , ∆x=0.6) and 8 cells in the vertical direction (height=1.6, ∆y=0.2). Am supposed to draw velocity vector, streamline and stream function. I have a program TecPLOT, I have tried several times but I don’t fully understand how TecPLOT reads the results, would you please help me if you have any idea on how to go about it. Thank in advance Yours sincerely Hussam Ali Khalaf Iraq 
Hassam,
My last response was related to finding the stream function in two dimensions. I have not thought seriously about how one computes stream lines in three dimensions. In three dimensions one refers to a vector potential (not quite the same as a stream function) whose curl is the velocity, and to stream surfaces. A stream line is the intersection of two stream surfaces. In 2D, one of these stream surfaces is simply z=constant, and the remaining stream surface is the only one of interest. I have thought that surely the stream surfaces must be a powerful concept, but I have never found a way to use them. I am retired and have limited software resources, mostly an old version of Matlab, and Matlab can display stream lines in 3D. For that reason I do not use Tecplot, but I understand that it is quite powerful. I don't know what format Tecplot uses to input data, so I cannot help you. However, there are others who belong to this forum using Tecplot, so surely one of them could help you. Perhaps you should start another thread asking how you can find the format to input your data into Tecplot. 
Andrew Haye,
do you know fluent? Because there we have a lot of "ready" functions...I wonder if I need to use numerical methods to program stream functions in it or if fluent will automatically do this if I use the given functions, like loop... Thanks, mila 
Sorry, I don't know Fluent so I can't help you.

All times are GMT 4. The time now is 15:35. 