# Streamline plotting logic

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 10, 2009, 01:09 Streamline plotting logic #1 New Member   Join Date: Jun 2009 Posts: 10 Rep Power: 10 Sponsored Links hello, I was wondering if anyone could explain the logic of how streamlines are plotted. I have a stream function of a Karman vortex street defined wrt a fixed co-ordinate system. Now, i need to plot the streamlines, I can evaluate the value of the stream function all over the domain. How do I go about plotting the stream lines from there. Also, I would need to plot the same stream function with different frame of reference - i.e. wrt an observer moving with the stream, wrt an observer moving with the vortices. How would I incorporate a change of reference frame in the stream function? Thanks in Advance

 July 10, 2009, 02:22 #2 New Member   sanjay kumar shukla Join Date: Jul 2009 Posts: 4 Rep Power: 10 If you have a stream function and you can evaluate stream function at any point in the domain than what is the problem with plotting. I mean, if you have stream function as function of space coordinates than your problem is solved. make a bit clear about your difficulity that you are facing.

 July 10, 2009, 04:09 #3 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 259 Blog Entries: 6 Rep Power: 11 Level curves of the stream-function will give you the instantaneous streamlines. See http://en.wikipedia.org/wiki/Stream_function

 July 10, 2009, 04:19 #4 New Member   Join Date: Jun 2009 Posts: 10 Rep Power: 10 ^Ah yes, but what logic do I use to code in a level curve plotting function- is it like Search through the domain for a certian value of the function and store all such points and then connect them by a curve Or search in the neighborhood of a point and keep joining the points of equal values

 July 10, 2009, 04:26 #5 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 259 Blog Entries: 6 Rep Power: 11 Generate a grid, evaluate the stream-function on the grid points, and use the resulting data in some visualization software like matlab/paraview/visit/mayavi2 etc.

 July 10, 2009, 04:43 #6 New Member   Join Date: Jun 2009 Posts: 10 Rep Power: 10 ^Thats too easy . I was looking for the logic for plotting the stream lines from scratch - i prefer working with code I personally wrote so that I can mangle it in any way I see fit. Or do you think its really not worth it?

 July 10, 2009, 05:07 #7 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 259 Blog Entries: 6 Rep Power: 11 Unless you have some special needs which existing softwares cannot deal with, it is not worth doing it yourself. If you still want to do it yourself, then the procedure would be close what you described. But first you would need to generate a grid. Choose a set of discrete values for the stream-function. Locate these values in each grid cell and then try to join all points having same value. I think its easier to do this if you use triangular grids.

 July 10, 2009, 05:35 #8 New Member   Join Date: Jun 2009 Posts: 10 Rep Power: 10 Ok, will sleep on it then, thanks for all the help

 July 10, 2009, 08:14 #9 Member   M. Nabi Join Date: Jun 2009 Posts: 44 Rep Power: 10 If you ask about the logic of streamlines: in 2D, the stream function is u=ds/dy , v=-ds/dx and the vorticity is vort=dv/dx-dudy subsitute d^2s/dx^2+d^s/dy^2=-vort you need to solve a poisson equation in each time step to see the moving stream lines. If you are only interested in steady state solution, you can solve this poisson equation once , at the end of simulation.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Fluman Main CFD Forum 2 June 2, 2014 05:51 CFD newbie Main CFD Forum 5 January 7, 2009 15:50 Twiti CFX 0 August 14, 2005 04:44 Karl Kevala FLUENT 0 September 6, 2001 17:47 Hong Main CFD Forum 0 May 18, 2000 08:10