
[Sponsors] 
March 4, 2004, 16:09 
Extracting Stream Function from nodal u,v data

#1 
Guest
Posts: n/a

Hi all,
I have a 2D generalised structured mesh finite volume code based on SIMPLE Scheme. I have another finite element code that can do the mesh adaptation based on Least squares finite element. Currently I am trying out usual drivencavity flow problem. I dump the nodal data i.e. x,y,u,v,p,T from finite volume code and read it into finite element code. Initially I used vorticity (w) as my mesh adaptation criteria. But the adapted mesh does'nt capture the primary and secondary vortices well. Extracting vorticity from nodal u,v was very easy. many papers I saw recommend using streamfunction as adaptation criteria. I am at loss how to extract streamfunction values from nodal values of u and v in my finite element code. Here is what I thought would work (but does'nt) {u} = [B]{psi} (B is the shapefunc derivative matrix) so {psi} = Inv[B].{u} Anybody know how to get this done..... Thanks Abhijit Tilak. 

March 6, 2004, 12:25 
Re: Extracting Stream Function from nodal u,v data

#2 
Guest
Posts: n/a

Solve for streamfunction
Δψ =  ω in Ω ∇ψ . n = 0 on ∂Ω 

March 6, 2004, 13:56 
Re: Extracting Stream Function from nodal u,v data

#3 
Guest
Posts: n/a

Thanks for your reply. Yep!! that's excatly what I did yestarday as last resort. Use FEM code to first evaluate vorticity "w", then solve for streamfunction and adapt the mesh.
I wonder how commercial softwares like TECPLOT evaluate streamfunction from velocity. I could'nt find any info on the web. An intresting observation about the BC you specified. I imagined that a solid surface can be thought of as a streamline and so the streamfunction is constant. You can assign an arbritrary value. so I used psi=0 on entire cavity boundary. Also psi=constant satisfies your BC. Numerically speaking...using your B.C i would not be able to invert the global stiffness matrix...ofcourse i can solve the problem iteratively... Psi=0 still means no flow through the boundary... It is also possible that psi = psi(x,y) and still satisfies nopenetration. In the drivencavity problem I can specify psi=U*y for the moving lid....still it means psi is constant!!! any thoughts?? Thanks Abhijit 

March 6, 2004, 14:20 
Re: Extracting Stream Function from nodal u,v data

#4 
Guest
Posts: n/a

You are right about the bc: the correct one is ψ=constant.
I think the visualization softwares are not calculating streamfunction but evaluate the streamline directly by integration (you can think of passive advection of massless particles which are moving at the local fluid velocity), ie., you start at some point (x0,y0) with velocity (u0,v0) and integrate dx/dt=u and dy/dt=v A high order RungeKutta time integration may be used. The full implementation may be more involved since only discrete values of (u,v) are known. 

March 8, 2004, 12:26 
Re: Extracting Stream Function from nodal u,v data

#5 
Guest
Posts: n/a

There is another way to extract stream function data. There exist fournode Hermite finite elements with the stream function and the solenoidal field components as degrees of freedom. If you take the curl of these functions, you have divergencefree elements with the same degrees of freedom. You can take the vector form and fit it to your computed data using least squares or whatever. Then, simply contour the stream function. The functional form of these elements can be found in a paper titled "II, Some Hermite Interpolation Functions for Solenoidal and Irrotational Vector Fields" at the web site "http://j.t.holdeman.home.att.net/research.htm". Of course you could solve your problem using these elements without the extra step.


March 8, 2004, 17:13 
Re: Extracting Stream Function from nodal u,v data

#6 
Guest
Posts: n/a

This is the way I recall TecPlot generating stream lines. Of course, this is actually a particle streak line.
It has the advantage of being useful in 3 dimensions. The usual stream function becomes a vector in 3 dimensions. Also, for a 2d compressible flow, the stream function is useful only for steady state. But for your gardenvariety 2d flows, incompressible or steadystate compressible, it's a great way to visualize a flow pattern. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Stream function  MartiJ  STARCCM+  0  September 2, 2010 09:52 
Compilation errors in ThirdPartymallochoard  feng_w  OpenFOAM Installation  1  January 25, 2009 07:59 
Problem with compile the setParabolicInlet  ivanyao  OpenFOAM Running, Solving & CFD  6  September 5, 2008 20:50 
Stream function in StarCD  DenizeN  CDadapco  0  September 20, 2006 03:48 
Stream function in axisymmetrical problem  Daniel  CDadapco  0  September 8, 2003 11:20 