CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   how to specify wall contact angle for compressibleInterFoam? (http://www.cfd-online.com/Forums/openfoam-solving/81105-how-specify-wall-contact-angle-compressibleinterfoam.html)

phsieh2005 October 15, 2010 17:25

how to specify wall contact angle for compressibleInterFoam?
 
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

ata October 16, 2010 09:11

Hi
It seems you must use dynamicAlphaContactAngle.
Best regards

Ata

phsieh2005 October 16, 2010 17:37

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

ata October 16, 2010 22:13

Hi Pei
Thanks for yur explanation
Good luck
Best regards

Ata

styleworker December 18, 2012 16:01

2 Attachment(s)
Quote:

Originally Posted by phsieh2005 (Post 279470)
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:
Attachment 17709

Pressure BC fixedFluxPressure at wall:
Attachment 17708

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.


All times are GMT -4. The time now is 04:51.