|
[Sponsors] |
April 6, 2007, 18:51 |
stream-function vorticity formulation
|
#1 |
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? |
|
April 6, 2007, 19:03 |
Re: stream-function vorticity formulation
|
#2 |
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 |
|
April 6, 2007, 21:34 |
Re: stream-function vorticity formulation
|
#3 |
Guest
Posts: n/a
|
Can you post the stream function contours?
|
|
April 6, 2007, 21:57 |
Re: stream-function vorticity formulation
|
#4 |
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)
|
|
April 7, 2007, 12:04 |
Re: stream-function vorticity formulation
|
#5 |
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 !! |
|
April 8, 2007, 16:07 |
Re: stream-function vorticity formulation
|
#6 |
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! |
|
April 8, 2007, 16:13 |
Re: stream-function vorticity formulation
|
#7 |
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? |
|
April 11, 2007, 01:16 |
Re: stream-function vorticity formulation
|
#8 |
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. |
|
April 13, 2007, 14:36 |
Re: stream-function vorticity formulation
|
#9 |
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 |
|
April 15, 2007, 23:31 |
Re: stream-function vorticity formulation
|
#10 |
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 |
|
April 16, 2007, 00:59 |
Re: stream-function vorticity formulation
|
#11 |
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 |
|
|
|
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 |