CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Plotting Streamlines (http://www.cfd-online.com/Forums/main/5997-plotting-streamlines.html)

Maciej Matyka April 16, 2003 13:08

Plotting Streamlines
 
Hello,

I am looking for possibility to plot my 2D vector field data with streamlines technique (steady field).

I know that there are two possibilities to do it by myself - to track particle movement or calculate Streamline-function.

So if anybody know aswers for my questions, please.. answer! :)

1. How to calculate Streamline-function from NX.NY values of (u.v)

2. If I am ok with equation (I found it in cfd-online.com archives):

rot rot PSI = rot V

then how to start with solving it?

3. Is available any free software for simple streamlines plot for windows operating system?

I would be very gratefull for any answer. Thank you,

Maciej Matyka http://panoramix.ift.uni.wroc.pl/~maq

ps. After finish of my work on SIMPLE solver, c source code with paper "SIMPLE, so SIMPLE..." will be published on my web page :)

Jean-François Simon April 17, 2003 03:20

Re: Plotting Streamlines
 
Assuming you have Matlab, the streamline function will do the job.

Maciej Matyka April 17, 2003 06:02

Re: Plotting Streamlines
 
Hello, Do you know maybe if Matlab uses tracking particle or streamline function technique?

Jean-François Simon April 17, 2003 08:49

Re: Plotting Streamlines
 
I don't know. I've just read the help file form streamline.m or stream2.m but it don't help a lot on this topic.

May be you can try on the Mathworks site http://www.mathworks.com/

Maciej Matyka April 17, 2003 10:34

Re: Plotting Streamlines
 
Could you send me any example how to do it? I am not familiar with any software like MatLab, I will try do it now, but anyway - I am programmer and using software done by someone else.. brr.. :) Even If it is a Matlab:) My email is maq@panoramix.ift.uni.wroc.pl, I tried to search some examples, and maybe it is easy, but provided examples don't talk to me. I have two files .txt with straightforward NX.NY values of velocity in X and Y directions. Best Regards,Maciek.

kaushik April 17, 2003 10:38

Re: Plotting Streamlines
 
This is a bit descriptive so read on :- By definition Curl(Psi)=V so Curl(curl(Psi))=Curl(V) -> L(Psi)=-Curl(V) where L is the laplacian operator ~ This is a Poisson equation and can be easily solved by writing the Laplacian in CD2 and solving the resulting sparse matrix equation.But you WILL need the boundary conditions for Psi to solve this depending on the problem(This is easy to do in 2D problems- Some fixed constant value on the solid surface + freestream boundary conditions).

Once you've obtained the Psi matrix over [Nx,Ny] just use matlab or gnuplot to get a contour plot which will give you the streamlines of the flow(since your problem is steady the streamfunction contours will correspond to the stream lines)

Finally in steady particle tracking(if I guess what you mean by it, as I am not aware of the jargon) and plotting the streamfunction should give identical results.


Dario April 24, 2003 03:11

Re: Plotting Streamlines
 
Just a curiosity: why do you need the stream function if you have already the velocity field? dy/dx=v/u (known) so that it can be easily integrated.

In this way you haven't to solve the laplace equation that is not so trivial (expecially if the grid is not cartesian)

Bob Roach May 8, 2003 05:39

Re: Plotting Streamlines
 
Dario is correct. You may compute the stream function using the integral relation between it and the velocity components. Once that is done use any contour plotter to plot the lines of constant stream function. Do you need to know how to compute the stream function from the velocity components?

salakta December 17, 2009 15:29

streamlines
 
Yess would you please show me how to calculate streamlines from 2D PIV vector field?

thanks

bineet_aero August 14, 2013 10:55

@Salakta
 
Hey, i am also facing the same problem . I have 2D PIV velocity data and want to plot streamlines in Matlab , Are you able to do it ? Can you please help me

bineet_aero August 14, 2013 10:57

integration of U wrt Y and V wrt X?

bineet_aero August 14, 2013 11:06

Quote:

Originally Posted by Bob Roach
;24448
Dario is correct. You may compute the stream function using the integral relation between it and the velocity components. Once that is done use any contour plotter to plot the lines of constant stream function. Do you need to know how to compute the stream function from the velocity components?

i have 2D PIV velocity data and want to plot streamlines ..can you please help me in this regard ? thanks

bineet_aero August 14, 2013 11:10

Quote:

Originally Posted by Bob Roach
;24448
Dario is correct. You may compute the stream function using the integral relation between it and the velocity components. Once that is done use any contour plotter to plot the lines of constant stream function. Do you need to know how to compute the stream function from the velocity components?

i have 2D PIV data and to plot streamlines.Can you please help me in this regard?
Thanks

FMDenaro August 14, 2013 18:00

just solve the differential equation dy/dx=v/u


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