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

interFoam: contact angle

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 1, 2009, 06:28
Default interFoam: contact angle
  #1
ala
New Member
 
Alicja M
Join Date: Mar 2009
Location: Erlangen, DE
Posts: 26
Rep Power: 8
ala is on a distinguished road
Dear community,

I have a question concerning interFOAM: Where/How is the contactAngle during the simulation calculated? Respectively where/how gets the contactAngle respected during the simulation?Unfortunately I cannot figure out the corresponding code part.

Any hints/help would be appreciated!
Thanks in advance,
Ala
ala is offline   Reply With Quote

Old   October 2, 2009, 05:26
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Take a look into ../src/transportProperties/interfaceProperties/interfaceProperties.C / interfaceProperties.H the member function is called correctContactAngle. The definite calculation of the contact angle is in src/transportProperties/interfaceProperties/calculateContactAngle and in the subfolders. Just take a look. If you have any questions, feel free to ask Kathi
kathrin_kissling is offline   Reply With Quote

Old   October 5, 2009, 11:04
Default
  #3
ala
New Member
 
Alicja M
Join Date: Mar 2009
Location: Erlangen, DE
Posts: 26
Rep Power: 8
ala is on a distinguished road
Hi Kathi,

thank you for your reply. correctContactAngle is for correcting dynamicContactAngle, after the gamma equation being solved. But how gets the constantContactAngle during the simulation respected?

Greetings, Ala
ala is offline   Reply With Quote

Old   October 6, 2009, 07:50
Default
  #4
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Hi ala,
it is respected in UEqn.H (in case you enable the momentum corrector) and in the pEqn.
There is one term

fvc::interpolate(interface.sigmaK())*fvc::snGrad(g amma))

which is described by Brackbill 1992.

sigmaK is a member function of interfaceProperties class. And calls calculateContact angle.

Hope this helps

Kathrin
kathrin_kissling is offline   Reply With Quote

Old   September 27, 2010, 11:24
Default
  #5
ala
New Member
 
Alicja M
Join Date: Mar 2009
Location: Erlangen, DE
Posts: 26
Rep Power: 8
ala is on a distinguished road
Thank you : ) it had helps,

greetings, ala
ala is offline   Reply With Quote

Old   September 28, 2010, 11:41
Default
  #6
Member
 
Duong A. Hoang
Join Date: Apr 2009
Location: Delft, Netherlands
Posts: 92
Rep Power: 8
duongquaphim is on a distinguished road
Send a message via Yahoo to duongquaphim
Dear all,

I would like to know the differences between constant contact angle and dynamic contact angle in OF. I did some simulation with steady moving bubble in a straight channel with prescribed constant contact angle (30 degree) at the wall. What I expected is that the contact angle close to the wall at the front and the rear bubble is similar. But what I got from OF is not (you can see in the figure).



I did check the code of constantAlphaContactAngle and found that there is no function to calculate new contact angle based on alpha_advance, alpha_reduce and u_theta as I saw in dynamicAlphaContactAngle. However, I found this line in interfaceProperties.C:

scalarField theta =
convertToRad*acap.theta(U_.boundaryField()[patchi], nHatp)

which calculate contact angle at the wall. Here, we can see the appearance of U_.boundaryField()[patchi]. So U must be taken into account in calculating contact angle in OF even we use constantAlphaContactAngle option. That might explain my observation.

Do you have any other ideas about that?

Regards,

Duong
duongquaphim is offline   Reply With Quote

Old   October 12, 2010, 08:29
Default compiling error
  #7
Member
 
mohsen kh
Join Date: Nov 2009
Posts: 41
Rep Power: 6
mohsenkh599 is an unknown quantity at this point
Hi every body,
I have a problem when I want to compile a model.
the error is:

************************************************** *********************
************************************************** *********************

viscoelasticLaws/mohsen/mohsen.C:159: error: no match for ‘operator==’ in ‘Foam:perator+(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = Foam::SymmTensor<double>](((const Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > >&)((const Foam::tmp<Foam::fvMatrix<Foam::SymmTensor<double> > >*)(& Foam::fvm::div(const Foam::surfaceScalarField&, Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::SymmTensor<double>](((Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&)(&((Foam::mohsen*)this)->Foam::mohsen::a_))))))) == Foam:perator+(const Foam::tmp<Foam::GeometricField<TypeR, PatchField, GeoMesh> >&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::Tensor<double>, Type2 = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator*(const Foam::dimensioned<double>&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator&(const Foam::tmp<Foam::GeometricField<TypeR, PatchField, GeoMesh> >&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Type1 = Foam::SymmTensor<double>, Type2 = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator-(const Foam::dimensioned<Type>&, const Foam::tmp<Foam::GeometricField<Type1, PatchField, GeoMesh> >&) [with Form = Foam::SymmTensor<double>, Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >&)((const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<do uble>, Foam::fvPatchField, Foam::volMesh> >*)(& Foam:perator*(const Foam::scalar&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&)((const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>*)(&((Foam::mohsen*)this)->Foam::mohsen::a_))))))))))))))))))))’

************************************************** ************
************************************************** ************

and the model is :

// Velocity gradient tensor
volTensorField L = fvc::grad( U() );

// Convected derivate term
// volTensorField C = tau_ & L;

// vorticity term
volTensorField Vor = L - L.T();

// Twice the rate of deformation tensor
volSymmTensorField twoD = twoSymm( L );


// fc
scalar fc = 0.5; //1 - 27 * det( a_ );

//double dot term

// volSymmTensorField mk = -( (2 / 35) * ( 1 - fc ) * twoD - (2 / 7) * ( a_ & twoD + twoD & a_ + (1 / 2) * tr( twoD & a_ ) * I_ ) - fc * tr( twoD & a_ ) * a_ );

// Stress transport equation
tmp<fvSymmTensorMatrix> aEqn
(
fvm::ddt(a_)
+ fvm::div(phi(), a_)
==
( 1 / 2 ) * ( Vor & a_ - a_ & Vor ) + ( 1 / 2 ) * keisi_ * ( twoD & a_ + a_ & twoD + 2 * ( ( (2 / 35) * ( 1 - fc ) * twoD - (2 / 7) * ( 1 - fc ) * ( a_ & twoD + twoD & a_ + (1 / 2) * tr( twoD & a_ ) * I_ ) - fc * tr( twoD & a_ ) * a_ ) ) + 2 * ci_ * twoD & ( I_ - 3 * a_ )
//+ twoSymm( C )
//- zeta_ / 2 * ( (tau_ & twoD) + (twoD & tau_) )
//- fvm::Sp( epsilon_ / etaP_ * tr(tau_) + 1/lambda_, tau_ )
);

aEqn().relax();
solve(aEqn);
// Viscoelastic stress
tau_ = (etaP_ / keisi_) * (a_ - I_);
}

************************************************** ****************
************************************************** ****************

where "a" , "tau" and "I" are symmetric tensors and "Vor" is asymmetric tensor. and the others are constant parameters.

best
mohsenkh599 is offline   Reply With Quote

Old   October 12, 2010, 08:39
Default
  #8
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Hi
likely the term
( 1 / 2 ) * ( Vor & a_ - a_ & Vor ) + ( 1 / 2 ) * keisi_ * ( twoD & a_ + a_ & twoD + 2 * ( ( (2 / 35) * ( 1 - fc ) * twoD - (2 / 7) * ( 1 - fc ) * ( a_ & twoD + twoD & a_ + (1 / 2) * tr( twoD & a_ ) * I_ ) - fc * tr( twoD & a_ ) * a_ ) ) + 2 * ci_ * twoD & ( I_ - 3 * a_ )

doesnt match the right side of your equation system. Obviously it should be of type of type symTensorMarix.

Can you check whether this is ok? Just put an Info staement including the term and look what field is printed.

I'm not really sure whether you are in the correct thread since this one focusses on contact angles while your problem seems to be viscoelastic...

Best
Kathrin
kathrin_kissling is offline   Reply With Quote

Old   October 12, 2010, 08:43
Default
  #9
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
I just recognized now...

please do not crosspost!
People don't like their threads being spamed. Please keep to the forum netiquette otherwise it is likely you don't get answers at all!

Best Kathrin
kathrin_kissling is offline   Reply With Quote

Old   October 27, 2010, 07:23
Default
  #10
Senior Member
 
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 8
herbert is on a distinguished road
Quote:
Originally Posted by duongquaphim View Post
However, I found this line in interfaceProperties.C:

scalarField theta =
convertToRad*acap.theta(U_.boundaryField()[patchi], nHatp)

which calculate contact angle at the wall. Here, we can see the appearance of U_.boundaryField()[patchi]. So U must be taken into account in calculating contact angle in OF even we use constantAlphaContactAngle option. That might explain my observation.
Hi Duong,

I don't think so. U is not used when you use constantAlphaContactAngle. It has only to be given to the function theta() to match both cases: constant and dynamic contactAngle-BC.

There must be some other effects, that cause your bubble not being symmetric. Please keep in mind, that the contact angle is only corrected in the first cell layer. Of course inertia or some other effects influence the shape of the interface as well, and these effects are not symmetric.

Regards,
Stefan
herbert is offline   Reply With Quote

Old   February 26, 2014, 04:18
Default
  #11
Member
 
Join Date: Aug 2011
Posts: 81
Rep Power: 6
idefix is on a distinguished road
Hello,

I know the thread is older but I still didn´t get some points, perhaps someone can help me:

Quote:
Hi ala,
it is respected in UEqn.H (in case you enable the momentum corrector) and in the pEqn.
There is one term

fvc::interpolate(interface.sigmaK())*fvc::snGrad(g amma))

which is described by Brackbill 1992.

sigmaK is a member function of interfaceProperties class. And calls calculateContact angle.

Hope this helps

Kathrin

Does anyone know a good book/ paper where the constantAlphaContactAngle is explained?
I am not familiar with the code and I can´t understand what is going on by looking at the code.
I just want to know which equation is calculated when I use the boundary condition constantAlphaContactAngle .

Thanks a lot

Last edited by idefix; March 19, 2014 at 06:00.
idefix is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic contact angle rmousavibt Fluent UDF and Scheme Programming 10 March 7, 2014 08:00
Import netgen mesh to OpenFOAM hsieh Open Source Meshers: Gmsh, Netgen, CGNS, ... 32 September 13, 2011 05:50
Implemening Slip bc and Dynamic contact angle in interFoam asaha OpenFOAM Running, Solving & CFD 2 July 29, 2010 15:49
Theoretical background of formula for dynamic contact angle in interfoam sebastian_vogl OpenFOAM Running, Solving & CFD 3 June 22, 2009 12:25
About the Contact Angle Flora FLUENT 2 March 8, 2007 03:07


All times are GMT -4. The time now is 12:31.