CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How Can I calculate the Contact Line velocity in interface?? (https://www.cfd-online.com/Forums/openfoam/78914-how-can-i-calculate-contact-line-velocity-interface.html)

 farhagim August 5, 2010 12:48

How Can I calculate the Contact Line velocity in interface??

Hello,

Can anybody tell me How can I calculate the Contact line Velocity in interFoam? I want to implement new Dynamic Contact Angle, and I need Contact line velocity for Ca. I would be so grateful if the expertise in OpenFOAM help me.

Thanks
Mehran

 sega August 6, 2010 03:24

Quote:
 Originally Posted by farhagim (Post 270438) Hello, Can anybody tell me How can I calculate the Contact line Velocity in interFoam? I want to implement new Dynamic Contact Angle, and I need Contact line velocity for Ca. I would be so grateful if the expertise in OpenFOAM help me. Thanks Mehran
Quick brainstorming:

Find the face (and its coordinates) on the contact surface occupied by the interface at the current timestep (for example where VOF = 0.5)
The spatial difference to the previous timestep will be the displacement of the interface. In addition with the timestep you will get the displacement velocity - the contact line velocity.

 farhagim August 6, 2010 12:20

Hello Sebastion.

Thank you for your answer. but The contact line velocity is the intersection between liquid surface and the solid surface. So I think I should find the cell with alpha=0.5 near surface and find the velocity or find the displacement of the interface and so on. Which one do you think better? Actually I am kind of new in Openfoam and I have a problem to recognize the all variable defined in interfoam ie. nHat or AfnHat ...
some times its hard to find what they come from. Would you please give me some hint in code How can I define the interface?

Thanks,
MEhran

Quote:
 Originally Posted by sega (Post 270501) Quick brainstorming: Find the face (and its coordinates) on the contact surface occupied by the interface at the current timestep (for example where VOF = 0.5) The spatial difference to the previous timestep will be the displacement of the interface. In addition with the timestep you will get the displacement velocity - the contact line velocity.

 sega August 6, 2010 12:47

Quote:
 Originally Posted by farhagim (Post 270578) So I think I should find the cell with alpha=0.5 near surface and find the velocity or find the displacement of the interface and so on. Which one do you think better?
Hm, interesting idea to interprete the velocity in the cell itself as the interface velocity. What do the other interFoam users think?
I think this may be appropriate at the proximity to the solid surface ... but I'm not 100% sure.

Quote:
 Originally Posted by farhagim (Post 270578) Actually I am kind of new in Openfoam and I have a problem to recognize the all variable defined in interfoam ie. nHat or AfnHat ... some times its hard to find what they come from. Would you please give me some hint in code How can I define the interface?
In my option the interface is defined as alpha = 0.5.

The variables you mentioned have something to do with the normal direction of the interface.

 farhagim August 6, 2010 13:14

Thanks again for your quick answer. one very basic question: forexample: tell me what should I write in code for defining the cell filled with alpha=0.5. Sorry I know its stupid but I am new ;).

Quote:
 Originally Posted by sega (Post 270584) Hm, interesting idea to interprete the velocity in the cell itself as the interface velocity. What do the other interFoam users think? I think this may be appropriate at the proximity to the solid surface ... but I'm not 100% sure. In my option the interface is defined as alpha = 0.5. The variables you mentioned have something to do with the normal direction of the interface.

 sega August 7, 2010 04:01

Quote:
 Originally Posted by farhagim (Post 270589) Thanks again for your quick answer. one very basic question: forexample: tell me what should I write in code for defining the cell filled with alpha=0.5. Sorry I know its stupid but I am new ;).
Looping over all cells will be something like this:

Code:

```forAll(cells, cellI){ }```
cellI will then point to the current cell.

Inside the loop forAll-loop you will have to check for the interface.

Finding the interface with alpha = 0.5 may be a bit more difficult because the interface may not have an exact value of 0.5, but will be in between 0 and 1.

You should make a thread about this in the Programming section of this forum, because I'm not sure at the moment how to check for the alpha-value of the cell.

 farhagim August 9, 2010 11:55

Quote:
 Originally Posted by sega (Post 270641) Looping over all cells will be something like this: Code: ```forAll(cells, cellI){ }``` cellI will then point to the current cell. Inside the loop forAll-loop you will have to check for the interface. Finding the interface with alpha = 0.5 may be a bit more difficult because the interface may not have an exact value of 0.5, but will be in between 0 and 1. You should make a thread about this in the Programming section of this forum, because I'm not sure at the moment how to check for the alpha-value of the cell.

 duongquaphim October 7, 2010 09:49

Hi Farhagim,

I am also very interested in checking the velocity and location of the interface. I guess what we can do is getting the location and the value of alpha at every points then make the interpolation for alpha = 0.5 to get the location of the interface every time step. However, since I am a newer also, I do not actually know how to do it yet.

Did you find success in getting it?

Duong

 LarsPT October 7, 2010 19:49

So, what I do to get the interface (and the positions of a moving bulk which are important for me) is just sampling the whole alpha1 field. Then I use MATLAB to find the values of alpha1 between 0.4 and 0.6 and finally get the interface. I think you can do this with a regular shell script, so you don't have to touch the OpenFOAM code.

Hope that helps!

Best regards,

Lars

 duongquaphim October 8, 2010 03:52

Hi Lars,

That is what I did at this moment. I wrote both Matlab script and Paraview python to get the position and velocity of the interface in post-processing. However, what I want to do now is getting the position of the interface during my simulation to implement my model.

Then I got troubles with how we define x, y, z, alpha of every grid point and the communication between cell and cell (for instance how can we know the value of the neighbor cell).

If you have any experiences about these, please let me know. Thanks.

Regards,

Duong

 pitambar May 10, 2011 23:25

contact line velocity

dear

i want to know how contact line velocity is different from bulk velocity and which formula can be used

I am thinking that KWOK (2004) would be proper to use