CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   error in contact angle and calculation of pc with interFoam (https://www.cfd-online.com/Forums/openfoam-solving/167194-error-contact-angle-calculation-pc-interfoam.html)

Saideep February 25, 2016 05:45

error in contact angle and calculation of pc with interFoam
 
1 Attachment(s)
Hi Foamers;

I am using "interFoam" solver trying to analyze flow in a 2D rectangular channel where the flow is defined only by capillary forces.

That is, I have a 0 Pa pressure at both inlet and outlet and a zeroGradient for velocity at inlet and outlet with no slip on walls. In short only capillarity is causing flow and no additional external forces are applied. (g = 0).

For the test case i am running it is a Hele- Shaw cell where the heigth of the channel(h) is 25e-6m and along the width I use an "empty bc". So, its an infinite curvature.

Fig1 of model I used.

Since the time I started using interFoam I have heard of an error of about 20% in calculation of the capillary pressure.

For the test case I specified:
Analytic solution for capillary pressure = sigma*(1/R1) = sigma * (1/(h/2*cos (c.a.))) = 0.07 * (1/ (25e-6/(2*cos(45)))) = 4000Pa appox.

But I get a strange value for pc from interFoam solver. It is almost around 40 - 45% error.

Debugging a little more during post processing, I could fit a sphere into the curvature predicted by interFoam and its exact.

A step further, I suspect the contact angle is not exact. That is when i find the c.a. using the co- ordinates of the curvature at the wall, I get a c.a. of around 56- 60 instead of specified b.c of 45.

Using the predicted angle of 60, the error in calculation is around 20% to what we expect from analytic solution.

I used the following bc's for alpha and P over the wall surface, and not sure where the overall error is coming from.

Alpha:
fixedWalls
{
type constantAlphaContactAngle;
limit gradient;
theta0 45;
value uniform 0;
}

p_rgh:
fixedWalls
{
type fixedFluxPressure;
adjoint no;
}


Any advise is welcome.
Thanks,
Saideep

Cyp March 2, 2016 14:40

I experience similar problem. My setup is a tube (length L, radius R). The two ends of the tube have P=0 (no \Delta P). The 2 fluids have the same properties (mu, rho) and have a surface tension \sigma and a contact angle \theta. I initialized with an interface parallel to the wall, and run the simulation. The interface bends to satisfy the wettability condition. Then, it creates a capillary pressure between the two fluids and the meniscus starts to move. The average velocity can be estimated with:

\tilde{v} = \frac{R^{2}}{8 \mu} \frac{\Delta P}{L}

where

\Delta P = P_{c} = \frac{2 \sigma \cos \theta }{R}

the numerical values are overestimated by 40% to 60%.

You're probably right when you said that the implementation of the contact angle is not correct.... We should dig more into that direction..

Cheers,
Cyprien

Saideep March 3, 2016 05:58

Hi Cyprien,
----
I have a question regarding "L = length of channel" in the Hagen- Poisuelle formula that your using.

"Washburn" equation[Wiki] uses the same Poisuelle relation to determine the flow length in a capillary tube.
I was looking in his paper and he related "L" as the flow length of fluid in capillary.
/* Thereby he derives that the flow length is proportional to the square root of time. */

I am just confused what "L" is? Is it the channel length or the fluid displacement length?
----
Further, I have been testing the rectangular capillaryRise test case that we have in openfoam without the influence of gravity. Thinking that Hagen- Poisuelle relation (where L = length of channel) holds good I get slightly lower values than expected. {This could be due to numerical error and also the analytical pc for a dynamic case doesn't hold true to compare the results}.

Digging a bit into this, what I realized is that as we are dealing with a dynamic case where no slip bc is available, resulting in a parabolic velocity profile that disrupts the actual curvature compared to a static case. That is, the capillary pressure is not equal to our Young's equation anymore though the values of both are close by.

I guess this curvature at the center of capillary tube leads to slight change in the c.a. at the wall surface too.

Now the question is, how can we find the accurate pc value when there is flow taking place?

Cheers;
Saideep

Cyp March 4, 2016 19:11

Quote:

Originally Posted by Saideep (Post 587841)
Hi Cyprien,
----
I have a question regarding "L = length of channel" in the Hagen- Poisuelle formula that your using.

"Washburn" equation[Wiki] uses the same Poisuelle relation to determine the flow length in a capillary tube.
I was looking in his paper and he related "L" as the flow length of fluid in capillary.
/* Thereby he derives that the flow length is proportional to the square root of time. */

I am just confused what "L" is? Is it the channel length or the fluid displacement length?
----
Further, I have been testing the rectangular capillaryRise test case that we have in openfoam without the influence of gravity. Thinking that Hagen- Poisuelle relation (where L = length of channel) holds good I get slightly lower values than expected. {This could be due to numerical error and also the analytical pc for a dynamic case doesn't hold true to compare the results}.

Digging a bit into this, what I realized is that as we are dealing with a dynamic case where no slip bc is available, resulting in a parabolic velocity profile that disrupts the actual curvature compared to a static case. That is, the capillary pressure is not equal to our Young's equation anymore though the values of both are close by.

I guess this curvature at the center of capillary tube leads to slight change in the c.a. at the wall surface too.

Now the question is, how can we find the accurate pc value when there is flow taking place?

Cheers;
Saideep

Hi Saideep,

Yes, L means the length of the tube.

It is seems that the solution is better after filtering the alpha1 field before the computation of the curvature. I am just not fully convinced with the pressure and velocity profiles in the vicinity of the interface...

Pc in the formula averaged over the tube radius

Cheers,

Saideep March 22, 2016 09:38

Hi Cyp;

Sorry for the late reply.

Could you let me know what filtering you used for alpha?

I guess this now is directing towards spurious currents problem.

I used smoothing of alpha, k and spurious currents are slightly reduced but still is a concern.

BTW, I have also noticed that the results are even worse for a 3D case compared to a 2D case. {Probably the error is magnified over more number of cells}.

Any idea over this?

Saideep


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