CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   porous simulation (http://www.cfd-online.com/Forums/openfoam-pre-processing/121562-porous-simulation.html)

yurifrey July 31, 2013 11:08

porous simulation
 
Hi everyone!

I spent a few days trying to understand how to set up with OF a case which is unsteady, incompressible and laminar flow with a porous medium, but I still have some troubles. :(

First of all I don't know what solver should I use:
- icoFoam? (from the user guide it seems unable to treat porosity)
- porousSimpleFoam? (it is possible to set laminar? if I put Euler in ddtSchemes does it solve unsteady?)

Second, I made my mesh in Gambit dividing the domain into 2 zones, but when I transform the mesh to OF I don't know how to specify that one of them is a porous medium and to set a Darcy law (in "cellZone" I only have
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      regIOobject;
    location    "constant/polyMesh";
    object      cellZones;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

0
()

// ************************************************************************* //

).

I am very confused and any help would be very appreciated.. :)

Thank you very much!

Yuri

Lieven July 31, 2013 13:41

Hi Yuri,

If you are working with OF 2.2.x Have a look at the pimpleFoam solver in combination with the fvOptions. That should make it possible to combine porosity with transient simulations. You should not do transient simulations with the simple algorithm. The algorithm requires under-relaxation and this is in conflict with proper time integration.

If you have an older version of OF, I'm afraid you will be forced to write your own solver (of course you can do some copy-pasting from this existing ones).

The fact that you have laminar flow is easily accounted for by setting the turbulenceModel to 'laminar'.

Cheers,

L

yurifrey August 1, 2013 05:54

Hi Lieven,

thank you very much for your answer. I am using OpenFOAM 2.2.1 so I will try to follow your advice.

But I still have the problem of separating cell zones. In Gambit I have two different zones but when I convert the mesh I lose this information. Do you have any idea of what should I do? Is OF supposed to recognize the zones or should I modify something in cellZones?

Thank you again!
Yuri

Lieven August 1, 2013 06:19

Hi Yuri,

I have no experience in working with Gambit in combination with OpenFOAM so I can't really help you with that. I would not start messing around in cellZones (I think you will get lost in its complexity). Maybe Gambit has other options available for identifying cells (cause that's in fact what you are doing) besides defining a 'zone' which are recognized by OF.

Good luck!

Lieven

yurifrey August 2, 2013 08:31

Thank you anyway Lieven, you've been very helpful. :) I'm going to try asking in a specific thread in the meshing section.

Yuri

yurifrey August 4, 2013 18:02

Hi Lieven!

I solved the meshing problem but I still need a little help for the fvOptions part.. :) These are the first lines of my cellZones file:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      regIOobject;
    location    "constant/polyMesh";
    object      cellZones;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

2
(
zone2
{
    type cellZone;
cellLabels      List<label>
500
(
0
1

I want to set a porous region in zone2, so I create a file named fvOptions into the system folder with

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      fvOptions;
}

porosity
{
    type          explicitPorositySource;
    active        yes;
    selectionMode cellZone;
    cellZone      zone2;

    explicitPorositySourceCoeffs
    {
        type DarcyForchheimer;

        DarcyForchheimerCoeffs
        {
              d    d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
              f    f [0 -1 0 0 0 0 0] (0 0 0);

              coordinateSystem
              {
                  e1    (1 0 0);
                  e2    (0 1 0);
              }
        }
    }
}

but it doesn't work.. :( I tried to change the coefficients, but everything remains the same, so I think OpenFOAM doesn't read the fvOptions file at all. I don't understand why..

Thank you again for your help,
Yuri

Lieven August 4, 2013 18:19

Hi Yuri,


I'm sorry to say that I can't help you with this. I'm still using version 2.1.x which doesn't use the fvOptions thing. So I hope someone else can assist you in setting this up properly.

Cheers,

L

yurifrey August 5, 2013 04:40

Thank you Lieven, I will try again in a specific thread.

Yuri


All times are GMT -4. The time now is 20:42.