CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Possible bug in icoFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2007, 13:05
Default Description: The case in ques
  #1
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Description:
The case in question is isothermal transient laminar flow of an incompressible newtonian fluid in a 2D channel which features a square obstacle somewhere inside it. While the velocity fields from both the coarse and fine grids make sense, the pressure field from both is unphysical (i.e. low pressure extending from the channel inlet up to a significant entry length and high pressure near the outlet). The contour plots for both velocity and pressure obtained for the fine mesh are shown below:


Solver/Application:
icoFoam


Source file:
icoFoam.C ?


Testcase:
Coarse mesh (11846 cells) coarse.tar.gz
Fine mesh (47384 cells) fine.tar.gz


Platform:
Linux64 (RHEL 5.0, Ubuntu 7.10)


Version:
OpenFOAM 1.4.1 patched with:
[1] Cumulative patch (http://www.cfd-online.com/OpenFOAM_D...tml?1193779783)
[2] Cyclic patch bug fix (http://www.cfd-online.com/OpenFOAM_D...tml?1194078051)


Notes:

[1] Switching solvers seems to have no effect on the results (i.e. same results on AMG or PCG).
[2] Same results whether you run the case in parallel or serial.
[3] Whether the fine mesh is created using blockMesh directly or using refineMesh once on the coarse mesh, the result is the same.
[4] checkMesh reports no errors on either mesh. There is no non-orthogonality or skewness.
[5] Although I cannot confirm this totally, I am yet to observe any discrepencies when running either case on a 3D mesh. So I suspect this is some problem only in 2D?

Images:

Pressure field from the fine mesh:





Pressure field from the fine mesh (zoom near cylinder):





Velocity field from the fine mesh (zoom near cylinder):


msrinath80 is offline   Reply With Quote

Old   November 19, 2007, 14:56
Default Hello Srinath, A Good day t
  #2
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hello Srinath,

A Good day to you!

I must say... this possible bug you have spoken about seems to be uncannily close to the problem I was talking about a week ago, with the pressure field being unacceptably different when running the same simulation on two computers with slightly different versions of OpenFOAM-1.4.1.

In my case, I had used the stock simpleFoam in both cases, and I too had a perfectly fine looking velocity field, but a different pressure field.

I shall see if I can post a couple of pictures here. I hope I still have those simulations.

I solved it by compiling the latest version of OpenFOAM-1.4.1 from SVN. It really may be some bug that crept into the system because of some change made between the different versions.

Have a nice day!

Philippose
philippose is offline   Reply With Quote

Old   November 19, 2007, 16:14
Default I tested your coarse mesh case
  #3
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
I tested your coarse mesh case with 1.4.1 (with the bug fixes posted on this list) and also our development version 1.4.2 and it runs fine in both and the pressure field is fine. One thing I did notice is that the pressure residual oscillates due to the pure Crank-Nicholson scheme being a little unstable; if you use a small amount of "off-centering" by setting the coefficient to 0.9 or 0.95 it is MUCH better behaved. Alternatively you can use the "backward" scheme which is also second-order but more stable than Crank-Nicholson.
henry is offline   Reply With Quote

Old   November 19, 2007, 17:19
Default Hi Henry, Thanks for your m
  #4
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Hi Henry,

Thanks for your message. I assume that you checked the pressure solution at Endtime (i.e. 10 seconds). I will look into this once again more carefully. Perhaps as Philippose suggests, I need to recompile OpenFOAM just to be sure.
msrinath80 is offline   Reply With Quote

Old   November 19, 2007, 17:41
Default I hadn't but I have now. It a
  #5
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
I hadn't but I have now. It appears that the Crank-Nicholson scheme induces increasingly large pressure oscillations as the run progresses and by 10s is looks very odd and changes greatly between consecutive time-steps. Using a coefficient of 0.9 or 0.95 solved the problem completely.
henry is offline   Reply With Quote

Old   November 19, 2007, 17:56
Default I'm trying it with 0.9 now. Wi
  #6
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
I'm trying it with 0.9 now. Will keep you updated. Thanks!
msrinath80 is offline   Reply With Quote

Old   November 19, 2007, 18:35
Default You're absolutely right. This
  #7
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
You're absolutely right. This was no bug. My sincere apologies to anyone who got scared after reading the title of this thread. Thanks for your help Henry.
msrinath80 is offline   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
IcoFoam aap OpenFOAM Running, Solving & CFD 15 May 28, 2012 09:30
Density in icoFoam Densidad en icoFoam manuel OpenFOAM Running, Solving & CFD 8 September 22, 2010 05:10
About phi in icoFoam kar OpenFOAM Running, Solving & CFD 3 February 20, 2008 06:20
IcoFoam on AIX 53 ds2taieb OpenFOAM Installation 1 March 24, 2006 04:22


All times are GMT -4. The time now is 23:03.