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/)
-   -   Moving contact line in OpenFOAM (https://www.cfd-online.com/Forums/openfoam-programming-development/221486-moving-contact-line-openfoam.html)

dolfus October 18, 2019 08:56

Moving contact line in OpenFOAM
 
Hi everyone,

I'm trying to understand how OpenFOAM, and interFoam in particular, deals with a moving contact line, e. g. a drop spreading over a surface. I've seen how the contact angle is imposed calculating the interface normal vector in the interfaceProperties.C file, but I haven't been able to find how OpenFOAM "makes the magic". I thought that maybe it would apply some external force, but in the UEqn.H file there is nothing like that.

I'm starting to think that it would be related to the surface tension force, but I'm not sure. I hope you can help me to figure this out.

Regards,

Adolfo

vovi_179 October 21, 2019 09:06

Hi dolfus,
As I know there are to two numerical method to simulate moving contact line in Navier Stokes equations: 1. Modify the slip velocity by the contact line velocity. 2. Add the external force to surface tension tension force at the vicinity of the contact line. You can read this article "VOF simulations of the contact angle dynamics during the drop spreading: Standard models and a new wetting force model" for the 2nd method.
I do not use OpenFOAM for moving contact line model so I can not help you this part.

dolfus October 22, 2019 03:58

Thank you for your reply. I know about this paper but the point is that I haven't been able to find anything like that inside the OpenFOAM code, probably because I haven't looked at the right files yet.


Regards

joshmccraney March 1, 2020 18:31

dolfus, have you found the scripts that deal with the contact line?

mAlletto March 2, 2020 11:38

I always thought that in interfoam the "dynamic contact angle" is a result of the momentum equation. One con only specify the gradient of alpha at the wall. How the interphase evolves is that a result of the momentum equation.

joshmccraney March 2, 2020 12:36

Quote:

Originally Posted by mAlletto (Post 760161)
I always thought that in interfoam the "dynamic contact angle" is a result of the momentum equation. One con only specify the gradient of alpha at the wall. How the interphase evolves is that a result of the momentum equation.

Thanks for the response. See, I'm trying to see how to disable the contact line/angle models, forcing a system into a true no-slip flow. Do have have any ideas how to model this?

mAlletto March 2, 2020 17:06

What do you mean with true no slip condition? Did you try a zero gradient condition for alpha?: you will not have an influence of the wall since you interpolate from the inner domain

joshmccraney March 3, 2020 02:36

Quote:

Originally Posted by mAlletto (Post 760198)
What do you mean with true no slip condition?

I refer to the (typically non-physical) condition that liquid-gas-wall interfaces do not move. In this way, liquid-gas interfaces can change configurations, but liquid would never spread.

Quote:

Originally Posted by mAlletto (Post 760198)
Did you try a zero gradient condition for alpha?: you will not have an influence of the wall since you interpolate from the inner domain

Yes, but zero gradient still allows the liquid to advance/recede.

mAlletto March 3, 2020 03:03

If you want the interphase to be at a fixed position you can use a fixed value boundary condition for alpha at the wall. Where initially it is zero you set it to zero and where it is one you set it to one

dolfus March 3, 2020 05:00

Quote:

Originally Posted by joshmccraney (Post 760066)
dolfus, have you found the scripts that deal with the contact line?

In the interfaceProperties.C file, you can find the method to impose the contact angle at any wall patch, and also you can see how the gradient of alpha following the normal direction to the wall is specified.
In the alphaContactAngleFvPatchScalarField.C file, there are several cases defined depending on your keyword "limit" in the alpha.water file.

joshmccraney March 4, 2020 12:30

Quote:

Originally Posted by mAlletto (Post 760223)
If you want the interphase to be at a fixed position you can use a fixed value boundary condition for alpha at the wall. Where initially it is zero you set it to zero and where it is one you set it to one

Can you elaborate on this please?

mAlletto March 4, 2020 14:20

Hm If you want the interphase not to move at the wall you have to fix the value at the wall.

joshmccraney March 4, 2020 17:27

Quote:

Originally Posted by mAlletto (Post 760472)
Hm If you want the interphase not to move at the wall you have to fix the value at the wall.

Sorry, I guess what I meant is how do you set a fixed value boundary condition for alpha at the wall?

mAlletto March 4, 2020 18:15

https://www.openfoam.com/documentati...xed-value.html

joshmccraney March 9, 2020 17:26

Quote:

Originally Posted by mAlletto (Post 760489)

Perfect, and thanks!

However, it seems we are missing some crucial information about the contact line, specifically the static contact angle. In real life, a liquid is always given an static contact angle. Any idea how to enforce this while also pinning the contact line?

einstein_zee March 10, 2020 12:23

Hey there,

May be you should take a look at "alphaContactAngle".

for dev version : https://github.com/OpenFOAM/OpenFOAM...hScalarField.H

prakashPra November 2, 2020 00:46

interface height along a slant wall
 
Hello Everyone,
I am working to obtain contact line motion in a container. I am thinking of obtaining interface height along a wall and then for velocity, I will take the difference of the location of 2 subsequent timestep divided by time difference. But I am unable to get the location of interface along the slant wall. It would be helpful if anyone can provide any suggestion regarding it.

I have used this code in controldict

functions
{
#includeFunc residuals
#includeFunc interfaceHeight
interfaceHeight1
{
type interfaceHeight;
libs ("libfieldFunctionObjects.so");
alpha alpha.water;
locations ((0 0 0));
direction (0.0064 0.024 0);
}
}

direction in this I assumed it to be ray from ( 0 0 0) to (0.0064 0.024 0). That's my slant wall direction.


Thanks

Regards

joshmccraney November 2, 2020 01:00

Quote:

Originally Posted by prakashPra (Post 786510)
Hello Everyone,
I am working to obtain contact line motion in a container. I am thinking of obtaining interface height along a wall and then for velocity, I will take the difference of the location of 2 subsequent timestep divided by time difference. But I am unable to get the location of interface along the slant wall. It would be helpful if anyone can provide any suggestion regarding it.

I have used this code in controldict

functions
{
#includeFunc residuals
#includeFunc interfaceHeight
interfaceHeight1
{
type interfaceHeight;
libs ("libfieldFunctionObjects.so");
alpha alpha.water;
locations ((0 0 0));
direction (0.0064 0.024 0);
}
}

direction in this I assumed it to be ray from ( 0 0 0) to (0.0064 0.024 0). That's my slant wall direction.


Thanks

Regards

Unsure how to do this efficiently. A lazy workaround would be to open the results in paraFoam and find all values where \alpha = 0.5. This would output the x,y,z coordinates in a bunch of .csv files. You could then write a script in python/matlab/C to take the specific points you're interested in.

prakashPra December 4, 2020 01:01

Contact line models
 
Quote:

Originally Posted by joshmccraney (Post 786511)
Unsure how to do this efficiently. A lazy workaround would be to open the results in paraFoam and find all values where \alpha = 0.5. This would output the x,y,z coordinates in a bunch of .csv files. You could then write a script in python/matlab/C to take the specific points you're interested in.

Thank you very much, I have been able to process the data using it.

I have another query regarding the implementation of dynamic contact angle. I am trying to investigate different contact line models. I am unable to understand how dynamic angle values are obtained in openFOAM. Do I need to implement different contact angle models in interfaceproperties source code or I just simple obtain the results for given input in alpha sets of theta(equilibrium), theta(adv), and theta(receding) and plot dynamic angle vs velocity? Sincere apologize for flaws in my physics, maybe I am not reading the right materials.

Thanks!


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