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

multiphase cylindrical flow through porous medium; BC

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2015, 09:55
Question multiphase cylindrical flow through porous medium; BC
  #1
New Member
 
a.b.mkarzel
Join Date: Jul 2015
Location: Switzerland
Posts: 8
Rep Power: 11
adrianabm is on a distinguished road
hello,

I apologize in advance for my long post ;
after having researched this forum for threads that could be helpful I have decided to start this new thread. if you feel this has already been addressed elsewhere please redirect me.
there is a lot of scattered helpful literature but unfortunately, there's always a missing link somewhere with what i'm trying to do, especially given that i'm using many things at the same time (snappyhexmesh, porosity, multiphase, cylindrical CS,...) which is what brought me to writing this post.

I am new to openfoam so I may have a few 'obvious' mistakes, any guidance would be appreciated. I'm running on version 2.4, here's my case :

I'm trying to simulate the equivalent of a 'dam break' case but in a cylinder, containing a porous zone (so not entirely porous, picture below). the geometry is a cylinder of radius 0.005m, and height 0.03m. excluding the inlet and outlet patches (blue), the longitudinal direction of the tube is split into 3 parts of length 10 mm, the bottom and top parts (red) form the patch I call "main", and the middle green part is my "porous" patch

[[ a somewhat similar problem here : http://www.cfdandco.com/resources/JR...sInter_v11.pdf
but it is cartesian and doesn't use snappyhexmesh ]]

before I discuss the 2-phase aspect of my case, let me clarify how I implement the porous zone.
I had looked it up and noticed that a few methods were available, either using fvOptions (the newer method) or by defining a cellZone and using porosityProperties, which is what I opted for. my steps are as follows :
1) blockMesh
2) $ setSet
$ cellSet [name of cells] new cylinderToCell (0 0 0.01) (0 0 0.02) 0.005
$ cellZoneSet [name of cellZone] new setTocellZone [name of cells]
3) surfaceFeatureExtract -> snappyHexMesh

my result is the second picture containing the mesh.

the porous zone is supposed to model a large amount of small unidirectional channels, so I consider it as an anisotropic porous zone, the fluid has to go along Z, so I just put a much higher resistance in X and Y. (r, theta)
I'm not sure if by locally defining a cylindrical CS as seen below, i've accurately represented my porous medium or not... here's what i've read about it (http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/HaukurElvarHafsteinsson/haukurReport.pdf)



Code:
    
    class       dictionary;
    location    "constant";
    object      porosityProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

porosity1
{
    type            DarcyForchheimer;
    active          yes;
    cellZone        porosity;

    DarcyForchheimerCoeffs
    {
    mu mu;
        d   d [0 -2 0 0 0 0 0] (2e10 2e10 3.96221e5);
        f   f [0 -1 0 0 0 0 0] (0 0 0);
        coordinateSystem
        {
            type    cartesian;
            origin  (0 0 0);
            coordinateRotation
            {
                type    localAxesRotation;
                e3      (0 0 1);  

        //type    axesRotation;
        //e1    (0 0 1);
               // e2    (0 1 0);  

            }
        }
    }
}
3rd picture : I then define my multiphase initialization in setFieldsDict where I define an 8mm long cylinder of oil, also 5mm radius, in the "main" patch near the "inlet". It will later be subject to the gravitational acceleration "g" in the Y direction and will consequently fill the tube just like the Cartesian dam break example (in red), pushing around the air that initially fills the rest of the tube (in blue).

to solve this case, i'm using the porousInterFoam solver and after finally managing to get it running, my solution starts to diverge as soon as the interface reaches the inlet of the porous zone (cf. picture below).
right now, my guess is that my boundary conditions for the oil phase are not correct.. but the problem could also be due to a badly defined porous zone or a bad choice of solvers.. i don't know if anyone has already had a similar experience, in any case, any help or hints as to how I can trace the error causing the crash interface><porouszone would be appreciated.


thank you


[here are the BCs I tried for the oil phase
Code:
    class       volScalarField;
    object      alpha.oil;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;
    }

    main
    {
        type            inletOutlet;
        inletValue      uniform 0; //was 1
        value           uniform 0; //was 1
    }

    porous
    {
      type        zeroGradient;
      //  type            inletOutlet;
      //  inletValue      uniform 0; //was 1
      //  value           uniform 0; //was 1
    }

    defaultFaces
    {
        type            empty;
    }
}
Attached Images
File Type: png patches.png (21.1 KB, 47 views)
File Type: png discret.png (146.4 KB, 44 views)
File Type: png interface.png (24.7 KB, 44 views)
adrianabm is offline   Reply With Quote

Old   September 7, 2015, 11:37
Default
  #2
New Member
 
a.b.mkarzel
Join Date: Jul 2015
Location: Switzerland
Posts: 8
Rep Power: 11
adrianabm is on a distinguished road
hello,
i'm happy to say that personally, the problem of the divergence was due to a slighlty non-smooth/unaligned circular edge linking the main part to the porous part. i'm currently simulating and the flow has managed to enter the porous zone, which demonstrates indeed a porous behaviour.

a.
adrianabm is offline   Reply With Quote

Reply

Tags
boundaries condition, cylindrical, multiphase, porousinterfoam, snappyhexmesh

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
rhoPorousSimpleFoam for modeling porous medium adiabatic flow zhzhguo OpenFOAM Programming & Development 0 August 17, 2014 23:34
How to model granular flow through porous media Axius FLUENT 2 August 7, 2014 11:34
Air flow through a porous medium Queiroz CFX 2 April 7, 2014 19:08
multiphase flow in porous media zhou FLUENT 2 August 9, 2012 08:10
Multiphase flow in porous media zhou FLUENT 0 May 10, 2005 18:45


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