CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Moving contact line in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By joshmccraney

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2019, 09:56
Default Moving contact line in OpenFOAM
  #1
New Member
 
Join Date: Feb 2019
Posts: 23
Rep Power: 7
dolfus is on a distinguished road
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
dolfus is offline   Reply With Quote

Old   October 21, 2019, 10:06
Default
  #2
New Member
 
Le
Join Date: Oct 2019
Posts: 1
Rep Power: 0
vovi_179 is on a distinguished road
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.
vovi_179 is offline   Reply With Quote

Old   October 22, 2019, 04:58
Default
  #3
New Member
 
Join Date: Feb 2019
Posts: 23
Rep Power: 7
dolfus is on a distinguished road
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
dolfus is offline   Reply With Quote

Old   March 1, 2020, 19:31
Default
  #4
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9
joshmccraney is on a distinguished road
dolfus, have you found the scripts that deal with the contact line?
joshmccraney is offline   Reply With Quote

Old   March 2, 2020, 12:38
Default
  #5
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
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.
mAlletto is offline   Reply With Quote

Old   March 2, 2020, 13:36
Default
  #6
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9
joshmccraney is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
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?
joshmccraney is offline   Reply With Quote

Old   March 2, 2020, 18:06
Default
  #7
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
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
mAlletto is offline   Reply With Quote

Old   March 3, 2020, 03:36
Default
  #8
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9
joshmccraney is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
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 View Post
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.
joshmccraney is offline   Reply With Quote

Old   March 3, 2020, 04:03
Default
  #9
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
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
mAlletto is offline   Reply With Quote

Old   March 3, 2020, 06:00
Default
  #10
New Member
 
Join Date: Feb 2019
Posts: 23
Rep Power: 7
dolfus is on a distinguished road
Quote:
Originally Posted by joshmccraney View Post
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.
dolfus is offline   Reply With Quote

Old   March 4, 2020, 13:30
Default
  #11
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9
joshmccraney is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
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?
joshmccraney is offline   Reply With Quote

Old   March 4, 2020, 15:20
Default
  #12
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
Hm If you want the interphase not to move at the wall you have to fix the value at the wall.
mAlletto is offline   Reply With Quote

Old   March 4, 2020, 18:27
Default
  #13
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9
joshmccraney is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
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?
joshmccraney is offline   Reply With Quote

Old   March 4, 2020, 19:15
Default
  #14
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
https://www.openfoam.com/documentati...xed-value.html
mAlletto is offline   Reply With Quote

Old   March 9, 2020, 18:26
Default
  #15
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9
joshmccraney is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
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?
joshmccraney is offline   Reply With Quote

Old   March 10, 2020, 13:23
Default
  #16
Member
 
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 94
Rep Power: 15
einstein_zee is on a distinguished road
Hey there,

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

for dev version : https://github.com/OpenFOAM/OpenFOAM...hScalarField.H
einstein_zee is offline   Reply With Quote

Old   November 2, 2020, 01:46
Default interface height along a slant wall
  #17
New Member
 
A P
Join Date: Feb 2020
Location: Indiana, USA
Posts: 10
Rep Power: 6
prakashPra is on a distinguished road
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
prakashPra is offline   Reply With Quote

Old   November 2, 2020, 02:00
Default
  #18
Senior Member
 
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 9
joshmccraney is on a distinguished road
Quote:
Originally Posted by prakashPra View Post
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 likes this.
joshmccraney is offline   Reply With Quote

Old   December 4, 2020, 02:01
Default Contact line models
  #19
New Member
 
A P
Join Date: Feb 2020
Location: Indiana, USA
Posts: 10
Rep Power: 6
prakashPra is on a distinguished road
Quote:
Originally Posted by joshmccraney View Post
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!
prakashPra is offline   Reply With Quote

Reply

Tags
contact line, interface, interfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Gmsh] 3D Mesh conversion from gmsh-2.5.0 to OpenFOAM Ancioi OpenFOAM Meshing & Mesh Conversion 17 January 9, 2019 00:50
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
[Other] Compiling hacFoam (Ubuntu 10.04)(OF2.0.0)(LAMMPS13Jul2010)) Henrik_E OpenFOAM Installation 3 September 29, 2016 17:16
Derivative of velocity and mean velocity hiuluom OpenFOAM Post-Processing 1 May 30, 2015 00:42
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26


All times are GMT -4. The time now is 09:21.