CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Mass conservation problem with multiphaseInterFoam alphaContactAngle (https://www.cfd-online.com/Forums/openfoam/81042-mass-conservation-problem-multiphaseinterfoam-alphacontactangle.html)

andresbh October 14, 2010 09:21

Mass conservation problem with multiphaseInterFoam alphaContactAngle
 
2 Attachment(s)
Hi
I am simulating with multiphaseInterFoam openfoam 1.6 a 2D sessile drop laying on a flat surface with a defined contact angle in alphaContactAngle.

During the simulation the mass of the phase laying on the surface starts do diminish until it completely disappears from the domain (the other way around for the other phase it start to take over the space left).

I have attached the test case to this posting and a plot of the volume of the phase laying on the surface.

Have I set up something incorrectly?

Thank you for your help

Andres

andresbh October 14, 2010 09:24

Mass conservation problem with multiphaseInterFoam alphaContactAngle
 
1 Attachment(s)
A plot with longer time of the phase volume is attached to this post

richpaj October 25, 2010 03:36

Hello there,
I was intrigued by what you had to write as it overlaps with the "numerical evaporation" (!) I had observed some while ago with 3D meshes. As liquid droplets impact and spread over a surface they develop azimuthal kinks which
appear to become sites of rapid mass loss ("evaporation") when the lengthscale of the kink is similar to that of a characteristic mesh cell. Eventually the whole droplet will disappear. At that time we'd reached the limit of the resolution that could be modelled reasonably/efficiently by the computer concerned. Switching to a (high resolution) wedge/axisymmetric mesh avoided that issue owing to the suppression of the orthogonal
coordinate.

I was hopeful then (!) that your 2D problem might show similar anomalous behaviour
to that of our 3D case and which might be easier to examine (given the much smaller mesh size involved). Using OF16x's interFoam and swapping in the materials we happened to be considering over here, however, I found no "numerical evaporation" and indeed the average mass fraction remains close to the initial value.

(As for your particular setup I can only think that possibly a larger domain might help,
and/or certainly a comparison with interFoam.)

There is another factor in the above, namely that as the ratio of "interface area / initial droplet volume" increases then so does the error in the mass balance (or average gamma)
calculation. Additionally, the error increases with characteristic velocity. If these errors
are regarded as unacceptable (up to 10% in the cases we considered) then it might be
worthwhile switching codes to compressibleInterFoam.

Good luck,

Richard K.

LarsPT October 27, 2010 13:15

I think your problem occurs because of your pressure BC at the wall. Try this instead of zeroGradient at the walls!

<patch>
{
type buoyantPressure;
value uniform 0;
}

It should work!

Best regards, Lars!

andresbh November 2, 2010 12:34

solved
 
Hi thanks for your explanations,

LarsPT's solution solved it. But I dont really get it. What does this BC do actually?

Cheers Andres

LarsPT November 2, 2010 12:53

Glad to hear that! It has something to do with the change from pd to p in OF-1.6 (OF-1.7 is solving for p_rgh again, which is the same as pd). There was a thread about it in this forum but I can"t find it right now. Nonetheless, zeroGradient for p results in mass conservation issues.

Lars

Inam April 19, 2023 10:06

Hi all, I am curious to know how the total mass volume was calculated against simulation time (1st attached graph above) ?

One possible approach can be to computationally calculate the flow rate (using surface Flow Filter in paraView OR the flowRatePatch postProcess utility in OpenFOAM) at any simulation time, and then if we manually multiply the simulation time with flow rate, we can know the total mass volume in the domain at that specific simulation time. Is it how this was calculated ?

Is there any way to extract the cell volumes of the only cells that have some mass. Summing these individual cell volumes will give the total cell volume occupied by the mass. Now, this cell vomule can be divided by the simulation time to get the average volume flow rate in the domain. Any advise on how to do it ? Thanks in advance.


All times are GMT -4. The time now is 06:16.