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

stream-function vorticity formulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 6, 2007, 18:51
Default stream-function vorticity formulation
  #1
Trinity
Guest
 
Posts: n/a
Hi all,

I am trying to solve the lid-driven cavity flow problem in the stream-function/vorticity formulation. I think I have correctly applied the bc's. I am using second order central differencing scheme, with explicit time marching for the vorticity equation, and TDMA to solve the possion equation for stream function.

I am getting some weird results, as can be seen in the vorticity contours here. any ideas as to what i could be doing wrong?

  Reply With Quote

Old   April 6, 2007, 19:03
Default Re: stream-function vorticity formulation
  #2
Trinity
Guest
 
Posts: n/a
It is the symmetry in the vorticity contours that is disturbing me. (Re=100). It made me think that may be i had made a mistake in the convection terms, and i even found one, which i corrected. still the SAME RESULT !! i reversed the sign on the convection term, and noticed a very slight change. I also see that the vortex is too close to the upper wall, and is sort of flattened out rather than circular.

you can see it here

http://i125.photobucket.com/albums/p...ice/stream.png
  Reply With Quote

Old   April 6, 2007, 21:34
Default Re: stream-function vorticity formulation
  #3
otd
Guest
 
Posts: n/a
Can you post the stream function contours?
  Reply With Quote

Old   April 6, 2007, 21:57
Default Re: stream-function vorticity formulation
  #4
Trinity
Guest
 
Posts: n/a
Hi, the second post shows the stream function countours (i know, they look VERY odd...there seems hardly any difference between them and the vorticity ones)
  Reply With Quote

Old   April 7, 2007, 12:04
Default Re: stream-function vorticity formulation
  #5
Trinity
Guest
 
Posts: n/a
Hi folks,

I have been trying to troubleshoot the code, and so far i think it is the BC's which are the troublemakers. If anyone has any other ideas I'd be glad to hear them. I almost feel like I am jinxed when it comes to writing codes- they NEVER run correctly the first time. (being liberal here when i say 'first time'...more like the first 20 times !! ).

The contour plots for stream function and vorticity are in earlier posts, but i'll give the links again to arouse your pity

http://i125.photobucket.com/albums/p...ice/stream.png http://i125.photobucket.com/albums/p75/alpsice/vort.png

The convergence criteria I am using is based on L-infinity norm, it should be less than 1.0E-6. The psi eqn is solved using line by line TDMA and converges in a startling 2 iterations. The vorticity equation uses explicit time marching. With a dt=5.0E-4 on a 128x128 grid, my code converges in about 40,000 steps. The results are not too awful, just not correct. I suspect that it is the BC's which I am not implementing correctly. But any ideas/tips are greatly appreciated !!
  Reply With Quote

Old   April 8, 2007, 16:07
Default Re: stream-function vorticity formulation
  #6
otd
Guest
 
Posts: n/a
I just checked a calculation for this case that I ran a few months back using a primitive variable (finite difference) code. The maximum value for the stream function is between 0.095 and 0.100 and is located at about x = 0.61, y = 0.75. This checked pretty well with the high-resolution (and often quoted) results of Ghia and Shin. My 0.095 contour is roughly circular, while yours is a flat ellipsoid. Your vorticity contours are roughtly symmetrical about x = 0.5, while mine are skewed. My solution is on a 50 x 50 variable mesh with grid lines concentrated towards the walls.

You (and other readers) might consider why your solutions are roughly symmetric about x = 0.5 while Ghia's (and, more recently, mine) show a skewing of the results. I might suggest (and expect other folks to correct me) that your solution appears to be for a smaller Reynolds number, which would suggest that your Reynolds number is missing in one of the diffusion terms - or something similar.

Good luck in sorting this out!
  Reply With Quote

Old   April 8, 2007, 16:13
Default Re: stream-function vorticity formulation
  #7
otd
Guest
 
Posts: n/a
I went back to your plots after finishing the post above.

Your stream function values are much lower than Ghia's. What might that mean about the Reynolds number?
  Reply With Quote

Old   April 11, 2007, 01:16
Default Re: stream-function vorticity formulation
  #8
Trinity
Guest
 
Posts: n/a
Hi otd,

Thanks so much for your constructive suggestions.

turned out I had made a really silly mistake in the TDMA solver. one of the variables had been declared as integer instead of double.

But I am still stuck. The deadline is for tomorrow. I am getting TWO vortices now. the third one (in the lower right corner) is still missing.

  Reply With Quote

Old   April 13, 2007, 14:36
Default Re: stream-function vorticity formulation
  #9
Trinity
Guest
 
Posts: n/a
Hi,

turned out that all the mistakes were in the TDMA solver In the end I bypassed all matrix inversions and just used iterative methods. And it worked !!! I am still going ooh and aaah over the beautiful plots

thanks everyone Trinity
  Reply With Quote

Old   April 15, 2007, 23:31
Default Re: stream-function vorticity formulation
  #10
Biswajit Sarkar
Guest
 
Posts: n/a
Sir,

I am a final year M.E. student of Department of Chemical Engineering, Jadavpur University. I am doing my final year project work on "Computational Fluid Dynamics analysis of Chemical Batch Reactor" under the guidance of Prof. Tapas Kr. Dutta, Department of Chemical Engineering, Jadavpur University.

I have written a program on lid driven flow in "C Language". I have data of u (Horizontal velocity)& v (Vertical Velocity). I want to draw "Stream line plot" with these "u Vs distance" and "v Vs distance" data.

I will be verymuch greatful to u, if u help me.

Thanking you, Yours faithfully,

Biswajit Sarkar

  Reply With Quote

Old   April 16, 2007, 00:59
Default Re: stream-function vorticity formulation
  #11
Trinity
Guest
 
Posts: n/a
If you just want to look at the streamlines (without the value of the stream function as such) you can use Tecplot, which does it automatically.

Else you will have to calculate the stream function from given u and v, and the plot it in matlab or something
  Reply With Quote

Reply


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
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 06:42
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 14:01.