CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   contact angle / multiphaseInterFoam (

cookie November 9, 2009 10:30

contact angle / multiphaseInterFoam
Hallo everybody!

I want to use the contact angle definition for walls with the multiphaseInterFoam solver.

As basis for my own modell I chose the dambreak4phase tutorial but I don't know how to modify the boundary conditions to get the alphaContactAngle working.

When I searched the Forum I only found out that I have to modify the alpha... files in 0/ directory before running setFields but what is the exactly code for it?



cookie November 11, 2009 11:11

One step further
Hello, it's me again!

I think that I reached the next level with my model ;)

In the damBreak4Phase-tutorial one can see the correct definition for the alphaContactAngle at the end of the file:
type alphaContactAngle;
thetaProperties ( ( water air ) 90 0 0 0 ... );
value uniform 0;

I would assume that the values of the thetaProps are defined in the user guide of OpenFoam.
But the next question is why the value must be 0 and not 1, what makes the difference?

P.S. Obviously there is a bug in setFields, because running setFields with a "fresh" alphaPhase file results in a mixed up List of phase entries in this file.
Here funkySetFields seems to work OK (I use the -keepPatches option), so thank you very much for this little program!



idrama November 23, 2009 13:47

Hey cookie!

i read your post carefully. however, it is not clear to me which file you have edited. Could please post the exact procedure to set up the alphaContactAngle boundary condition.

kinda regrards

cookie November 24, 2009 04:49

Hi Claus and thanks for your reply!

You're right, I missed to post the name of the file.
But now, I think, it works:
I chose the 0/ file to set the contact angles for all phases in my own model:

type alphaContactAngle;
thetaProperties ( ( Water Air ) 90 0 0 0 );
value uniform 0;

type alphaContactAngle;
thetaProperties ( ( Water Air ) 90 0 0 0 );
value uniform 0;
type inletOutlet;
inletValue uniform 1;
value uniform 1;
type empty;

There are two phases, Water and Air and in this case, the static contact angle is 90.
Please be aware that this is only an example, but you can find it also at the end of damBreak4Phase/0/alphaair.
Than you can run funkySetFields to set the positions of the phases and afterwards you will find this text-structure at the end of the alphaAir file.

When you use setFields, this may be a problem and you have to correct the position manually.

Please post, if you have any further questions.

Kind regards


idrama December 10, 2009 08:17

Hallo cookie

thanks for your post, it helped me a lot. However, I have just started to get involved into multiphaseInterFoam solver and I am not very far. Therefore, I want to ask you if you have done a simulation with channal flows?



cookie December 10, 2009 09:35

Channel flow
Hi Claus,

thank you very much!
Unfortunately I must say, that I'm quite new to openFoam, so I do not have any greater experience. That also means, that I haven't worked with channel flow so far, sorry for that.

Greetings Andreas

All times are GMT -4. The time now is 00:22.