CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   how is parasitic current now? (https://www.cfd-online.com/Forums/openfoam-programming-development/107861-how-parasitic-current-now.html)

houkensjtu October 8, 2012 09:07

how is parasitic current now?
 
Hi foamers!
As you may known, parasitic current is unrealistic, vortex like velocity resides on two-phase interface when applying VOF method with CSF model.
About 3 years ago there was a thread discussing about this issue in here:

http://www.cfd-online.com/Forums/ope...-currents.html

it seems this problem still remains in current version of OF.
On the other hand, Brackbill et al.(who firstly introduced CSF model to VOF) published a paper dealing with this in about 2009. Also many other researchers paid great effort to reduce the "parasitic current" and much papers were published on this topic in the last 3 or 5 years.
In opensource world, the "Gerris" solver, created by Stephane popinet, also claimed to has solved this problem.

I am just wondering why OF still can not/did not release a parasitic current free interFoam solver. Is there any technical reason behind openfoam makes it difficult to solve?

ps:I will put some of my own test result here...plz comment!

nimasam October 8, 2012 09:43

Hello could you please share mentioned paper here

akidess October 8, 2012 10:39

OpenFoam's multiphase algorithms for two phase flows haven't seen any major changes, so the problems with parasitic currents are still there. OpenCFD is unlikely to release a major update without funding, and I'm guessing that's what's holding them back. Some researchers have published results with improved algorithms based on OpenFoam (e.g. Raeini et al 2012), but to my knowledge no one has released code.

kwardle October 8, 2012 12:29

Well, I am not familiar with the specific example cases of 'solutions' that you mention, but to some degree the issue of parasitic currents is inherent in the interface compression scheme that is used in interFoam (and related solvers). There is a nice paper by Gopala and van Wachem [2008] which compares an interFoam-like compressive scheme versus other methods. One thing I have found that helps significantly is to simply never use a value of cAlpha greater than 1. I don't know why it is higher than this in the tutorials and think this sets people on the wrong course (while I am at it--I NEVER use runTimeModifiable either, huge performance drag, which is also turned on in the tutorials).

Also, I want to mention that you implicitly are making the assumption that alternative methods which 'solve' the parasitic current issue are inherently better for all classes of problems (and that they don't have their own problems). While this may be true for certain surface tension-driven flows, this is certainly not the case for all problems--and not the ones I am personally interested in. OpenCFD HAS done paid development on interFoam-based solvers (e.g. multiphaseEulerFoam)--I have been involved in that--but there the simplicity of the interface compression method and the fact that it is phase volume conserving make it ideal for that solver.

All that said, I think it would be very interesting to see a PLIC version of interFoam with improved methods for surface tension--this would be useful for certain problems.

Just a few thoughts to consider.
-Kent

houkensjtu October 8, 2012 21:51

Quote:

Originally Posted by kwardle (Post 385577)
Well, I am not familiar with the specific example cases of 'solutions' that you mention, but to some degree the issue of parasitic currents is inherent in the interface compression scheme that is used in interFoam (and related solvers). There is a nice paper by Gopala and van Wachem [2008] which compares an interFoam-like compressive scheme versus other methods. One thing I have found that helps significantly is to simply never use a value of cAlpha greater than 1. I don't know why it is higher than this in the tutorials and think this sets people on the wrong course (while I am at it--I NEVER use runTimeModifiable either, huge performance drag, which is also turned on in the tutorials).

Also, I want to mention that you implicitly are making the assumption that alternative methods which 'solve' the parasitic current issue are inherently better for all classes of problems (and that they don't have their own problems). While this may be true for certain surface tension-driven flows, this is certainly not the case for all problems--and not the ones I am personally interested in. OpenCFD HAS done paid development on interFoam-based solvers (e.g. multiphaseEulerFoam)--I have been involved in that--but there the simplicity of the interface compression method and the fact that it is phase volume conserving make it ideal for that solver.

All that said, I think it would be very interesting to see a PLIC version of interFoam with improved methods for surface tension--this would be useful for certain problems.

Just a few thoughts to consider.
-Kent

Thanks for comment!
I do agree with u that reducing parasitic current may not be necessary for certain type of two-phase flow which is not surface-tension driven.
In fact, I noticed parasitic current problem when working on my master thesis. At that time I read several papers which all claimed that they "solved" the problem. I will list some of those papers here:
1. This paper is published by Los Alamos lab.'s research group, which I belive published RIPPLE- a very early two-phase flow solver.
http://www.sciencedirect.com/science...1999105003748#

2. This paper published by Stephane, who created Gerris
http://www.sciencedirect.com/science...199910900240X#

In these paper(though I still didn't fully understand), the problem seems to be oriented in the unbalance between surface tension & pressure force. While in last 3 years, more papers were published and the problem (also the solution method) is becoming more complicated, for example as you mentioned, some calculation tricks may affect the result more than I expected.

houkensjtu October 8, 2012 21:53

Quote:

Originally Posted by akidess (Post 385560)
OpenFoam's multiphase algorithms for two phase flows haven't seen any major changes, so the problems with parasitic currents are still there. OpenCFD is unlikely to release a major update without funding, and I'm guessing that's what's holding them back. Some researchers have published results with improved algorithms based on OpenFoam (e.g. Raeini et al 2012), but to my knowledge no one has released code.

Thanks for helpful information!
I think I need to read more papers because the problem may be not that simple and straight forward as I thought.

houkensjtu October 8, 2012 21:54

Quote:

Originally Posted by nimasam (Post 385550)
Hello could you please share mentioned paper here

Plz see my post above.

houkensjtu October 9, 2012 22:37

1 Attachment(s)
I made a simple test case to measure parasitic current in interFoam.
To be short, I put a static air bubble embed in water, and the radius of bubble is 250 um. All boundary is set as no-slip wall, means velocity are all 0. As initial condition, all velocity is 0.
After 0.0032 second physical time, the velocity field looks like:

Attachment 16108

It seems that the "current" is strongest at the very first of simulation, which I think is because in my initial condition, pressure inside the bubble is equal to pressure in the water, so strong unbalance cause a sudden boost of velocity. And after that, the current trends to be "stable", I mean the magnitude of velocity won't change suddenly, which is the condition I showed in this picture.

The max velocity here is about 0.345m/s.

I also did some simulation inside a microchannel. I will update soon. Plz comment! (especially if i made mistake or misunderstood in my boundary setting, plz point out!)

alberto October 18, 2012 22:03

Ken is correct. In interFoam cAlpha should be 1 for conservative compression (it's written also in the tutorial).

Definitely interFoam and the multiphase solvers in OpenFOAM have evolved quite a bit over the years, and in particular in 2.x.
One factor to consider when talking about VOF methods, is that implementing geometric-based methods on polyhedral grids is on one hand not trivial, on the other hand it's computationally expensive, and in some case it has limitations. Add to this the fact that in a good number of industrial applications a perfect interface reconstruction is not required, but users are more interested in a good estimate of the trends, and you should have a better idea why it often makes sense to use compressive schemes.

If you need higher accuracy there are level-set/VOF based approaches, which provide a much better quality of the interface reconstruction. Of course the computational cost and the complexity of the procedure are significantly higher.

alberto October 18, 2012 22:05

Quote:

Originally Posted by houkensjtu (Post 385832)
I made a simple test case to measure parasitic current in interFoam.
To be short, I put a static air bubble embed in water, and the radius of bubble is 250 um. All boundary is set as no-slip wall, means velocity are all 0. As initial condition, all velocity is 0.
After 0.0032 second physical time, the velocity field looks like:

Attachment 16108

It seems that the "current" is strongest at the very first of simulation, which I think is because in my initial condition, pressure inside the bubble is equal to pressure in the water, so strong unbalance cause a sudden boost of velocity. And after that, the current trends to be "stable", I mean the magnitude of velocity won't change suddenly, which is the condition I showed in this picture.

The max velocity here is about 0.345m/s.

I also did some simulation inside a microchannel. I will update soon. Plz comment! (especially if i made mistake or misunderstood in my boundary setting, plz point out!)

Maybe attach the test case, so we can take a look ;-)

aliqasemi May 15, 2013 14:44

An early version of my code - which may not be exactly what presented in my 2012 paper- was previously uploaded to our groups website:

http://www3.imperial.ac.uk/earthscie...tware/porefoam

It wasn't advertised because I wanted to release my new changes later for unstructured grids, but that is going to be done over this summer. The code also needs, I am speculating, improvements to handle density/viscosity contrasts efficiently, but I am not working on the code anymore. I may occasionally test new ideas to improve the efficiency of the code but not its accuracy, but now I am busy with other stuff.

Improving accuracy of the method for capillary pressure, in my opinion, is possible only through using surface-tracking methods, or using smoothing while applying some filters to keep the interface locally stable.


In any events, I really appreciate any useful feedbacks, either shared over forums, or done more professionally in peer-reviewed journals. I am submitting a paper on the application of the method now, and one other one over the summer, then I will be happy to share more code. The paper themselves should be interesting to those people studying capillary dominated flow too.

dl6tud December 13, 2013 11:39

Does anyone know some literature about the relation between spurious velocities and body forces (e.g. gravity)?

vigneshTG April 15, 2015 11:13

Hi Ali Q Raeini !!
Did you publish the paper ? Can you tell us the title ??


Quote:

Originally Posted by aliqasemi (Post 427813)
An early version of my code - which may not be exactly what presented in my 2012 paper- was previously uploaded to our groups website:

http://www3.imperial.ac.uk/earthscie...tware/porefoam

It wasn't advertised because I wanted to release my new changes later for unstructured grids, but that is going to be done over this summer. The code also needs, I am speculating, improvements to handle density/viscosity contrasts efficiently, but I am not working on the code anymore. I may occasionally test new ideas to improve the efficiency of the code but not its accuracy, but now I am busy with other stuff.

Improving accuracy of the method for capillary pressure, in my opinion, is possible only through using surface-tracking methods, or using smoothing while applying some filters to keep the interface locally stable.


In any events, I really appreciate any useful feedbacks, either shared over forums, or done more professionally in peer-reviewed journals. I am submitting a paper on the application of the method now, and one other one over the summer, then I will be happy to share more code. The paper themselves should be interesting to those people studying capillary dominated flow too.


JULIEN MAES November 12, 2015 11:47

Hello,

I am new to this problem, and I downloaded interFoamSSF from github
https://github.com/aliozel/interFoamSSF

and poreFoam from the imperial college website (shared previously by Ali Raeini).
https://www.imperial.ac.uk/engineeri...e-flow-solver/

I found out that for both codes, the latest version do not kill spurious current for the static droplet case. I might have made a mistake so I will be grateful if other people try it and tell me what they found out.

For interFoamSSF, I switch to the explicit MULES solver for alpha and I am converging quite nicely. However, I realised that the flux of the interface normal vector, saved as nHatf_ in the interface properties class, is never calculated here, so always equal to zero. This vector is used when we calculate the artificial compression part in the equation for alpha. Therefore, this is equivalent to set cAlpha=0.

Does this mean that for SSF, we should not use any artificial compression?

Cheers,

Julien

kmou February 26, 2016 07:30

Quote:

Originally Posted by JULIEN MAES (Post 573067)
Hello,

I am new to this problem, and I downloaded interFoamSSF from github
https://github.com/aliozel/interFoamSSF

and poreFoam from the imperial college website (shared previously by Ali Raeini).
https://www.imperial.ac.uk/engineeri...e-flow-solver/

I found out that for both codes, the latest version do not kill spurious current for the static droplet case. I might have made a mistake so I will be grateful if other people try it and tell me what they found out.


Julien

Hi Julien,
A few months later, do you have any luck with the static droplet case and spurious currents?
Camille

JULIEN MAES February 26, 2016 07:45

Hi Camille,

Yes, I did make some progress. For interFOAMSSF, I changed the MULES solver for alpha to explicit. I kill spurious current for the static droplet case. However I moved on to a moving droplet case and the results are not very good. Another important remark is that in the version of InterFOAMSSF I found on github, the interface normal vector nHatf_ is never updated in interfaceproperties.cpp. This vector is used for compressing the indicator alpha so it is very important to correct this problem.

For poreFOAM, I modified the code I found online so that it does exactly what's inside Ali Raeini's thesis and it works perfectly for static and moving droplet. However, it does not converge for more complex test case of pore invasion, while Ali's code that you find online seems to give me coherent results. We are currently working to get a code that would solve both droplet and more complex pore invasion test cases.

Regards,

Julien

chubb87 June 6, 2016 07:29

Hi Julien,

what were the changes in poreFOAM you had to do compared to the paper? Are these changes now included in the source code that can be downloaded? I might also give it a try.

akidess June 8, 2016 02:26

Thanks for the hint Julien, I finally got around to pushing this change to the repository. Crazy noone (including me!) noticed the missing update of nHatf until now :eek:

poreFoam still contains a lot more stuff I don't have time to implement in interFoamSSF. You can find it here: https://figshare.com/articles/poreFoam_package/1155422

Quote:

Originally Posted by JULIEN MAES (Post 587000)
Hi Camille,

Yes, I did make some progress. For interFOAMSSF, I changed the MULES solver for alpha to explicit. I kill spurious current for the static droplet case. However I moved on to a moving droplet case and the results are not very good. Another important remark is that in the version of InterFOAMSSF I found on github, the interface normal vector nHatf_ is never updated in interfaceproperties.cpp. This vector is used for compressing the indicator alpha so it is very important to correct this problem.

For poreFOAM, I modified the code I found online so that it does exactly what's inside Ali Raeini's thesis and it works perfectly for static and moving droplet. However, it does not converge for more complex test case of pore invasion, while Ali's code that you find online seems to give me coherent results. We are currently working to get a code that would solve both droplet and more complex pore invasion test cases.

Regards,

Julien


JULIEN MAES June 8, 2016 05:13

@chubb87 the changes I have made simply revert to a previous version of poreFOAM, which gives better results for the cases of single droplet, but not very good results for test cases in microchannels and micro-CT images, so it is not such a good idea to do them anyway. You should download poreFOAM and have a look at it, it is very interesting.


All times are GMT -4. The time now is 02:46.