CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

alphaContactAngle patch type does not work in OF-1.6

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

Like Tree2Likes
  • 2 Post By sundaero

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2009, 20:14
Default alphaContactAngle patch type does not work in OF-1.6
  #1
New Member
 
Denis Semyonov
Join Date: Mar 2009
Posts: 14
Rep Power: 17
sundaero is on a distinguished road
Hello, everybody.

I found out that the new patch type alphaContactAngle which has replaced previously used constantGammaContactAngle for the interFoam solver does not work properly.

Consider given tutorial example damBreak using laminar turbulence model.

If you follow the User Guide and replace in the 0/alpha1 file any wall boundary patch from zeroGradient to something like:
Code:
boundaryField
{
    leftWall
    {
//        type            zeroGradient;
        type            alphaContactAngle;
        theta0          40;
        thetaA          70;
        thetaR          10;
        uTheta          1;
        value           uniform 1;
    }
...
then you will get the following error message:
Code:
damBreak> interFoam              
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.6                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 1.6-f802ff2d6c5a
Exec   : interFoam
Date   : Sep 25 2009
Time   : 02:56:41
Host   : kowalski
PID    : 18331
Case   : /home/semyonov/OpenFOAM/semyonov-1.6/run/damBreak
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Reading g
Reading field p

Reading field alpha1

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian


Not Implemented
    Trying to construct an genericFvPatchField on patch leftWall of field rho#0  Foam::error::printStack(Foam::Ostream&) in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  Foam::genericFvPatchField<double>::genericFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#3  Foam::fvPatchField<double>::addpatchConstructorToTable<Foam::genericFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#4  Foam::fvPatchField<double>::New(Foam::word const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/interFoam"
#5  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::List<Foam::word> const&) in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/interFoam"
#6  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::List<Foam::word> const&) in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/interFoam"
#7  main in "/home/semyonov/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/interFoam"
#8  __libc_start_main in "/lib64/libc.so.6"
#9  _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116


    From function genericFvPatchField<Type>::genericFvPatchField(const fvPatch& p, const DimensionedField<Type, volMesh>& iF)
    in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 45.

FOAM aborting

Aborted
Does that mean that this patch type is simply not yet implemented in OF-1.6?

Just in case I have also tried to set this patch to constantGammaContactAngle and alpha1ContactAngle, but neither works.

I am not very familiar with the source code. How can I check the list of the available and implemented boundary patche types?

Denis
sundaero is offline   Reply With Quote

Old   September 25, 2009, 04:04
Default
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
alphaContactAngle is the abstract base-type with concrete implementations:

constantAlphaContactAngle
dynamicAlphaContactAngle
timeVaryingAlphaContactAngle

I think you need constantAlphaContactAngle for your case.

H
henry is offline   Reply With Quote

Old   September 25, 2009, 04:51
Default
  #3
bfa
Member
 
Björn Fabritius
Join Date: Mar 2009
Location: Freiberg, Germany
Posts: 31
Rep Power: 17
bfa is on a distinguished road
different case, similar problem:

I tried to convert a OF 1.5-dev case with moving mesh to OF 1.6. First of all: Why is it that I now have to provide cellMotionU AND pointMotionU when using the velocityLaplacian motionSolver instead of just giving motionU as of version 1.5?
But the real problem is that I used the oscillatingFixedValue b.c. on a patch for movement, but that leads to
Code:
Not Implemented
    Trying to construct an genericFvPatchField on patch topStamp of field cellMotionU#0
As Henry mentioned, this b.c. might be a virtual one, but browsing the code shows me that it's not (it can be found in OpenFOAM-1.6/src/finiteVolume/fields/fvPatchFields/derived)

Any ideas how to use this or another b.c. that does the same job with a moving wall?

tx, bjoern
bfa is offline   Reply With Quote

Old   September 25, 2009, 12:41
Default
  #4
New Member
 
Denis Semyonov
Join Date: Mar 2009
Posts: 14
Rep Power: 17
sundaero is on a distinguished road
Thank you, Henry.

Suggestet patch types working well in the damBreak example of OF-1.6.

I guess it was just too late yesterday, so I forgot to simply replace constantGammaContactAngle with the constantAlphaContactAngle and thought that there is something wrong with OpenFOAM installation.

Denis
sundaero is offline   Reply With Quote

Old   December 8, 2009, 03:40
Default Not yet figured out!
  #5
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Hello sundaero!

Could you please post your final alpha1 file with the modified contact angle? Because I haven not yet figured out how it works.

Cheers,

Claus
idrama is offline   Reply With Quote

Old   December 8, 2009, 09:14
Default
  #6
New Member
 
Denis Semyonov
Join Date: Mar 2009
Posts: 14
Rep Power: 17
sundaero is on a distinguished road
Here it goes (implementation of the dynamic contact angle):
Code:
/*--------------------------------*- C++ -*----------------------------------*\                                                                                                                                                    
| =========                 |                                                 |                                                                                                                                                    
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |                                                                                                                                                    
|  \\    /   O peration     | Version:  1.5                                   |                                                                                                                                                    
|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |                                                                                                                                                    
|    \\/     M anipulation  |                                                 |                                                                                                                                                    
\*---------------------------------------------------------------------------*/                                                                                                                                                    
FoamFile                                                                                                                                                                                                                           
{                                                                                                                                                                                                                                  
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      alpha1;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 1;

boundaryField
{
    FRONT_WALL
    {
        type            empty;
    }
    BACK_WALL
    {
        type            empty;
    }
    OUTLET
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    GAS_INLET
    {
        type            fixedValue;
        value           uniform 0;
    }
    CATALYST
    {
        type            dynamicAlphaContactAngle;
        theta0          40;
        thetaA          70;
        thetaR          10;
        uTheta          1;
        value           uniform 1;
    }
    LIQUID_INLET
    {
        type            zeroGradient;
        type            fixedValue;
        value           uniform 1;
    }
    TOP_WALLS
    {
        type            zeroGradient;
    }
    LEFT_RIGHT
    {
        type            cyclic;
        value           uniform 1;
    }
}


// ************************************************************************* //
BR
Denis
koooje and yeyinglcn like this.
sundaero is offline   Reply With Quote

Old   June 16, 2010, 11:11
Default Similar error, different cause
  #7
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17
markc is on a distinguished road
Hello All,

I have the similar error (Not implemented, trying to construct an gFPF on patch ... of field rho#()). The error is being generated by the file genericFvPatchField.C.
However, I am doing something else: I created a private boundary condition which is based on timeVaryingUniformFixedValue which is intended to be used on alpha1 field only. It compiles well. But at runtime I get that specific error.
My 0/alpha1 for that specific patch looks like

type surfaceWaveAlpha;
value uniform 0;

Because the error message is complaing about rho, I also tried adding : rho rho, without result.

Can anyone give me some hints here, althoug I admit that the description might be a bit vague...

Thanks in advance,

Mark
markc is offline   Reply With Quote

Old   June 18, 2011, 04:45
Default
  #8
New Member
 
azar
Join Date: Dec 2010
Posts: 5
Rep Power: 15
ajamy is on a distinguished road
Hi, i am realy confused
whats the meaning of the 'thataA","theta0","thetaR" and "utheta"?
can you tell me a bout it briefly?
tnx
ajamy is offline   Reply With Quote

Old   March 19, 2012, 22:23
Default
  #9
New Member
 
bibin
Join Date: Jun 2011
Posts: 2
Rep Power: 0
koooje is on a distinguished road
Dear Henry,

I am a new user and I am trying to implement slug-plug flow of water in oil in a 250micon closed square channel. I have a relation which goes like thetaA=thetaA0+const*Ca^(1/3) for advancing CA and thetaR=thetaR0-const*Ca^(1/3) for receding CA, both based on Tanner's law. The difference in thetaA0 and thetaR0 is the contact angle hysteresis. I am trying to understand the shape of droplets under the influence of contact angle hysteresis. Could you please explain with a sample code, if possible how to implement dynamicAlphaContactAngle in /0/alpha1. I believe it goes into the boundary condition in alpha1. Your reply is deeply appreciated.

Thanks,

Koooje
koooje is offline   Reply With Quote

Old   April 1, 2012, 19:40
Default
  #10
New Member
 
bibin
Join Date: Jun 2011
Posts: 2
Rep Power: 0
koooje is on a distinguished road
Go to : opt/openfoam210/src/transportModels/twoPhaseInterfaceProperties/alphaContactAngle for the implementation of dynamicAlphaContactAngle

Check out the file 'dynamicAlphaContactAngleFvPatchScalarField.C' and 'dynamicAlphaContactAngleFvPatchScalarField.H' to find the meaning of all the parameters you asked for. The theta is specified by the formula theta=theta0_ + (thetaA_ - thetaR_)*tanh(uwall/uTheta_). If you plot this formula with matlab/mathematica you can see how theta varies with different parameters.


Koooje
koooje is offline   Reply With Quote

Old   April 13, 2012, 18:08
Default
  #11
New Member
 
Nikhil
Join Date: Sep 2011
Posts: 11
Rep Power: 14
Nikhilcfd is on a distinguished road
Hello Koooje,

To implement your new dynamic contact angle BC, start off by copying the existing files of dynamic contact angle implementation. You need to calculate the capillary number by creating volScalarField 'mu' in createField.H file and update it every iteration. Call the 'mu' from your new files and calculate the capillary number. Once you calculate that you can use your theta expressions. All you need to do is change the way theta is being calculated and return it to interface.C file which takes care of the correction. Hope this helps.

Nikhil
Nikhilcfd is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forces in OF15 richard OpenFOAM Running, Solving & CFD 180 July 9, 2018 10:54
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
[blockMesh] Cyclic BC's: Possible face ordering problem? (Channel flow) sega OpenFOAM Meshing & Mesh Conversion 3 September 28, 2010 12:46
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12
Combustion Convergence problems Art Stretton Phoenics 5 April 2, 2002 05:59


All times are GMT -4. The time now is 10:58.