CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to use constant alpha contact angle in OF 2.1.1

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By michielm
  • 3 Post By michielm
  • 4 Post By michielm
  • 1 Post By Nicolao

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 8, 2013, 06:58
Question How to use constant alpha contact angle in OF 2.1.1
  #1
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Dear foamers,
I am trying to simulate splashing droplet on a surface by using interFoam, OF 2.1.1. The problem is I did not get the same behavior for the experiment results. I did not use alpha contact angle, do you think it the problem? and If it is, how can I use it? Please help me because I am new in OF.
Sandy,
sandy13 is offline   Reply With Quote

Old   March 9, 2013, 10:22
Default
  #2
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 15
michielm is on a distinguished road
Hi Sandy,
I guess you used the zeroGradient BC? That is indeed going to give pretty different results.

To use the constantAlphaContactAngle BC you need to specify it in 0/alpha1 on the patch where you want it like this:

Code:
walls
    {
        type           constantAlphaContactAngle;
        theta0         45;
        limit          gradient;
        value          uniform 0;
    }
For an example, check out the capillaryRise tutorial.

That said, I am pretty sure that the constantAlphaContactAngle BC is not going to work well either, because your problem is highly dynamic and the contact angle that you model should thus dependent on the local velocities.
silviliril likes this.
michielm is offline   Reply With Quote

Old   March 10, 2013, 10:38
Default
  #3
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by michielm View Post
Hi Sandy,
I guess you used the zeroGradient BC? That is indeed going to give pretty different results.

To use the constantAlphaContactAngle BC you need to specify it in 0/alpha1 on the patch where you want it like this:

Code:
walls
    {
        type           constantAlphaContactAngle;
        theta0         45;
        limit          gradient;
        value          uniform 0;
    }
For an example, check out the capillaryRise tutorial.

That said, I am pretty sure that the constantAlphaContactAngle BC is not going to work well either, because your problem is highly dynamic and the contact angle that you model should thus dependent on the local velocities.
Dear michielm,
Thank you so much for your response, I appreciate it so much. I took your advice and recommendation about my case..splashing bubble.. I implemented the boundary condition you recommended but with a theta0 = 163 , because I have a numerical study to compare with, any how, I did not get the same behavior as well as you expected. Please do you have any more suggestions about my case, do you think do I have to use dynamics alpha contact angle instead of the constant one. Any thoughts would help...
Sandy,
sandy13 is offline   Reply With Quote

Old   March 11, 2013, 03:26
Default
  #4
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 15
michielm is on a distinguished road
I indeed think you need to use the dynamicAlphaContactAngle BC or, even better, a more realistic implementation for the dynamic contact angle like the Cox-Voinov model. The latter would require you to code it yourself, but it is not a difficult task.

What I am wondering is whether you could show the comparison for the constantAlphaContactAngle and your validation case, so we can get a feel for the difference.
michielm is offline   Reply With Quote

Old   March 11, 2013, 05:17
Default
  #5
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by michielm View Post
I indeed think you need to use the dynamicAlphaContactAngle BC or, even better, a more realistic implementation for the dynamic contact angle like the Cox-Voinov model. The latter would require you to code it yourself, but it is not a difficult task.

What I am wondering is whether you could show the comparison for the constantAlphaContactAngle and your validation case, so we can get a feel for the difference.
Dear michielm,
I will change constannt to dynamic and see what happiness, but about changing the code model, I do not think I am cleaver enough to do it especially I am not any good in c++. If that is not that difficult, where shall I go to what dictionaries and what I have to change... If you can, just direct me when ever you have time.
Sandy,
sandy13 is offline   Reply With Quote

Old   January 6, 2014, 19:01
Default
  #6
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 14
laurent98 is on a distinguished road
hi,
is there anybody how can give us a idea of the realistic dynamic contact angle values thetaA R and thetaU, for water-air-solid contact ???
thanks a lot Laurent
laurent98 is offline   Reply With Quote

Old   January 7, 2014, 01:26
Default
  #7
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 15
michielm is on a distinguished road
The dynamicAlphaContactAngle is not a physically correct model for the dynamic contact angle so it will be hard to give you values that lead to physically correct behaviour without fitting experimental data for your particular system.

Moreover, in general you cannot say which contact angle a water-air-solid system has without knowing what the solid is, because the contact angle (i.e. thetaA and thetaR) are determined by the chemical and physical nature of the solid as well as by the water and air interfacial properties
kmou, Anjishnu Choudhury and SRKR like this.
michielm is offline   Reply With Quote

Old   January 8, 2014, 22:16
Default
  #8
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 14
laurent98 is on a distinguished road
Hi Michiel,
thank very much for reply, i understand dependance of solid surface.
i would like if possible to predict a ventilation of a free surface piercing foil like on the picture attach.
i presume this phenomena is related to the contact angle.
very good question here, what is Uwall...
http://www.cfd-online.com/Forums/ope...interfoam.html
so should i give up with OF dynamicContactAngle ? try to build a Kistler model?
for now, the "funny" think is that my simulation crash with a constantContactAngle BC, and run with a zeroGradient or dynamicContactAngle...

thanks LL
Attached Images
File Type: jpg 330tstp.jpg (17.2 KB, 375 views)
laurent98 is offline   Reply With Quote

Old   January 22, 2015, 11:54
Default
  #9
New Member
 
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12
gnoyeh525 is on a distinguished road
Quote:
Originally Posted by michielm View Post
I indeed think you need to use the dynamicAlphaContactAngle BC or, even better, a more realistic implementation for the dynamic contact angle like the Cox-Voinov model. The latter would require you to code it yourself, but it is not a difficult task.

What I am wondering is whether you could show the comparison for the constantAlphaContactAngle and your validation case, so we can get a feel for the difference.
Dear michielm

I want to ask as well, how to specify the dynamicAlphaContactAngle BC, please? Can you give us an example? Many thanks.
gnoyeh525 is offline   Reply With Quote

Old   January 22, 2015, 12:16
Default
  #10
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 15
michielm is on a distinguished road
You can simply use
Code:
walls
    {
        type           dynamicAlphaContactAngle;
        theta0         45;
        thetaA         60;
        thetaR         30;
        uTheta         0.01;
        limit          gradient;
        value          uniform 0;
    }
The values that you put in are as follows:
theta0 for the contact angle at 0 velocity
thetaA-thetaR the offset from theta0 at infinite velocity
uTheta for how quickly the angle changes from theta0 to thetaA/thetaR (i just put in some random value)

The mathematical implementation is: theta =theta0 + (thetaA - thetaR)*tanh(uwall/uTheta);

Note that this is not a physically correct implementation of the dynamic contact angle, but for moderate velocity you can fit thetaA-thetaR and uTheta to experimental data and might get away with using it.
dokeun, hua1015, mizzou and 1 others like this.
michielm is offline   Reply With Quote

Old   January 26, 2015, 03:43
Default
  #11
New Member
 
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12
gnoyeh525 is on a distinguished road
Quote:
Originally Posted by michielm View Post
You can simply use
Code:
walls
    {
        type           dynamicAlphaContactAngle;
        theta0         45;
        thetaA         60;
        thetaR         30;
        uTheta         0.01;
        limit          gradient;
        value          uniform 0;
    }
The values that you put in are as follows:
theta0 for the contact angle at 0 velocity
thetaA-thetaR the offset from theta0 at infinite velocity
uTheta for how quickly the angle changes from theta0 to thetaA/thetaR (i just put in some random value)

The mathematical implementation is: theta =theta0 + (thetaA - thetaR)*tanh(uwall/uTheta);

Note that this is not a physically correct implementation of the dynamic contact angle, but for moderate velocity you can fit thetaA-thetaR and uTheta to experimental data and might get away with using it.
Dear michielm

Many thanks for your reply; So, each time, for each case, we have have to choose the thetaA-thetaR-theta0 and uTheta according to experimental results, right?

cheers
m
gnoyeh525 is offline   Reply With Quote

Old   January 27, 2015, 08:23
Default
  #12
New Member
 
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12
gnoyeh525 is on a distinguished road
Quote:
Originally Posted by michielm View Post
You can simply use
Code:
walls
    {
        type           dynamicAlphaContactAngle;
        theta0         45;
        thetaA         60;
        thetaR         30;
        uTheta         0.01;
        limit          gradient;
        value          uniform 0;
    }
The values that you put in are as follows:
theta0 for the contact angle at 0 velocity
thetaA-thetaR the offset from theta0 at infinite velocity
uTheta for how quickly the angle changes from theta0 to thetaA/thetaR (i just put in some random value)

The mathematical implementation is: theta =theta0 + (thetaA - thetaR)*tanh(uwall/uTheta);

Note that this is not a physically correct implementation of the dynamic contact angle, but for moderate velocity you can fit thetaA-thetaR and uTheta to experimental data and might get away with using it.
Dear michielm

I think the current exist model for dynamic contact angle is not so accurate, i so I decide to implement new alternative contact angle model for testing.

cheers
g
gnoyeh525 is offline   Reply With Quote

Old   May 5, 2015, 09:46
Default
  #13
New Member
 
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12
gnoyeh525 is on a distinguished road
Dear michielm

Again, may I ask you one more question. To use the dynamic contact angle model in interFoam solver, we only need to specify the boundary conditions at 0 initial time, but we do not need to modify the library source file interphaseProperties.C, right? But I don't see how the dynamic contact angle has been calculate in the interphaseProperties.C. Could you tell me how the dynamic contact angle link to and work in the interphaseProperties.C file?

I see in ./transportiModel/twoPhasePropersities/, there exist a dynamicAlphacontactangle.C which contain the dynamic contact model. but I do know how this contact angle model been used in the interphasePropersity.C to update the interface propersities.

many thanks
cheers
Ming

Quote:
Originally Posted by michielm View Post
Hi Sandy,
I guess you used the zeroGradient BC? That is indeed going to give pretty different results.

To use the constantAlphaContactAngle BC you need to specify it in 0/alpha1 on the patch where you want it like this:

Code:
walls
    {
        type           constantAlphaContactAngle;
        theta0         45;
        limit          gradient;
        value          uniform 0;
    }
For an example, check out the capillaryRise tutorial.

That said, I am pretty sure that the constantAlphaContactAngle BC is not going to work well either, because your problem is highly dynamic and the contact angle that you model should thus dependent on the local velocities.
gnoyeh525 is offline   Reply With Quote

Old   November 12, 2015, 07:09
Default
  #14
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by gnoyeh525 View Post
Dear michielm

Again, may I ask you one more question. To use the dynamic contact angle model in interFoam solver, we only need to specify the boundary conditions at 0 initial time, but we do not need to modify the library source file interphaseProperties.C, right? But I don't see how the dynamic contact angle has been calculate in the interphaseProperties.C. Could you tell me how the dynamic contact angle link to and work in the interphaseProperties.C file?

I see in ./transportiModel/twoPhasePropersities/, there exist a dynamicAlphacontactangle.C which contain the dynamic contact model. but I do know how this contact angle model been used in the interphasePropersity.C to update the interface propersities.

many thanks
cheers
Ming
Dear Ming,
Did you find the answer for your question, I want to know as well how is the link and how to ubdate the dynamic contact angle in OF.
Regards,
Sandy13
sandy13 is offline   Reply With Quote

Old   February 5, 2016, 08:03
Default
  #15
New Member
 
Nicolao
Join Date: Jul 2012
Location: São Paulo, Brazil
Posts: 13
Rep Power: 13
Nicolao is on a distinguished road
Dear all,
I've been having some problems with a simple case, which basically consists in a droplet adjusting to a surface given a specific contact angle. I want to measure the time that it takes to stabilize after changing the contact angle of the surface.
I tried all the boundary conditions (constant and dynamic contact angle with noFluxPressure on the wall) and nothing seems to work out.
I attached the video (as a zip file) of one of the test cases. As you can see, as the droplet adapts to the new contact angle, it oscillate (as it should be). The problem is that it never stops oscillating. It looks like there is no viscous dissipation or something.

Anyway, I belive that all my boundary conditions are correct. Maybe the dynamics in my problem are too strong and, therefore, the dynamic contact angle provided by OpenFOAM is not a good option in this case. Maybe I need to implement another contact angle model. But before I do that, I want to know if anybody ever saw those kinds of results before...

By the way, I am using OpenFOAM 2.1.1. If you need I can post my boundary conditions here.



Just answering the questions above:
Ming: Yes, you only need to specify the boundary condition of dynamic contact angle on the 0/alpha1 file. The interfacePrperties.C makes the correction of the contact angle on the wall (as you can see in the function correctContactAngle() on the line 48 from interfaceProperties.C file)
I belive that if you want to change the way the contact angle is calculated, you can just make some changes on the dynamicAlphaContactAngleFvPatchScalarField files.

Thank you in advance!
Cheers,

Nico
Attached Files
File Type: zip OscillatingDrop.zip (150.1 KB, 143 views)
mizzou likes this.
Nicolao is offline   Reply With Quote

Old   January 4, 2017, 11:26
Default
  #16
New Member
 
Martin
Join Date: Sep 2014
Posts: 9
Blog Entries: 1
Rep Power: 11
Ramwi is on a distinguished road
Hi Nico,

I do not know, if you are still interested in the problem (or if you solved it already). But just in case, the observed behavior might be caused by the discretization of the convective terms in the NS equations. One of my bachelor students worked on a similar case. Some results might be found here:

http://old.vscht.cz/mat/OFSem/03_pre...mV2_Smutek.pdf

Unfortunately, the presentation is in Czech, but nevertheless, the images and equations are the same. In general, what proved usefull for us was the combination of almost anything for the div(rhoPhi,U) member and then

div(phi,alpha) Gauss Gamma 0.2;
div(phirb,alpha) Gauss interfaceCompression;

Best wishes,
Martin
Ramwi is offline   Reply With Quote

Old   January 6, 2017, 13:52
Default
  #17
New Member
 
Nicolao
Join Date: Jul 2012
Location: São Paulo, Brazil
Posts: 13
Rep Power: 13
Nicolao is on a distinguished road
Hi Martin,

thank you for the response.

I am not working with this problem anymore (I actually started to work on another project). But I am still interested to see if I can make it work out.

I will try to use different interpolation schemes. If something works out, I´ll post here.

Cheers
Nicolao is offline   Reply With Quote

Old   April 14, 2019, 21:09
Default
  #18
Senior Member
 
Brett
Join Date: May 2013
Posts: 212
Rep Power: 13
Bdew8556 is on a distinguished road
Hey guys,

I know the thread is old but it seems appropriate.

If I have a surface and I want to set a flowrateinletvelocity condition on it but not at a normal direction how do I do that?

Brett
Bdew8556 is offline   Reply With Quote

Old   June 10, 2021, 23:59
Default How to choose uTheta
  #19
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Hi guys

I have a question about uTheta.

Could you please give me an explanation about it? What is it?

I solved my case one time with uTheta = 2 and another time with uTheta = 0.01, and found that my case is very sensitive to the uTheta value. How can we select the best value for uTheta?

Thanks
alimea is offline   Reply With Quote

Reply


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
Dynamic contact angle rmousavibt Fluent UDF and Scheme Programming 12 October 31, 2021 22:38
InterFoam contact angle JoaoMiranda OpenFOAM Running, Solving & CFD 7 October 20, 2016 06:27
help with UDF for contact angle based on contact line velocity gandesk Fluent UDF and Scheme Programming 14 October 29, 2012 13:58
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 05:50
Theoretical background of formula for dynamic contact angle in interfoam sebastian_vogl OpenFOAM Running, Solving & CFD 3 June 22, 2009 12:25


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