CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Bug in OpenFOAM2.3 and 2.4: extra smearing of interface

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 2016, 06:52
Default 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
JULIEN MAES is on a distinguished road
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
rasool_soofi likes this.
JULIEN MAES is offline   Reply With Quote

Old   June 27, 2016, 07:38
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by JULIEN MAES View Post
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)

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:

  • Run the case with interFoam of extend-3.1; the case was build with the extend-3.1 interFoam tutorials (everything is fine)
  • Run the case with interFoam of extend-3.1; the case was build with the OF2.4 interFoam tutorials (bad smearing)
  • You observed smearing using the OF2.4 based case with both, interFoam from OF2.4 and extend-3.1


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
Tobi is offline   Reply With Quote

Old   June 27, 2016, 07:44
Default
  #3
New Member
 
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0
JULIEN MAES is on a distinguished road
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
JULIEN MAES is offline   Reply With Quote

Old   June 27, 2016, 07:50
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
Tobi is offline   Reply With Quote

Old   June 27, 2016, 07:54
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
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.
akidess is offline   Reply With Quote

Old   June 27, 2016, 07:58
Default
  #6
New Member
 
Jun Zhang
Join Date: Jan 2014
Posts: 12
Rep Power: 12
bigfeather is on a distinguished road
Quote:
Originally Posted by JULIEN MAES View Post
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

Attachment 48638

Attachment 48639
Yes, we also found similar phenomena in our test cases. OF 2.3 and 2.4 gave too smearing interface for micro scale droplet, but OF 2.1 works well.

Hopefully someone could solve this problem.
bigfeather is offline   Reply With Quote

Old   June 27, 2016, 07:58
Default
  #7
New Member
 
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0
JULIEN MAES is on a distinguished road
@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.
JULIEN MAES is offline   Reply With Quote

Old   June 27, 2016, 08:13
Default
  #8
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
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.

Quote:
Originally Posted by JULIEN MAES View Post
@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.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   June 27, 2016, 09:36
Default
  #9
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
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.
rasool_soofi likes this.
arjun is offline   Reply With Quote

Old   June 27, 2016, 09:51
Default
  #10
New Member
 
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0
JULIEN MAES is on a distinguished road
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
rasool_soofi likes this.
JULIEN MAES is offline   Reply With Quote

Old   June 29, 2016, 10:56
Default
  #11
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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).
rasool_soofi likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 29, 2016, 11:36
Default
  #12
New Member
 
Julien Maes
Join Date: Sep 2015
Posts: 10
Rep Power: 0
JULIEN MAES is on a distinguished road
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
rasool_soofi likes this.
JULIEN MAES is offline   Reply With Quote

Old   July 1, 2016, 05:10
Default
  #13
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
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
Tobi is offline   Reply With Quote

Old   July 1, 2016, 09:55
Default
  #14
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Tobi View Post
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.

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).
arjun is offline   Reply With Quote

Old   July 16, 2017, 18:03
Default
  #15
New Member
 
Mehdi
Join Date: Jan 2017
Posts: 17
Rep Power: 9
mehdiataei is on a distinguished road
Quote:
Originally Posted by Tobi View Post
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.
Hey,

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.
mehdiataei is offline   Reply With Quote

Old   July 24, 2017, 10:26
Default
  #16
New Member
 
Mehdi
Join Date: Jan 2017
Posts: 17
Rep Power: 9
mehdiataei is on a distinguished road
Hi,

I have communicated the problem with Foundation. See commit 03c63bf7a50a4c966bc97d186910e5a9862f313c in OF4.x for the fix.

Bests,
mehdiataei is offline   Reply With Quote

Old   July 24, 2017, 10:33
Default
  #17
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
https://github.com/OpenFOAM/OpenFOAM...10e5a9862f313c

https://github.com/OpenFOAM/OpenFOAM...d41bcd1f0cee20
Tobi and CFD_POST_IT like this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   July 24, 2017, 10:44
Default
  #18
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Great. Is there a corresponding bug issue number ? Could not find anything right now.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 24, 2017, 10:54
Default
  #19
New Member
 
Mehdi
Join Date: Jan 2017
Posts: 17
Rep Power: 9
mehdiataei is on a distinguished road
I did submit it in private. Since I wanted to share a personal mesh (I did not do it eventually though).
mehdiataei is offline   Reply With Quote

Old   July 24, 2017, 10:55
Default
  #20
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Okay. Thank you very much for the reply. Now it is of interest if the capillary cases work better now.
__________________
Keep foaming,
Tobias Holzmann
Tobi 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
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


All times are GMT -4. The time now is 19:21.