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

Boundary conditions for a free surface flow using interfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2012, 04:35
Question Boundary conditions for a free surface flow using interfoam
  #1
New Member
 
Oleg
Join Date: Oct 2012
Posts: 4
Rep Power: 14
FrolovOY is on a distinguished road
HI all! I simulate flow in a channel with a free surface using interfoam solver. For this purpose I built a channel with length of 10 meters, width of 2 meters. For the velocity, pressure and alpha asked the following boundary conditions:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform (1 0 0);
    }

    outlet
    {
        type            zeroGradient;
    }

    upperWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;

boundaryField
{
    inlet           
    {
        type            zeroGradient;
    }

    outlet          
    {
        type            totalPressure;
        p0              uniform 0;
        U               U;
        phi             phi;
        rho             rho;
        psi             none;
        gamma           1;
        value           uniform 0;
    }

    upperWall       
    {
        type            zeroGradient;
    }

    lowerWall       
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      alpha;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
         type            fixedValue;
         value           uniform 1; 
    }

    outlet
    {
        type            zeroGradient;
    }

    upperWall
    {
        type            zeroGradient;
    }

    lowerWall
    {
        type            zeroGradient;
    }

    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}
The geometry of the fluid is defined as follows:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
    volScalarFieldValue alpha1 0
);

regions
(
    boxToCell
    {
        box (0 0 0) (2 2 1);
        fieldValues
        (
            volScalarFieldValue alpha1 1
        );
    }
);
However, as seen in the following figure 1, the problem arises in that the channel width from 0 to 2 meters is not completely filled. In other words, alfa1 must equal 1 throughout the width of the section to the left of the front of the free surface.
1.png
2.png

Нow can I fix it? What I asked wrong in the boundary conditions?

Thanks!
Regards, FrolovOY
FrolovOY is offline   Reply With Quote

Old   January 7, 2013, 10:27
Default
  #2
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Hi FrolovOY,
could you tell what cell size you apply, and maybe post your transportProperty file?
The surface between air and liquid depends on the grid and on the transportProperties...
vonboett is offline   Reply With Quote

Old   January 10, 2013, 09:59
Default
  #3
New Member
 
Oleg
Join Date: Oct 2012
Posts: 4
Rep Power: 14
FrolovOY is on a distinguished road
Quote:
Originally Posted by vonboett View Post
Hi FrolovOY,
could you tell what cell size you apply, and maybe post your transportProperty file?
The surface between air and liquid depends on the grid and on the transportProperties...
Hi, vonboett. This is my transportProperty:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

phase1
{
    transportModel  Newtonian;
    nu              nu [ 0 2 -1 0 0 0 0 ] 10;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1000;
    /*CrossPowerLawCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        m               m [ 0 0 1 0 0 0 0 ] 1;
        n               n [ 0 0 0 0 0 0 0 ] 0;
    }

    BirdCarreauCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        k               k [ 0 0 1 0 0 0 0 ] 99.6;
        n               n [ 0 0 0 0 0 0 0 ] 0.1003;
    }*/
}

phase2
{
    transportModel  Newtonian;
    nu              nu [ 0 2 -1 0 0 0 0 ] 1.48e-5;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1;
    /*CrossPowerLawCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        m               m [ 0 0 1 0 0 0 0 ] 1;
        n               n [ 0 0 0 0 0 0 0 ] 0;
    }

    BirdCarreauCoeffs
    {
        nu0             nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515;
        nuInf           nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
        k               k [ 0 0 1 0 0 0 0 ] 99.6;
        n               n [ 0 0 0 0 0 0 0 ] 0.1003;
    }*/
}

sigma           sigma [ 1 0 -2 0 0 0 0 ] 0.07;
and blockMeshDict file:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0 0 0)
    (10 0 0)
    (0 2 0)
    (10 2 0)
    (0 0 1)
    (10 0 1)
    (0 2 1)
    (10 2 1)  
);

blocks
(
    hex (0 1 3 2 4 5 7 6) (100 20 10) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 4 6 2)
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (1 5 7 3)
        );
    }
    upperWall
    {
        type wall;
        faces
        (
            (2 3 7 6)
        );
    }
    lowerWall
    {
        type wall;
        faces
        (
            (0 1 5 4)
        );
    }
    frontAndBack
    {
        type empty;
        faces
        (
            (0 1 3 2)
            (4 5 7 6)
        );
    }
);

mergePatchPairs
(
);
In such a way ten cells form one meter.
I would be grateful for your help.

U_alpha.jpg

Thanks!
Regards, FrolovOY
FrolovOY is offline   Reply With Quote

Old   January 11, 2013, 03:21
Default
  #4
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 17
danvica is on a distinguished road
Hi Frolov,
why you have such a high kinematic viscosity for alpha1 ?

Quote:
phase1
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 10;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;

...
Regards,
__________________
Daniele Vicario

blueCFD2.1 - Windows 7
danvica is offline   Reply With Quote

Old   January 11, 2013, 12:31
Default
  #5
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 16
michielm is on a distinguished road
Quote:
Originally Posted by FrolovOY View Post
However, as seen in the following figure 1, the problem arises in that the channel width from 0 to 2 meters is not completely filled. In other words, alfa1 must equal 1 throughout the width of the section to the left of the front of the free surface.

Нow can I fix it? What I asked wrong in the boundary conditions?
There is two things that come to mind:
- have you tried using -1 to 3 instead of 0 to 2 in the setFieldsDict? Maybe the fact that you put it exactly on the boundary is the issue
- the other thing is indeed the extremely high viscosity (10000 Pas so 1E8 bigger than that of water) which might cause excessive wall drag therefore causing a sort of vena contracta type of behaviour

Edit: given the other properties you use I guess you meant to use the (kinematic) viscosity of whether. Which is 1e-6
michielm is offline   Reply With Quote

Old   January 21, 2013, 02:25
Default
  #6
New Member
 
Oleg
Join Date: Oct 2012
Posts: 4
Rep Power: 14
FrolovOY is on a distinguished road
Quote:
Originally Posted by danvica View Post
Hi Frolov,
why you have such a high kinematic viscosity for alpha1 ?



Regards,
Hi danvitsa. For alpha1 given such a large kinematic viscosity, because I'm trying to simulate a polymer flow in the channel. For example, High-density polyethylene (HDPE). Such polymers are characterized by high dynamic viscosity, namely 10e3 - 10e5 Pa * sec. Accordingly, the kinematic viscosity is set from 1 to 100 m2/sec.
FrolovOY is offline   Reply With Quote

Old   January 21, 2013, 02:59
Default
  #7
New Member
 
Oleg
Join Date: Oct 2012
Posts: 4
Rep Power: 14
FrolovOY is on a distinguished road
Quote:
Originally Posted by michielm View Post
There is two things that come to mind:
- have you tried using -1 to 3 instead of 0 to 2 in the setFieldsDict? Maybe the fact that you put it exactly on the boundary is the issue
- the other thing is indeed the extremely high viscosity (10000 Pas so 1E8 bigger than that of water) which might cause excessive wall drag therefore causing a sort of vena contracta type of behaviour

Edit: given the other properties you use I guess you meant to use the (kinematic) viscosity of whether. Which is 1e-6
Hi michielm.
Following your advice, I expanded setFields borders on Y ((-1 -1 0) (3 4 1) , but it did not help.
Liquid with small kinematic viscosity (eg water) behaves well. See Figure 1. (Nu = 1.3 * 10e-6; deltaX = 0.05 m)
w.0010.jpg
Figure 2 shows the flow of fluid with a high kinematic viscosity without gravity.
Снимок 2-1.jpg
It is seen that during the motion between the fluid and the wall is formed air. But it is given no-slip condition?
Code:
upperWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
Maybe there are other settings in the boundary conditions that need to be considered?
Maybe to simulate motion of polymers or similar to them, there is another solver rather than interfoam?
How can I set the phase1 parameters (in my case, HDPE) for the non-Newtonian fluid in a file transportProperties? May be it is necessary to ask the contact angle in alpha1 file?
FrolovOY is offline   Reply With Quote

Old   January 21, 2013, 05:51
Default
  #8
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
No slip means that at your boundary nothing moves, so it might be the air cant be pushed away here, although I didn't face that problem in my simulations. With low viscosity your cell center at the boundary probably gets an alpha1 value of liquid due to the high possible gradient in the phase interface, so you won't see the air in your longitudinal sections, but maybe you could check this if you look at the boundary itself in paraview, colored by cell values of alpha1, not by interpolated values.

The other more reasonable explanation would be that because you have no gravity there is no buoyancy to move the air upwards from the lower boundary, which could be the reason for the difference between your two simulations.
vonboett is offline   Reply With Quote

Old   January 25, 2013, 06:27
Default
  #9
Member
 
Michiel
Join Date: Oct 2010
Location: Delft, Netherlands
Posts: 97
Rep Power: 16
michielm is on a distinguished road
Quote:
Originally Posted by vonboett View Post
No slip means that at your boundary nothing moves, so it might be the air cant be pushed away here, although I didn't face that problem in my simulations.......
Indeed this is a well-known problem in fluid dynamics of moving contact lines. With a perfectly sharp interface it would be impossible for the fluid-fluid interface to move at the wall, because of the no-slip condition. However, with VOF this is automatically solved because the alpha1 field in cells at the boundary can still be advected as long as the viscous stress allows it and the contact line location is adjusted according to that field, therefore removing the issue of a non-mobile contact line.

That said, for a sharp interface the viscous stress diverges at the contact line because of the no-slip condition and the rate of divergence is obviously worse when the viscosity of the fluid is higher. Therefore it might be (I am guessing a bit here), that the very high viscosity of your fluid causes the contact line to remain immobile, despite the diffuse interface.

What you could try to get rid of the stress singularity is to use a navier slip BC to see if that indeed makes the contact line mobile.

[EDIT] for a first try you can use the partialSlip BC, if it indeed works you can always implement the navier slip BC for more `logical' behaviour

Last edited by michielm; January 25, 2013 at 06:31. Reason: addition
michielm is offline   Reply With Quote

Reply

Tags
boundary conditions, channel flow, free surface, 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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
3-D Compressible Flow Boundary Conditions Tyler FLUENT 4 February 5, 2009 20:58
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 07:18
Please help with flow around car modelling! Tudor Miron CFX 17 March 19, 2004 20:23
free surface boundary conditions Gerard Moroney Main CFD Forum 2 November 17, 1998 16:49


All times are GMT -4. The time now is 13:54.