CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Question about interface flow and adaptive mesh (

Luckyluke (Luckyluke) January 3, 2005 21:28

Hi,everyone.I am a newbie to
Hi,everyone.I am a newbie to OpenFOAM and attracted by its fancy features.

I want to simulate some interface flows. I know current FOAM has several sovlers on interface capturing(VOF). But I am not sure for some problems of FOAM's use.

(a).If I want to model the interface between two compressible fluids,will it be boring to code?
(b).Can I use adaptive mesh when I model interface flow?
(c).If I want to build a new interface capturing technique(e.g. Level Set method), what should I do?

Will you be so kind to give me some advice?

Niklas Wikstrom (Wikstrom) January 4, 2005 04:40

Hi there, will try to answ
Hi there,

will try to answer some of it

(a) Coding is fun by nature :-) So the answer is no. It is more or less there already. Seems to be working fairly well, although I have used the CICSAM scheme by Ubbink (from an older foam version) to keep the interface sharp. There might be a bug in the CICAM in OpenFOAM, which we will report as soon as we are certain. Presently I am working with a very old Foam version, but will move to open foam before spring and by then I could post a CICSAM based interFoam that works very well for me.

(b) Yes, but I have not tried it with the present foam versions new mesh handling. Things like this tend to be plesantly easy with FOAM. However, there are allways surprises, and you will not get the hang of it right away...

(c) LevelSet relies, in my experience, rather heavily on (W)ENO schemes, and I do not think any such scheme is implemented in the release. I tried a couple of years ago to create a second order ENO, but it was a cheaty implementation that only worked OK on cartesian meshes. Everything is possible, but some things gets tricky on unstrictured meshes when you want to know your neighbours neighbour. In my opinion a WENO scheme woiuld be great in OpenFOAM! (Maby some of the GammaXXX schemes are useful??)


Henry Weller (Henry) January 4, 2005 04:56

(a) The CICSAM scheme has lon
(a) The CICSAM scheme has long since been superceeded by a much more accurate, stable, flexible and reliable approach I developped a few years ago which is used in the current version of interFoam included in the OpenFOAM release. CICSAM is no longer supported and will be removed in subsequent releases.

Niklas Wikstrom (Wikstrom) January 4, 2005 07:10

(a) Ubbinks scheme is indeed
(a) Ubbinks scheme is indeed bahaving very well, and it would be a pity to remove it from OpenFOAM, but as said; There was a bug in it (a typo I think, which remained at least up to foam2.1) that was fixed by Eric, making it MUCH better. Further I do not know how well OpenFOAM would cavitate using the "explicit" compression in the present interFoam.

Henry Weller (Henry) January 4, 2005 07:21

There are many problems with
There are many problems with the traditional VOF scheme in particular for stationary bubbles and for cases with high surface tension. My new approach has solved these and other problems and has enabled us to solve a wide range of problems we simply could not do with the old method for example a 20micron ink-jet and the LES of a Diesel spray breakup.

I do not understand why you think my new method will not do cavitation as well as the old method.
What problems have you experienced with the new algorithm? So far we have had no complaints and as far as I am aware it is better in every way to the old VOF method but still not anywhere near perfect.

The old VOF method is not supported in OpenFOAM and has not been released in the commercial versions of FOAM for some years and we do not intend to reinstate it. If you wish to release and support your VOF work using CICSAM please feel free to do so.

Niklas Wikstrom (Wikstrom) January 4, 2005 08:21

I know it's a good scheme, th
I know it's a good scheme, the new one. I'm not saying that I don't think it will work with mass transfer; Only that I don't know that it will, as I have not tried it for a long time. I will before long though, and I hope it will work nicely.

To be honest, I'm can't say that i KNOW that the old vof+cavitation method is working either, but from time to time I get results...

Anyway, I feel free :-)

Ali (Ali) January 4, 2005 15:08

I also believe there maybe a
I also believe there maybe a problem in CICSAM implementation in OpenFOAM. If you try a static bubble and use interface tracking to see how big the spurious currents become, interFoam does perform well and it goes on a long time without a very sharp increase in spurious currents in time. However, if you use the CICSAM version that's in OpenFOAM, after a short time it kind of blows up, timestep decreases orders of magnitude and it simply doesn't proceed in time anymore.

From what I've experienced with other VOF methods, CICSAM shouldn't perform so awful, even with worse VOF methods and worse surface tension models, it shouldn't blow like that, the magnitude of spurious currents should be higher if you use crappy VOF or surface tension models, but not 5 orders of magnitude anyway.

I don't know, but I just suspect there still may be a problem in CICSAM implementation in OpenFOAM. I'm saying this because Ubbink has tested stationary bubble in his thesis and at least it didn't blow like that in such a short time.

Niklas, could you please say what was the bug that you fixed? I need to check whether it's been removed from OpenFOAM or not.

Ali (Ali) January 4, 2005 15:10

Also, what's your idea of sch
Also, what's your idea of schemes that act similar to WENO in OpenFOAM, is there such a scheme similar to WENO in openFOAM?

Henry Weller (Henry) January 4, 2005 15:15

There is no problem with CICS
There is no problem with CICSAM in OpenFOAM it's just that the code it was supposed to be used with isn't released with FOAM anymore and it absolutely definitely positively should not be used with the new interFoam in OpenFOAM which uses a completely different approach to interface compression. If you do it will blow-up -- definitely!

I have also run the bubble cases with the new interFoam and got very good results but you do have to make good choices for the discretisation schemes and interface compression coefficient.

Ali (Ali) January 4, 2005 15:48

Which code has been eliminate
Which code has been eliminated? Does FOAM2.2 has those code as FOAM2.2 is the oldest one I have. It would be really cool to compare them.

For pure VOF advection tast cases (without solving NS equations) such as the shear flow in Ubbink's JCP paper, from what I tried, interFoam did not keep the interface as good as CICSAM. That's why I don't understand which code has been removed from OpenFOAM. Since interFoam (at least with schemes and coefficients that I tried and the schemes were similar to damBreak case), didn't perform as good as CICSAM in putre advection cases. But when you turn on the NS equation solver, the reverse happens. CICSAM blows very soon.

May i know the optimum schemes and coefficients please?

Henry Weller (Henry) January 4, 2005 15:55

I originally introduced the c
I originally introduced the current interFoam as newInterFoam and maintained the old code using CICSAM called interFoam. However, it quickly became apparent that the new code was at least as good as the old code for simple problems and much better at more difficult problems and we decided there was no point in maintaining the old code so I removed it and renamed newInterFoam as interFoam. This change occured before FOAM2.2.

The optimum schemes and coefficients depends on the case and what you are trying to achieve with respect to interface capturing, mesh distortions etc. If there was a simple optimum choice for all cases I would have harded-coded it.

Henry Weller (Henry) January 4, 2005 15:59

P.S. To remove any posibilit
P.S. To remove any posibility for confusion in the future I have now deleted the CICSAM scheme from OpenFOAM because the release does not include any codes for which this scheme is appropriate.

Ali (Ali) January 4, 2005 16:05

From what I understand, I can
From what I understand, I can easily reoproduce CICSAM by removing the third term in gammEqn.H so we don't need the term containing 'phirb' anymore. And then remaking it as another application say interFoamCICSAM.

And in fvSchemes, simply define Gamma CICSAM 0.5 as the scheme for div(phi,gamma). We don't need to define div(phirb,gamma) anymore.

I think that's about it. Is there anything else I should do to get CICSAM?

I needed to know the optimum schemes and coefficients for pure VOF test cases such as shear flow in Ubbink's JCP paper. Seems the interFoam with default schemes that are used in damBreak, don't perform as good as CICSAM.

Henry Weller (Henry) January 4, 2005 16:21

After Onno Ubbink left Imperi
After Onno Ubbink left Imperial College I spent a VERY long time trying to get the VOF approach with CICSAM to work reliably for a wide range of application in particular for cases with high surface tension and ones with a stationary interface. For the latter case CICSAM (and other numerical compression schemes) the interface breaks-up in the presence of divergent flow and this is a fundamental limitation of the approach as noticed by Onno himself. To solve these and other problems I created the new algorithm which does not use a compressive convection scheme in order to sharpen the interface thus avoiding the limitations of the VOF/CICSAM approach altogether. For obvious reasons I no longer work on or support CICSAM.

You will have to investigate the best choices of schemes for the new interFoam as is required in all areas of CFD.

Vatant (Vatant) January 4, 2005 17:57

Hello How can the interF

How can the interFoam be used to simulate a cavitating Flow ? I couldnt see any test cases for cavitating flow simulation in OpenFoam. Can someone let me know how cavitation model can be implemented in interFoam?


Niklas Wikstrom (Wikstrom) January 4, 2005 18:05

Sorry Ali, I'm presently pani
Sorry Ali, I'm presently panicking about a report thats far from finished and cannot answer right now. When I've calmed down somewhat me and Eric will look into the stuff not yet erased from my drive and see how it looks. Send me an email-reminder soon please!, so we can talk about it "off the record" :-)

As to the ENO/WENO: Not a clue. As said: they are rare on unstructured meshes, I believe. Try! Maby implement a reinitialisation equation solve (as in Level-Set) and try solving it with different schemes :-)


Henry Weller (Henry) January 4, 2005 18:05

What cavitation model do you
What cavitation model do you wish to use?

Vatant (Vatant) January 4, 2005 18:12

I would like to use a homogen
I would like to use a homogenous model . Since, a VOF formulated model with interface trackingof the cavitation bubbles would be computationally demanding and expensive or is it ?

Is it possible to use a homogenous model with interfoam with 3 phases, the liquid , its vapor and the air outside. I have some formulations but Im finding it hard to include them into the codes.

Henry Weller (Henry) January 4, 2005 18:33

It is not appropriate to use
It is not appropriate to use the Barotropic eqn of state approach with HEM with interface compression because the interface should not neccessarily be sharp because the model doesn't require it. This is both an advantage and disagvantage of the HEM. However, ther rest of the components of a VOF code can be used.

I have written a 2-phase caviation code based on the Barotropic eqn of state and hope to release it in the next version of OpenFOAM if I get enough time to integrate it and add the pre/post-processing stuff. I haven't yet extended it to include the presence of a third phase and will only do so if I can find sponsorship for this work.

Ali (Ali) January 4, 2005 18:58

Henry, I know interFoam is

I know interFoam is better than CICSAM in most cases, but anyway it's good to have two interface capturing instead of one if they can exist together in the code. I would appreciate if you let me know if my idea is correct or not about converting the code run CICSAM. Isn't it enough to just change gamma equation and use compressive schemes in convection term in order to get CICSAM? What other codes are removed that are necessary for CICSAM to work?

Thanks, I'll contact in few days.

All times are GMT -4. The time now is 15:07.