Stream Function
Hi all,
Could someone tell me how to get the stream functions at discrete points when a twodimensional laminar flow problem has been solved with primitive variables. u and v at space coordinates are available. I want to plot the streamlines. Thank you. 
Re: Stream Function
buddy
save ur time....use tecplot to do it for u automatically :) 
Re: Stream Function
If your geometry is simple just integrate u with respect to y setting the surface value to zero. Alternatively just plot the total head
H = p + (u^2 + v^2)/2. which is constant on streamlines for steady inviscid flow and is a good indicator of the streamline behaviour. If you really need the streamlines and your geometry isn't simple then you'll have to integrate the streamline equations and interpolate the velocities from your discrete grid point values. 
Re: Stream Function
If I get the stream function values at discrete points from the computed u and v values, I shall use MATLAB for plot of stremlines using their 'contour' plot command. I know using MATLAB.

Re: Stream Function
Tom,
Thank you very much. (a) "If you really need the streamlines and your geometry isn't simple then you'll have to integrate the streamline equations and interpolate the velocities from your discrete grid point values".  Could you explain it in further details. 
Re: Stream Function
Basically you start with the streamline equations
dx/ds = u, dy/ds = v (*) where s is a parameter on the streamline (u & v are independent of s). Then if you take an arbitrary point in the flow, calling it (x_0,y_0), then the streamline passing through this point can be found by integrating (*) subject to the initial condition x = x_0, y = y_0 at s=0. You can pick, for example, the initial points x_0,y_0 to lie at grid points on the inflow. You can now integrate (*) for each initial point using your favourite ode integration scheme to generate the streamline passing through each point. Now during the integration you will need values of u and v which are not located at grid points. To obtain these values of the velocity simply use bilinear interpolation from the surrounding nearest four grid points. 
Re: Stream Function
As you know,
d(Psi)/dy=u, d(Psi)/dx=v where Psi is the stream function. So the stream function value at point M with respect to a reference point M0 is Psi(M)Psi(M0)= <p style="lineheight: 150%; margintop: 0; marginbottom: 0">/M <p style="lineheight: 150%; margintop: 0; marginbottom: 0">dPsi= <p style="lineheight: 150%; margintop: 0; marginbottom: 0">/M0 <p style="lineheight: 150%; margintop: 0; marginbottom: 0">/M <p style="lineheight: 150%; margintop: 0; marginbottom: 0">vdx+udy <p style="lineheight: 150%; margintop: 0; marginbottom: 0">/M0 This integration is independent of the path so that you can integrate v over [x0,x] and u over [y0,y]. Having the velocity values at discrete points at hand, the integration is very easy. 
Re: Stream Function
Matlab can plot streamlines given the velocity vector. See the functions "streamline", stream2" and "stream3".

All times are GMT 4. The time now is 12:47. 