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

Strange behaviour when using compressibleInterFoam with constantAlphaContactAngle

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2015, 09:39
Default Strange behaviour when using compressibleInterFoam with constantAlphaContactAngle
  #1
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12
TobM is on a distinguished road
Hi,

I have a test case, which is a rectangular box with a rectangular outlet. The box is filled with a fluid which flows out of the box due to gravity (refer to attached screenshot).

The mesh is created with blockMesh and has a cell size of 1mm.

The solver used is compressibleInterFoam in the 2.3.x version and no turbulence model is used --> laminar.

Boundary Conditions:
p_rgh:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [ 1 -1 -2 0 0 0 0 ];

internalField uniform 100000.0;

boundaryField
{
    Box_inlet
    {
        type          totalPressure;
        U             U;
        phi           phi;
        rho           rho;
        psi           none;
        gamma         1.4;
        p0            uniform 100000.0;
    }
    Box_sideWalls
    {
        type fixedFluxPressure;
    }
    Box_bottomWall
    {
        type fixedFluxPressure;
    }
    Outlet_walls
    {
        type fixedFluxPressure;
    }
    Outlet_bottom
    {
        type          totalPressure;
        U             U;
        phi           phi;
        rho           rho;
        psi           none;
        gamma         1.4;
        p0            uniform 100000.0;
    }
}
p:
calculated on all patches

T:
at walls fixedValue and at inlet and outlet zeroGradient

U:
Code:
FoamFile
{
    version     2.3.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [ 0 1 -1 0 0 0 0 ];

internalField uniform (0 0 0);

boundaryField
{
    Box_inlet
    {
        type pressureInletOutletVelocity;
        value uniform (0 0 0);
    }
    Box_sideWalls
    {
        type fixedValue;
        value uniform (0 0 0);
    }
    Box_bottomWall
    {
        type fixedValue;
        value uniform (0 0 0);
    }
    Outlet_bottom
    {
        type pressureInletOutletVelocity;
        value uniform (0 0 0);
    }
    Outlet_walls
    {
        type fixedValue;
        value uniform (0 0 0);
    }
}
and
alpha.water:
Code:
FoamFile
{
    version     2.3.0;
    format      ascii;
    class       volScalarField;
    object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [ 0 0 0 0 0 0 0 ];

internalField uniform 0;

boundaryField
{
    Box_inlet
    {
        type         inletOutlet;
        inletValue   uniform 0;
        value        uniform 0;
    }
    Box_sideWalls
    {
         type constantAlphaContactAngle;
         theta0 10;
         limit gradient;
         value uniform 0;
    }
    Outlet_walls
    {
         type constantAlphaContactAngle;
         theta0 10;
         limit gradient;
         value uniform 0;
    }
    Outlet_bottom
    {
        type         inletOutlet;
        inletValue   uniform 0;
        value        uniform 0;
    }
    Box_bottomWall
    {
         type constantAlphaContactAngle;
         theta0 10;
         limit gradient;
         value uniform 0;
    }
}
As you can see in the attached screenshots, in the corners of the box fluid ascends to the top. and alpha.water exceeds 1 ! at the walls of the outlet.
This behaviour can be observed for different viscosities and is only present when using constantAlphaContactAngle. Furthermore, the strange behaviour declines with increasing contact angle but does not vanish.

Concerning the constantAlphaContactAngle BC:
- when using limit none or alpha, the simulation diverges and alpha.water exceeds 1
- when using limit zeroGradient the fluid ascends only one or two cells
According to the description of the BC limit zeroGradient
Code:
// Set the gradient of alpha1 to 0 on the wall
  // i.e. reproduce previous behaviour
exactly what previous behaviour is reproduced?
A zeroGradient behaviour at the wall is only achieved, when the contact angle is set to 90°.

Additionally the fvSolution and fvSchemes file:
Code:
FoamFile
{
    version     2.3.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    alpha.water
    {
        nAlphaCorr      1;
        nAlphaSubCycles 1;
        cAlpha          1;
    }

    pcorr
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-05;
            relTol          0;
            smoother        DICGaussSeidel;
            nPreSweeps      0;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-05;
        relTol          0;
        maxIter         100;
    }

    ".*(rho|rhoFinal)"
    {
        solver          diagonal;
    }

    p_rgh
    {
        solver          GAMG;
        tolerance       1e-07;
        relTol          0.01;
        smoother        DIC;
        nPreSweeps      0;
        nPostSweeps     2;
        nFinestSweeps   2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;
    }

    p_rghFinal
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-07;
            relTol          0;
            nVcycles        2;
            smoother        DICGaussSeidel;
            nPreSweeps      2;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }
        tolerance       1e-07;
        relTol          0;
        maxIter         20;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        tolerance       1e-06;
        relTol          0;
        nSweeps         1;
    }

    "(T|k|B|nuTilda).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;    
        tolerance       1e-10;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor no;
    transonic       no;
    nOuterCorrectors 1;
    nCorrectors     3;
    nNonOrthogonalCorrectors 0;
}
Code:
FoamFile
{
    version     2.3.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    div(phi,alpha)  Gauss vanLeer;
    div(phirb,alpha) Gauss linear;

    div(rhoPhi,U)  Gauss upwind;
    div(phi,thermo:rho.water) Gauss upwind;
    div(phi,thermo:rho.air) Gauss upwind;
    div(rhoPhi,T)  Gauss upwind;
    div(rhoPhi,K)  Gauss upwind;
    div(phi,p)      Gauss upwind;
    div(phi,k)      Gauss upwind;

    div((muEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear uncorrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}

fluxRequired
{
    default         no;
    p_rgh;
    pcorr;
}
Has anyone observed similar behaviour or can help me with this problem?

Thanks
Tobias
Attached Images
File Type: jpg Mesh and Initialisation.jpg (38.1 KB, 75 views)
File Type: jpg t=0.8sSide.jpg (18.1 KB, 68 views)
File Type: jpg t=3sSide.jpg (19.0 KB, 64 views)
File Type: jpg t=1.5sSideCellValues.jpg (18.3 KB, 64 views)
File Type: jpg alphaGreater1.jpg (17.6 KB, 61 views)
TobM is offline   Reply With Quote

Old   March 17, 2015, 04:01
Default
  #2
Member
 
Join Date: Sep 2014
Location: Germany
Posts: 88
Rep Power: 12
TobM is on a distinguished road
If your need more information or further description of the case/problem, please ask for it.

Additional information:
- the behaviour occurs regardless of mesh resolution
- the simulation converges
TobM is offline   Reply With Quote

Old   May 11, 2016, 07:34
Default
  #3
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi Tobias,


I have simulated paraffin and air in a similar test case. But have a better wetting rather smoother than what you have, I cannot really understand what could be the case. The small differences I suspect is that water has an acute wettability value greater than 10°, please try that if possible.


BR,
Rohith
RaghavendraRohith is offline   Reply With Quote

Reply

Tags
compressibleinterfoam, constantalphacontactangle, contact angle, interfoam


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
strange pressure behaviour with symmetricPlane boudary condition - interFoam duongquaphim OpenFOAM Running, Solving & CFD 10 August 20, 2013 15:00
Strange residuals behaviour xxxx Main CFD Forum 1 July 13, 2013 15:40
Strange behaviour when using LienCubicKE and NonlinearKEShih hani OpenFOAM Running, Solving & CFD 20 March 6, 2013 11:06
Strange boundary behaviour using interFoam Andrea_85 OpenFOAM 11 January 22, 2013 16:09
strange behaviour of GGI in parallel on axis symmetrical case A.Devesa OpenFOAM Running, Solving & CFD 0 April 6, 2010 04:58


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