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

Contact angle in OpenFoam with fixedfluxpressure

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Ash Kot
  • 1 Post By Ash Kot

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2020, 04:54
Default Contact angle in OpenFoam with fixedfluxpressure
  #1
New Member
 
Join Date: Aug 2020
Posts: 2
Rep Power: 0
Eller_OF is on a distinguished road
Hello,

I have a question on how to change the contact angle using the fixedFluxPressure BC on the Walls. The simulation has been sent to me and I am supposed to only change the angle from now (I’ve been told) 45 degrees to 70 degrees.

Usually I would use

Walls
type constantAlphaContactAngle;
theta0 45;
limit gradient;
value uniform 0;

In 0/U folder and then just change the theta0.

But the simulation i work with has a

Walls
type fixedFluxPressure;

So now i am unfortunately unsure about what to do.

To sum up: The simulation currently uses contact angle = 45 degrees and I cannot find where this has been set.

So if anyone has an idea i would be super thankful.

(Using interfoam)
Eller_OF is offline   Reply With Quote

Old   November 9, 2020, 01:24
Default
  #2
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by Eller_OF View Post
Hello,

I have a question on how to change the contact angle using the fixedFluxPressure BC on the Walls. The simulation has been sent to me and I am supposed to only change the angle from now (I’ve been told) 45 degrees to 70 degrees.

Usually I would use

Walls
type constantAlphaContactAngle;
theta0 45;
limit gradient;
value uniform 0;

In 0/U folder and then just change the theta0.

But the simulation i work with has a

Walls
type fixedFluxPressure;

So now i am unfortunately unsure about what to do.

To sum up: The simulation currently uses contact angle = 45 degrees and I cannot find where this has been set.

So if anyone has an idea i would be super thankful.

(Using interfoam)
Solved your issue?
I am using this condition and want to know one thing. I have to set GDL contact angle. How to set this? Any idea
sadsid is offline   Reply With Quote

Old   November 10, 2020, 16:15
Default
  #3
Member
 
Ash Kotwal
Join Date: Jul 2016
Location: North Dakota, USA
Posts: 92
Blog Entries: 1
Rep Power: 10
Ash Kot is on a distinguished road
Quote:
Originally Posted by Eller_OF View Post
Hello,

I have a question on how to change the contact angle using the fixedFluxPressure BC on the Walls. The simulation has been sent to me and I am supposed to only change the angle from now (I’ve been told) 45 degrees to 70 degrees.

Usually I would use

Walls
type constantAlphaContactAngle;
theta0 45;
limit gradient;
value uniform 0;

In 0/U folder and then just change the theta0.

But the simulation i work with has a

Walls
type fixedFluxPressure;

So now i am unfortunately unsure about what to do.

To sum up: The simulation currently uses contact angle = 45 degrees and I cannot find where this has been set.

So if anyone has an idea i would be super thankful.

(Using interfoam)
The following code should provide you a brief idea of setting up contact angle along with fixedFluxPressure

The code in alpha.water file:
Code:
wall
    {
        type            constantAlphaContactAngle;
        theta0         45;
        limit            gradient;
        value           uniform 0;
    }
The code in p_rgh file for that same wall patch:
Code:
wall
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
The code in U file, the same wall patch:
Either:
Code:
wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
or
Code:
wall
    {
        type            noSlip;
    }
I hope this solves your question:
As you changes the contact angle the liquid behavior also changes, you can verify based upon the value computed in paraview for wetted area, and interfacial area using integrateVariables filter.
Ash Kot is offline   Reply With Quote

Old   November 12, 2020, 16:06
Default
  #4
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by Ash Kot View Post
The following code should provide you a brief idea of setting up contact angle along with fixedFluxPressure

The code in alpha.water file:
Code:
wall
    {
        type            constantAlphaContactAngle;
        theta0         45;
        limit            gradient;
        value           uniform 0;
    }
The code in p_rgh file for that same wall patch:
Code:
wall
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
The code in U file, the same wall patch:
Either:
Code:
wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
or
Code:
wall
    {
        type            noSlip;
    }
I hope this solves your question:
As you changes the contact angle the liquid behavior also changes, you can verify based upon the value computed in paraview for wetted area, and interfacial area using integrateVariables filter.
Actually, I am applying the same condition. I am solving channel flow and the article for which I am trying to get the results used: 1) Hydrophobic GDL (contact angle 140) and 2) hydrophilic channel walls with a contact angle 60. The bottom wall is considered as GDL wall. Now I want to know how to set these two angles in alpha.water
sadsid is offline   Reply With Quote

Old   November 12, 2020, 17:32
Default
  #5
Member
 
Ash Kotwal
Join Date: Jul 2016
Location: North Dakota, USA
Posts: 92
Blog Entries: 1
Rep Power: 10
Ash Kot is on a distinguished road
Trying to understand what you have mentioned:
so bottom wall is Hydrophobic and rest all walls are Hydrophilic is that correct?

In that case, the bottom wall will have the above mentioned code related to constantContactAngle with value defined 140.
and rest channel walls with have same code of constantContactAngle with value as 60
and you define that in alpha.water file.

Only one constantContactAngle boundary condition can be defined for one wall with one specific value of whatever the angle is.
multiple constant contact angles are not possible for one single patch wall, in one single boundary condition.
if you want the value for that constant contact angle needed to be changed then you'll probably need to use swak4Foam to setup time dependent contact angle changing BC.
Ash Kot is offline   Reply With Quote

Old   November 12, 2020, 17:45
Default
  #6
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by Ash Kot View Post
Trying to understand what you have mentioned:
so bottom wall is Hydrophobic and rest all walls are Hydrophilic is that correct?

In that case, the bottom wall will have the above mentioned code related to constantContactAngle with value defined 140.
and rest channel walls with have same code of constantContactAngle with value as 60
and you define that in alpha.water file.

Only one constantContactAngle boundary condition can be defined for one wall with one specific value of whatever the angle is.
multiple constant contact angles are not possible for one single patch wall, in one single boundary condition.
if you want the value for that constant contact angle needed to be changed then you'll probably need to use swak4Foam to setup time dependent contact angle changing BC.
Yes, the bottom wall of the channel corresponds to the GDL, which was defined as a hydrophobic surface with a contact angle of 140. So for this patch I can use:
type constantAlphaContactAngle;
theta0 140;
limit gradient;
value uniform 0;

and for top I can use:
type constantAlphaContactAngle;
theta0 60;
limit gradient;
value uniform 0;

This is what you are saying?
sadsid is offline   Reply With Quote

Old   November 12, 2020, 17:49
Default
  #7
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by Ash Kot View Post
Trying to understand what you have mentioned:
so bottom wall is Hydrophobic and rest all walls are Hydrophilic is that correct?

In that case, the bottom wall will have the above mentioned code related to constantContactAngle with value defined 140.
and rest channel walls with have same code of constantContactAngle with value as 60
and you define that in alpha.water file.

Only one constantContactAngle boundary condition can be defined for one wall with one specific value of whatever the angle is.
multiple constant contact angles are not possible for one single patch wall, in one single boundary condition.
if you want the value for that constant contact angle needed to be changed then you'll probably need to use swak4Foam to setup time dependent contact angle changing BC.
The goemetry is like the one I attached here.
Attached Images
File Type: png geo.png (114.8 KB, 69 views)
sadsid is offline   Reply With Quote

Old   November 12, 2020, 18:03
Default
  #8
Member
 
Ash Kotwal
Join Date: Jul 2016
Location: North Dakota, USA
Posts: 92
Blog Entries: 1
Rep Power: 10
Ash Kot is on a distinguished road
After looking your geometry, and the code that you have defined post #6, yes that is what I'm saying.

its pretty simple, although I don't know how much variation you might be able to visualize, based upon the contact angles.

The hydrophilic and hydrophobic energies are too small, they define their significance on 100 molecular to 1,000,000 molecular level (if we assume a drop of water is 1,000,000 molecules).
However, 10,000,000 to 100,000,000 molecular level (that is ice cube size blob of water), gravitational energy along with density and viscosity show more predominant effect and over constrain the hydrophilic and hydrophobic energies. Thus, in your CFD analysis, there is significant possibility that even at 140 or more than that angle, you won't be able to see much difference unless your mesh is finest!

Apologies, discussion in molecules and other chemical concepts, being chemical engineer it becomes evident to explain in molecules and moles :-D
sadsid likes this.
Ash Kot is offline   Reply With Quote

Old   November 12, 2020, 18:15
Default
  #9
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by Ash Kot View Post
After looking your geometry, and the code that you have defined post #6, yes that is what I'm saying.

its pretty simple, although I don't know how much variation you might be able to visualize, based upon the contact angles.

The hydrophilic and hydrophobic energies are too small, they define their significance on 100 molecular to 1,000,000 molecular level (if we assume a drop of water is 1,000,000 molecules).
However, 10,000,000 to 100,000,000 molecular level (that is ice cube size blob of water), gravitational energy along with density and viscosity show more predominant effect and over constrain the hydrophilic and hydrophobic energies. Thus, in your CFD analysis, there is significant possibility that even at 140 or more than that angle, you won't be able to see much difference unless your mesh is finest!

Apologies, discussion in molecules and other chemical concepts, being chemical engineer it becomes evident to explain in molecules and moles :-D
Thank you for your detailed reply. At the moment I am only trying to obtaint he benchmark results of the paper "Residence time of water film and slug flow features in fuel cell gas
channels and their effect on instantaneous area coverage ratio".

For my own case, I will follow what you said. If I need more guidance I will post here Thank you for your response.
sadsid is offline   Reply With Quote

Old   November 12, 2020, 18:32
Default
  #10
Member
 
Ash Kotwal
Join Date: Jul 2016
Location: North Dakota, USA
Posts: 92
Blog Entries: 1
Rep Power: 10
Ash Kot is on a distinguished road
No problem, your welcome.

Just for the side-note:
In their article, table 2 the summary of settings for VoF model.
The interface compression/representation scheme they used: Piecewise Linear Interface Calculation (PLIC)
Thus, if you planning to use that scheme then you'll have to use OpenFOAM V8 version (Release 2020) from OpenFOAM.org. (I have less idea about ESI OpenFOAM having that scheme).

Only OpenFOAM V8 has PLIC scheme otherwise you'll probably use MULES for alpha.water (the default scheme)
sadsid likes this.
Ash Kot is offline   Reply With Quote

Old   November 12, 2020, 18:43
Default
  #11
Member
 
Join Date: Jan 2017
Posts: 71
Rep Power: 9
sadsid is on a distinguished road
Quote:
Originally Posted by Ash Kot View Post
No problem, your welcome.

Just for the side-note:
In their article, table 2 the summary of settings for VoF model.
The interface compression/representation scheme they used: Piecewise Linear Interface Calculation (PLIC)
Thus, if you planning to use that scheme then you'll have to use OpenFOAM V8 version (Release 2020) from OpenFOAM.org. (I have less idea about ESI OpenFOAM having that scheme).

Only OpenFOAM V8 has PLIC scheme otherwise you'll probably use MULES for alpha.water (the default scheme)
You are right. I am using OF-v8.
sadsid is offline   Reply With Quote

Old   July 30, 2024, 03:10
Default
  #12
New Member
 
ghanashyam k c
Join Date: May 2022
Posts: 8
Rep Power: 4
gsam is on a distinguished road
First of all, apologies for posting my question here, as I realize this thread is nearly closed. However, I hope someone can assist me since the thread was active recently and my question pertains to contact angles.

I'm working on an electro-hydrodynamic problem where fluid emerges from a needle and forms a Taylor cone jet. Unlike previous literature, recent work by Mai et al.(https://pubs.aip.org/aip/pof/article...ic-atomization) considered the wetting across the needle, where the fluid pins at the outer edge before forming the jet. When I try to implement the new contact angle algorithm they used, the fluid pins at the outer edge but the jet fails to form, and the solution eventually diverges completely.

I have attached pictures demonstrating this issue. Can anyone suggest what might be causing the problem?
Attached Files
File Type: zip folder.zip (193.6 KB, 3 views)
gsam is offline   Reply With Quote

Reply

Tags
capillaryrise, contactangle, interfoam, multiphase, openfoam


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 udf returns no value to solver shiraz_man67 Fluent UDF and Scheme Programming 5 July 3, 2018 15:51
can anyone help me about the udf of dynamic contact angle in FLUENT? Albert Lee FLUENT 0 July 1, 2018 09:21
Dynamic contact angle raj kumar saini Fluent UDF and Scheme Programming 0 October 13, 2014 03:18
Contact angle between different phase and wall liguifan OpenFOAM Pre-Processing 1 March 7, 2013 03:46
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 06:50


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