CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Non-physical alpha1 with interFoam and high contact angles (https://www.cfd-online.com/Forums/openfoam-solving/108812-non-physical-alpha1-interfoam-high-contact-angles.html)

 steph79 November 2, 2012 00:37

Non-physical alpha1 with interFoam and high contact angles

Hello all,

I'm using OpenFOAM 2.1.1 (interFoam solver) to model water droplet impacts on superhydrophobic surfaces with very high constantAlphaContactAngle - 163 degrees. In short, it's an extension of the dam break tutorial where there's an initialised droplet of water within the domain which, after a period of time, will impact on a superhydrophobic surface. Here are my BC's;

Code:

```FoamFile {     version    2.0;     format      ascii;     class      volVectorField;     location    "0";     object      U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions      [0 1 -1 0 0 0 0]; internalField  uniform (0 0 0); boundaryField {     substrate     {         type            fixedValue;         value          uniform (0 0 0);     }     atmosphere     {         type            pressureInletOutletVelocity;         value          uniform (0 0 0);     }     defaultFaces     {         type            empty;     } }```
Code:

```FoamFile {     version    2.0;     format      ascii;     class      volScalarField;     object      p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions      [1 -1 -2 0 0 0 0]; internalField  uniform 0; boundaryField {     substrate     {         type            totalPressure;  // zeroGradient; has also been attempted         p0              uniform 0;         U              U;         phi            phi;         rho            rho;         psi            none;         gamma          1;         value          uniform 0;     }     atmosphere     {         type            totalPressure;         p0              uniform 0;         U              U;         phi            phi;         rho            rho;         psi            none;         gamma          1;         value          uniform 0;     }     defaultFaces     {         type            empty;     } }```
Code:

```FoamFile {     version    2.0;     format      ascii;     class      volScalarField;     object      alpha; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions      [0 0 0 0 0 0 0]; internalField  uniform 0; boundaryField {     substrate     {         type            constantAlphaContactAngle;         gradient        uniform 0;         limit          none;         theta0          163;         value          uniform 0;     }     atmosphere     {         type            inletOutlet;         inletValue      uniform 0;         value          uniform 0;     }     defaultFaces     {         type            empty;     } }```
Now I've tried this for 90 & 100 degrees and it works fine, but with 163 degrees alpha1 becomes strongly non-physical and this appears to be the case irrespective of Courant number conservativeness, the number of alpha sub cycles and (in the following case) very strict tolerance criteria. See below;

Code:

```Courant Number mean: 0.00770252 max: 0.487324 Interface Courant Number mean: 0.000653673 max: 0.474258 deltaT = 1.13562e-05 Time = 0.0803864 MULES: Solving for alpha1 Phase-1 volume fraction = 0.00347786  Min(alpha1) = -0.353626  Max(alpha1) = 1.00404 MULES: Solving for alpha1 Phase-1 volume fraction = 0.00347586  Min(alpha1) = -0.350839  Max(alpha1) = 1.00402 MULES: Solving for alpha1 Phase-1 volume fraction = 0.00347386  Min(alpha1) = -0.347173  Max(alpha1) = 1.00401 MULES: Solving for alpha1 Phase-1 volume fraction = 0.00347187  Min(alpha1) = -0.345021  Max(alpha1) = 1.00399 MULES: Solving for alpha1 Phase-1 volume fraction = 0.00346987  Min(alpha1) = -0.346423  Max(alpha1) = 1.00398 DICPCG:  Solving for p_rgh, Initial residual = 0.013328, Final residual = 9.31482e-13, No Iterations 257 time step continuity errors : sum local = 1.35985e-15, global = 4.94506e-17, cumulative = -7.33426e-11 DICPCG:  Solving for p_rgh, Initial residual = 0.0013377, Final residual = 9.42321e-13, No Iterations 235 time step continuity errors : sum local = 1.38612e-15, global = -2.03524e-17, cumulative = -7.33426e-11 DICPCG:  Solving for p_rgh, Initial residual = 0.00022603, Final residual = 9.38786e-10, No Iterations 164 time step continuity errors : sum local = 1.38035e-12, global = 3.02764e-14, cumulative = -7.33123e-11 ExecutionTime = 926.66 s  ClockTime = 1033 s```
There are no issues when the droplet is free-falling, only during surface contact and thereafter.

Could anyone advise me on what course of action to take? Am I misplaced in thinking that interFoam is suitable for this problem, and if so, is there a better choice of solver for this case? Incidentally, I have tried more diffusive upwind divergence schemes without success either, below are my present schemes;

Code:

```FoamFile {     version    2.0;     format      ascii;     class      dictionary;     location    "system";     object      fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes {     default        Euler; } gradSchemes {     default        Gauss linear; } divSchemes {     div(rho*phi,U)  Gauss limitedLinearV 1;     div(phi,alpha)  Gauss vanLeer;     div(phirb,alpha) Gauss interfaceCompression; } laplacianSchemes {     default        Gauss linear corrected; } interpolationSchemes {     default        linear; } snGradSchemes {     default        corrected; } fluxRequired {     default        no;     p_rgh;     pcorr;     alpha1; } // ************************************************************************* //```
Any help would be greatly appreciated. Thanks.

 akidess November 2, 2012 04:28

 duongquaphim November 2, 2012 06:35

Hi,

I was noticed some issues related to contact angle boundary condition in openfoam (look at http://www.cfd-online.com/Forums/ope...interfoam.html).

The contact angle boundary conditions which I will use for alpha1 and p are:

substrate
{
type constantAlphaContactAngle;
theta0 163;
value uniform 0;
}

and

substrate
{
type fixedFluxPressure;
}

And they work fine for me for a wide range of contact angle.

Duong

 steph79 November 3, 2012 04:12

Thanks for your suggestions. They have shown some promise so far but I will try to get back with firmer conclusions in the near future.

On another note, when saving long animations in paraFoam, the software appears to suffer from a memory leak and crashes when I run out of RAM and swap space respectively. Could anyone point to a solution regarding this additional problem? I can work my way around it manually, in several ways, but that's a last resort. I've seen this issue discussed elsewhere but I haven't come across the solution.

Thanks.

 michielm November 3, 2012 07:44

I have the same experience as Duong: use the BC's he is suggesting and your problem should go away.

On a side note:
I strongly doubt that the constantAlphaContactAngle is the correct BC to be using at all for droplet impact. The main problem is that the velocity dependence of the contact angle will dramatically change the spreading behaviour (see e.g. [1]), which is typically an important aspect of the droplet impact.
You could look into the dynamicAlphaContactAngle or even progam your own dynamic model, like the Cox-Voinov model.

Cheers,

Michiel

 steph79 November 4, 2012 00:32

Thanks everybody, I now have some stable results to work with and improve upon, having implemented the boundary conditions first suggested by duongquaphim.

@michielm I have used dynamicAlphaContactAngle previously but that was only from the point of view of attempting to overcome the stability and non-physical issues I outlined earlier. That said, however, I think it's something I am more than likely to return to. Incidentally, does anyone have a heads-up on a viable way to include porous effects on the substrate?

Thanks again.

 michielm November 6, 2012 03:54

I think this depends a lot on the difference in length scales of your porous structure and your droplet. If e.g. the pores are 200 micron and your droplet is 2000 micron then you might consider to really mesh the pores.

If however the pores are closer to 20 micron then you need some kind of subgrid model/an appropriate BC for it. I know that OF has some libraries/models to work with porous zones so you could look into that. A useful starting point might be this: http://www.tfd.chalmers.se/~hani/kur...ukurReport.pdf

 steph79 November 6, 2012 05:17

Quote:
 Originally Posted by michielm (Post 390482) I think this depends a lot on the difference in length scales of your porous structure and your droplet. If e.g. the pores are 200 micron and your droplet is 2000 micron then you might consider to really mesh the pores. If however the pores are closer to 20 micron then you need some kind of subgrid model/an appropriate BC for it. I know that OF has some libraries/models to work with porous zones so you could look into that. A useful starting point might be this: http://www.tfd.chalmers.se/~hani/kur...ukurReport.pdf
Thanks, yes I have meshed the pores previously, but not at a resolution that would allow satellite droplets to form.

Previously (in ANSYS Fluent) I just bundled the slot gaps (pores) with my 'atmosphere' BC, I presume that's the logical way to go. I can also break my substrate stems and tips into two patches, with different contact angles respectively.

 All times are GMT -4. The time now is 18:41.