CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

how to specify wall contact angle for compressibleInterFoam?

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

Like Tree9Likes
  • 9 Post By phsieh2005

Reply
 
LinkBack Thread Tools Display Modes
Old   October 15, 2010, 17:25
Default how to specify wall contact angle for compressibleInterFoam?
  #1
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 270
Rep Power: 8
phsieh2005 is on a distinguished road
Hi,

I used to specify contact angle the following way:

channel
{
type constantAlphaContactAngle;
theta0 90;
uTheta 0;
thetaA 90;
thetaR 90;
value uniform 0;
}

but now in OpenFOAM-1.7.x, I am getting the following error:

Reading field alpha1



--> FOAM FATAL IO ERROR:
keyword limit is undefined in dictionary "/home/phsieh/OpenFOAM/phsieh-1.7.x/run/transducerInterfaceA/0/alpha1::boundaryField::channel"

file: /home/phsieh/OpenFOAM/phsieh-1.7.x/run/transducerInterfaceA/0/alpha1::boundaryField::channel from line 183257 to line 183259.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 395.

FOAM exiting
-------------------

what does the limit do? It looks like the limit keyword is looking for :

alpha
zeroGradient
gradient
none

when to choose which one?

Thanks!

Pei
phsieh2005 is offline   Reply With Quote

Old   October 16, 2010, 09:11
Default
  #2
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 322
Rep Power: 8
ata is on a distinguished road
Hi
It seems you must use dynamicAlphaContactAngle.
Best regards

Ata
ata is offline   Reply With Quote

Old   October 16, 2010, 17:37
Default
  #3
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 270
Rep Power: 8
phsieh2005 is on a distinguished road
Hi, ata,

Thanks for the reply!

I found the answer in alphaContactAngleFvPatchScalarField.H:

Description
Abstract base class for alphaContactAngle boundary conditions.

Derived classes must implement the theta() fuction which returns the
wall contact angle field.

The essential entry "limit" controls the gradient of alpha1 on the wall:

limit none; // Calculate the gradient from the contact-angle without
// limiter

limit gradient; // Limit the wall-gradient such that alpha1 remains
// bounded on the wall

limit alpha; // Bound the calculated alpha1 on the wall

limit zeroGradient; // Set the gradient of alpha1 to 0 on the wall
// i.e. reproduce previous behaviour

Note that if any of the first three options are used the boundary condition
on p_rgh must set to guarantee that the flux is corrected to be zero at the
wall e.g.

walls
{
type fixedFluxPressure;
adjoint no;
}

If "limit zeroGradient;" is used the pressure BCs can be left as before.

SourceFiles
alphaContactAngleFvPatchScalarField.C

----------------------

Still not quite clear when to choose which one, but, for now, I added
limit none;
and still using constantAlphaContactAngle
and the case is running. Will check if the results are reasonable.

Pei
phsieh2005 is offline   Reply With Quote

Old   October 16, 2010, 22:13
Default
  #4
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 322
Rep Power: 8
ata is on a distinguished road
Hi Pei
Thanks for yur explanation
Good luck
Best regards

Ata
ata is offline   Reply With Quote

Old   December 18, 2012, 16:01
Default
  #5
Member
 
Join Date: May 2012
Posts: 50
Rep Power: 4
styleworker is on a distinguished road
Quote:
Originally Posted by phsieh2005 View Post
Hi, ata,

Thanks for the reply!

I found the answer in alphaContactAngleFvPatchScalarField.H:

Description
Abstract base class for alphaContactAngle boundary conditions.

Derived classes must implement the theta() fuction which returns the
wall contact angle field.

The essential entry "limit" controls the gradient of alpha1 on the wall:

limit none; // Calculate the gradient from the contact-angle without
// limiter

limit gradient; // Limit the wall-gradient such that alpha1 remains
// bounded on the wall

limit alpha; // Bound the calculated alpha1 on the wall

limit zeroGradient; // Set the gradient of alpha1 to 0 on the wall
// i.e. reproduce previous behaviour

Note that if any of the first three options are used the boundary condition
on p_rgh must set to guarantee that the flux is corrected to be zero at the
wall e.g.

walls
{
type fixedFluxPressure;
adjoint no;
}

If "limit zeroGradient;" is used the pressure BCs can be left as before.

SourceFiles
alphaContactAngleFvPatchScalarField.C

----------------------

Still not quite clear when to choose which one, but, for now, I added
limit none;
and still using constantAlphaContactAngle
and the case is running. Will check if the results are reasonable.

Pei

Hello Pei, thank your explanation!

Could you please explain, why the flux has to be zero at walls, if the limiter for alpha1 is non zeroGradient?

I've tested two different pressure bc for walls. The case is the standard capillary rise tutorial. It seems that the free surface is more oscillating with zeroGradient as pressure bc at walls as with fixedFluxPressure.

I've plotted the surface elevation over time:

Pressure BC zeroGradient at walls:
capillaryRise_zero.png

Pressure BC fixedFluxPressure at wall:
capillary_rise.png

EDIT:
I've just read that the pressure gradient is adjusts in a way that the flux on the boundary is that specified by the velocity boundary condition. (https://github.com/OpenFOAM/OpenFOAM...hScalarField.H)
So it does not have to be zero.

Last edited by styleworker; December 19, 2012 at 11:41.
styleworker 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
InterFoam contact angle JoaoMiranda OpenFOAM Running, Solving & CFD 3 August 26, 2014 11:29
tmerge utility creates unwanted interface/walls comes in the final mesh dinesh2n@gmail.com OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 11 January 20, 2012 07:23
Import netgen mesh to OpenFOAM hsieh Open Source Meshers: Gmsh, Netgen, CGNS, ... 32 September 13, 2011 05:50
solved: contact angle correction in interFoam rcastilla OpenFOAM Bugs 23 August 16, 2011 08:33
Contact angle UDF shephali shrimali FLUENT 0 May 10, 2007 07:52


All times are GMT -4. The time now is 23:39.