
[Sponsors] 
December 8, 2002, 23:10 
Stream Function

#1 
Guest
Posts: n/a

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. 

December 9, 2002, 06:14 
Re: Stream Function

#2 
Guest
Posts: n/a

buddy
save ur time....use tecplot to do it for u automatically 

December 9, 2002, 06:59 
Re: Stream Function

#3 
Guest
Posts: n/a

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. 

December 9, 2002, 07:03 
Re: Stream Function

#4 
Guest
Posts: n/a

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.


December 9, 2002, 07:09 
Re: Stream Function

#5 
Guest
Posts: n/a

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. 

December 9, 2002, 08:22 
Re: Stream Function

#6 
Guest
Posts: n/a

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. 

December 9, 2002, 09:45 
Re: Stream Function

#7 
Guest
Posts: n/a

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. 

December 10, 2002, 11:53 
Re: Stream Function

#8 
Guest
Posts: n/a

Matlab can plot streamlines given the velocity vector. See the functions "streamline", stream2" and "stream3".


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Compile problem  ivanyao  OpenFOAM Running, Solving & CFD  1  October 12, 2012 10:31 
ParaView for OF1.6ext  Chrisi1984  OpenFOAM Installation  0  December 31, 2010 07:42 
latest OpenFOAM1.6.x from git failed to compile  phsieh2005  OpenFOAM Bugs  25  February 9, 2010 05:37 
Error with Wmake  skabilan  OpenFOAM Installation  3  July 28, 2009 01:35 
Axisymmetrical mesh  Rasmus Gjesing (Gjesing)  OpenFOAM Native Meshers: blockMesh  10  April 2, 2007 15:00 