CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Newbie: why use stream function instead of solving for x and y flow components?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2012, 07:54
Default Newbie: why use stream function instead of solving for x and y flow components?
  #1
New Member
 
Join Date: Jan 2010
Posts: 28
Rep Power: 16
bzz77 is on a distinguished road
Hello all:

I'm a chemist. I'm a bit of a newbie to fluid dynamics, so I apologize in advance for any silly questions. I'd appreciate some advice related to an article I'm reading.

This article was written in the 1980s. It is about flow to the top of a container. The author has solved the vorticity equation to get a stream function. The point is to get trajectories of fluid parcels.

I'm curious about why anyone would use this method. Why not just solve for the x and y components of flow? Would there be any advantage to using the vorticity method? Or would this author have used that method because of computational limitations back in the 1980s?

The reason I'm asking is that I would like to make a simple flow model to describe transport of chemical components to the top of a container. I'm wondering whether I should use the vorticity equation and stream function method described in this article or something else. Any suggestions/advice would be very much appreciated! Thanks.
bzz77 is offline   Reply With Quote

Old   January 2, 2012, 13:07
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
My knowledge about the streamfunction-vorticity (SV) method is at textbook-basic programming level but i think it's fair to say:

- The main advantage of the SV method is in 2D computations, where only 2 equations need to be solved (psi and omega) versus the 3 required by a classical approach (u, v and p).

- The continuity equation is satisfied by construction due to the use of the streamfunction (however, there is probably more under the hood)

- There are probably also people using it for 3D computations. I guess, because of the continuity equation advantage

For what concerns the trajectories, if the flow is steady and 2D they coincide with the streamlines so they are easily obtained as contours of the streamfunction
sbaffini is offline   Reply With Quote

Old   January 2, 2012, 15:17
Default
  #3
otd
Member
 
private
Join Date: Mar 2009
Posts: 74
Rep Power: 17
otd is on a distinguished road
I don't have the experience to answer with much certitude. But here's what I think:

Using velocities, you'd be solving for u, v, w, and p (three components of velocity plus fluid pressure). Using vorticity (omega), you'll still have three components (ox, oy, oz ???). You'll need to access the velocities (or the three components of stream function, sx, sy, sz) as you go; that's either more storage or extra calculations. So the vorticity transport may actually cost in overhead, especially for a full-blown 3-d simulation. [For 2d, the vorticity is of course only 1-d]. For two-dimensional flows, psi-omega uses less memory than u-v-p variables, 2 2d arrays vs 3 2d arrays. For a 3-dimensional case (usually not possible in 1980), psi-omega requires 6 3d arrays while u-v-w-p requires 4 3d arrays.

Your speculation about computing power in the 80's is as I recall it. Memory capacity and calculation speed were both very low. [Just for fun I replicated a 1980 CFD calculation by Los Alamos (LA-8355). It was 2-dimensional, a mesh of 20 x 8 cells, incompressible flow.] In 2004, I replicated the calculation on my PC using the same code (updated to Fortran 77). The compute time and answers were essentially identical!)].

Finally, you'll likely be able to find a 2-d u-v code to handle your problem without buying it - or writing it yourself. Perhaps 100 students will read your post and be able to offer their own codes (or their professor's teaching codes) with documentation and examples. This web site also has a list of free codes. I think that psi-omega codes are not so readily available these days.

So, my recommendation is to use the primitive variable approach. You'll be able to add your chemical transport (and other interesting physics) without a lot of drama.

Good luck to you!
otd is offline   Reply With Quote

Old   January 3, 2012, 09:22
Default
  #4
Senior Member
 
Andrew
Join Date: Mar 2009
Location: Washington, DC
Posts: 211
Rep Power: 18
mettler is on a distinguished road
you don't have to worry about the pressure is the main reason. After solving for the velocities you can come back and get the pressure if you need it.
mettler is offline   Reply With Quote

Old   January 3, 2012, 10:31
Default
  #5
New Member
 
Join Date: Jan 2010
Posts: 28
Rep Power: 16
bzz77 is on a distinguished road
Hi everyone:

Thanks a lot for all your help!! Really appreciate it.

Well, it sounds like there wouldn't be any DISADVANTAGE to using the primitive variables method instead of the vorticity-streamfunctions method. It doesn't sound like there's any information I'd miss if I used primitive variables (this worried me).

Also, I agree with otd that it might be best to use the primitive variables method because I'm not confident I understand what is going on under the hood of the vorticity method (e.g., the exact assumptions that are incorporated). My chemistry is quite complex--it would lead to density and viscosity and pressure variations. So there could be simplifying assumptions for using the vorticity-streamfunction method that might get me into trouble.

mettler, do you mean that when using the streamfunction method, we don't solve for P, but we can get it once we have the velocity?

Again, thanks a lot for your patience. It is nice to be able to get some knowledgeable opinions before diving right in and perhaps starting off on the wrong foot!
bzz77 is offline   Reply With Quote

Old   January 3, 2012, 10:55
Default
  #6
Senior Member
 
Andrew
Join Date: Mar 2009
Location: Washington, DC
Posts: 211
Rep Power: 18
mettler is on a distinguished road
yes, when transforming the equations into the stream function - vorticity equations the pressure term drops out.

I highly recommend going thru the math to get to the stream function-vorticity equations. It is not very difficult, but it is rather time consuming. It is just a lot of substitution. But, it will help out in the long run.
mettler is offline   Reply With Quote

Reply

Tags
stream-function, streamfunction, streamline, vorticity


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compressible Nozzle Flow sebastian OpenFOAM Running, Solving & CFD 14 September 21, 2016 11:47
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 15 May 1, 2016 17:12
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
Orifice Plate with a fully developed flow - Problems with convergence jonmec OpenFOAM Running, Solving & CFD 3 July 28, 2011 06:24
ForcesCoeffs ronaldo OpenFOAM 4 September 14, 2009 08:11


All times are GMT -4. The time now is 09:43.