|
[Sponsors] |
Bug in OpenFOAM2.3 and 2.4: extra smearing of interface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 27, 2016, 06:52 |
Bug in OpenFOAM2.3 and 2.4: extra smearing of interface
|
#1 |
New Member
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0 |
Dear all,
It won't be news for some of you that interFoam smears interface in micro-channels for capillary dominated flow. However, this issue got really worse since OF2.3. For spontaneous imbibition in micro-tube, our test cases were running OK with OF2.1 and OF2.2, and became horribly smeared with OF2.3 and 2.4 (example attached). Interestingly, the results are still very good with OF-extend-3.1. I have done some testing, and I ran interFoam-extend-3.1 with OF2.4, and it still horribly smeared so I think the bug is somewhere outside interFoam (I also changed transportModels) As a result, we are migrating our internal development from OF2.4 to OF-extend-3.1, which is quite a work. It will be very useful for us to know what causing the extra smearing of interface, but since it doesn't seem to come from interFoam, this is out of our range of expertise. Does anyone have an idea of where this could come from? Regards, Julien Maes capillaryRisehe-5we-6OF23.zip capCompare.png |
|
June 27, 2016, 07:38 |
|
#2 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Quote:
Dear Julien, if I get the point, you ran the OF2.4 case with the interFoam solver of extend-3.1? Am I right? I repeat what you did:
Please correct me if I am wrong? If it is correct, then there should be the difference in the fvSchemes. Maybe I got it completely wrong.
__________________
Keep foaming, Tobias Holzmann |
||
June 27, 2016, 07:44 |
|
#3 |
New Member
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0 |
Let me clarify:
- I run the case with OF.2.2: no smearing - I run the case with OF.2.3 and 2.4:bad smearing - I run the case with OF-extend-3.1: no smearing - I modified interFoam in OF-extend-3.1 so it can run when sourcing OF.2.4: bad smearing Cheers, PS: I found this thread from 2013, and it's probably related http://www.cfd-online.com/Forums/ope...-0-higher.html |
|
June 27, 2016, 07:50 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Julian,
I checked your case and you 're right. As far as I know they changed a few stuff in the alpha calculation. I can ask my colleague next week because he is also dealing with that model (but modified it completely).
__________________
Keep foaming, Tobias Holzmann |
|
June 27, 2016, 07:54 |
|
#5 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Also related: http://www.cfd-online.com/Forums/ope...tml#post602633
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
June 27, 2016, 07:58 |
|
#6 | |
New Member
Jun Zhang
Join Date: Jan 2014
Posts: 12
Rep Power: 12 |
Quote:
Hopefully someone could solve this problem. |
||
June 27, 2016, 07:58 |
|
#7 |
New Member
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0 |
@akidess
Yes, it is related, although we tried in 3D and found the same problem. So I don't think the problem comes from the empty boundary conditions. |
|
June 27, 2016, 08:13 |
|
#8 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Neither do I. The only reason I linked is because the author observed the same differences as you for OF-2.4 and OF-3.1-ext.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
June 27, 2016, 09:36 |
|
#9 |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
As NGJ pointed out,
"If you are really only using the OpenCFD-release, then the main difference is that OF2.2.x uses the old, explicit version of MULES, while the advection of alpha is solved implicitly with a matrix solver in OF2.3. Consequently, it could be your choice of schemes, approach for the iterations in the linear system of equations, etc. that gives rise to the smearing." This coud be the reason. Based on past experience with such models I would first check this. |
|
June 27, 2016, 09:51 |
|
#10 |
New Member
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0 |
Thanks,
Note that in order to refine the problem, I changed interFoam in OF2.4 so that it is exactly the same as for OF-extend-3.1. Therefore I am not using MulesCorr or LTS, so in both case, alpha is solved with a simple explicitMules. Not sure if the explicitMules is the same from OF2.2, OF2.4 and OFE3.1 |
|
June 29, 2016, 10:56 |
|
#11 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi all,
the diffusion comes from the interfaces fluctuation. The problem on lower scale is, that the fluctuations will not decrease in the order of the mesh refinement hence, comparing the fluctuation in a smaller mesh, the fluctuations are bigger. Hence we get this diffusion stuff. Even in OpenFOAM-4.x. I did not tried it with FOAM-2.2 but as you stated, there the interface fluctuation should be more or less smooth. As an export told me yesterday, this fluctuations occur if we have no gravity there (or same densities). The surface tension is the reason for this oscillation. In the attachment a few pictures. If it is a bug, I don't know. If the density is large enough and the gravity is turned on, the two fluids will separate by nature that will act against this interface fluctuation, hence we get a good interface. For a testcase I just used a round sphere of water. The interface is fluctuating crazy around it and diffuse the interface. If we have smaller grid size, the fluctuation will finally move the droplet and deform it. Even if there should be U = 0, we get it. animation.0004.png animation.0049.png animation.0063.png For larger meshes, the velocity is so small, that it does not influence the droplet and even the interface (in the same time). animation.0012.png animation.0227.png Maybe it is already known here (but for me something new - never thought about that).
__________________
Keep foaming, Tobias Holzmann |
|
June 29, 2016, 11:36 |
|
#12 |
New Member
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0 |
Thanks Tobias,
Smearing of interface is an old problem that should be solved by the interface compression term. In case of cAlpha=1, the fluctuation should not lead to smearing, but rather creates spurious current. See: http://www.sciencedirect.com/science...45793013002612 What worries me here is that the smearing has been solved for previous version of OF but reappears in OF-2.3. But the interface description, the computation of the surface tension force and the compression term seem the same to me. Also, remember that I took interFoam and transportModels (including interfaceProperties) from 2.2 and run it with the rest of the code from 2.3 and I obtained a smeared interface. Something, somewhere in the OpenFOAM-2.3 finite volume library, makes this issue worse and I just can't see what it can be. My best guess is a difference in the schemes that makes the compression term not do what it should do. The best would be to take OF2.2 and slowly change the files to move to 2.3, but that's a hell of a job, and I don't really have time to do it. It would be easier if we know in which folder to look for the differences that create the problem. Thanks for your interest in this topic btw. Regards, Julien |
|
July 1, 2016, 05:10 |
|
#13 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi all,
I briefly checked the solvers of 2.2.0 and 2.3.x. I found a difference in phic but that is not the problem. Even MULESsolveExplicit is the same (I checked it). It is interesting that Henry say this is due to instability of interface for small mesh scales. However, then I do not understand why Foam 2.2 could handle it in a more accurate way.
__________________
Keep foaming, Tobias Holzmann |
|
July 1, 2016, 09:55 |
|
#14 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
Quote:
Personally I would think that it is PhiC that has a problem because solution looks more like first order upwind type than a compressed scheme time. But Henry says otherwise so no argument, he understands openfoam much better. Another potential place to look it construction of upwind node value, when i made mistake with it, it also behaves exactly like this. (not in openfoam but in personal code). |
||
July 16, 2017, 18:03 |
|
#15 | |
New Member
Mehdi
Join Date: Jan 2017
Posts: 17
Rep Power: 9 |
Quote:
Did you guys have any progress in finding the problem? the problem still exists in case of OF4.1. I will try with OE4.1 to see if the problem exists or not. |
||
July 24, 2017, 10:26 |
|
#16 |
New Member
Mehdi
Join Date: Jan 2017
Posts: 17
Rep Power: 9 |
Hi,
I have communicated the problem with Foundation. See commit 03c63bf7a50a4c966bc97d186910e5a9862f313c in OF4.x for the fix. Bests, |
|
July 24, 2017, 10:33 |
|
#17 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
https://github.com/OpenFOAM/OpenFOAM...10e5a9862f313c
https://github.com/OpenFOAM/OpenFOAM...d41bcd1f0cee20
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
July 24, 2017, 10:54 |
|
#19 |
New Member
Mehdi
Join Date: Jan 2017
Posts: 17
Rep Power: 9 |
I did submit it in private. Since I wanted to share a personal mesh (I did not do it eventually though).
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
complex eigenvalues detected for tensor | thegauravonline | OpenFOAM Pre-Processing | 3 | January 14, 2017 06:18 |
flapping console "inverted" on icoFsiElasticNonLinULSolidFoam: FPE | thegauravonline | OpenFOAM Running, Solving & CFD | 3 | May 9, 2016 06:13 |