CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] Flow in pipe with porous region - How to define cellzone?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2016, 12:11
Default Flow in pipe with porous region - How to define cellzone?
  #1
New Member
 
Join Date: May 2016
Posts: 4
Rep Power: 9
g7fernandes is on a distinguished road
I am new OpenFoam user I want to do something very simple:
There is a 2d pipe and in the middle there is a porous wall.
I used blockmesh with 3 blocks with equal sizes and the block in the middle should be the porous media.

How do I indicate to OpenFoam that there is a porous region?

I read about CellZone and Setset, but I can't find exactly what must I write and were

I'm using porousSimpleFoam and blockMesh.

If someone has the codes for such simulation to share, I and the Internet will be very thankfull to you and many people in the future will love you.

The "tutorials" that come with openFoam are very unclear.
g7fernandes is offline   Reply With Quote

Old   May 17, 2016, 20:52
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

Look at the topoSet utility: https://github.com/OpenFOAM/OpenFOAM...et/topoSetDict

You can define your cellZone using that. There are multiple options: boxToCell, cylinderToCell etc that you can use to get your cellZone.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   May 18, 2016, 08:22
Default
  #3
New Member
 
Join Date: May 2016
Posts: 4
Rep Power: 9
g7fernandes is on a distinguished road
Thank you for your reply!

I created the file topoSetDict and I put it in /system

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       dictionary;
    object      topoSetDict;
}


actions
(
    // Load initial cellSet
    {
        name    porosity;
        type    cellSet;
        action  new;
        source boxToCell;
        sourceInfo
        {
            box (20 0 0) (40 20 1);
        }
    }
);

With this mesh
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

vertices   // points in the flow space
(
    (0 0 0)  // 0
    (20 0 0)  // 1
    (20 20 0)  // 2
    (0 20 0)  // 3
    (0 0 1)  // 4
    (20 0 1)  // 5
    (20 20 1)  // 6
    (0 20 1)  // 7
    (40 0 0)  // 8 
    (40 20 0)  // 9 
    (40 0 1)  // 10
    (40 20 1)  // 11
    (60 0 0)  // 12 
    (60 20 0)  // 13 
    (60 0 1)  // 14
    (60 20 1)  // 15
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (30 30 1) 

// the order of the numbers in hex ( ) defines the vertices of the tetrahedron (region of flow)
// Important: The first two digits in hex ( ) defines x-direction, the first and the third 
//            defines the Y, and the first and the fifth defines the Z 

    simpleGrading (1 1 1)  //defines the grid 

    hex (1 8 9 2 5 10 11 6) (30 30 1)
    simpleGrading (1 1 1)  //defines the grid 

    hex (8 12 13 9 10 14 15 11) (30 30 1)
    simpleGrading (1 1 1)  //defines the grid 

);    

edges  // used in the case of drawing curves
(
);

boundary   // names the faces 
(
    inlet
    {
        type patch; 
        faces
        (
            (0 3 4 7)  //face determinated by this vertices is the inlet
        );
    }


    outlet
    {
        type patch;
        faces
        (
            (12 13 15 14)
        );
    }

    walls
    {
        type wall;
        faces
        (
            (0 1 5 4)
            (2 3 6 7)
            (8 12 14 10)
            (9 13 11 15)
        );
    }    

    porosityWall
    {
        type wall;
        faces
        (
            (1 8 5 10) //
            (2 9 6 11) //
        );
    }

    frontAndBack
    {
        type empty;
        faces
        (
            (0 3 2 1)
            (4 5 6 7)
            (5 10 11 6)
            (1 8 9 2)
            (8 12 13 9)
            (10 14 15 11)
        );
    }

);

mergePatchPairs
(
);

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

but I get this error when I run porousSimpleFoam

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.1-119cac7e8750
Exec   : porousSimpleFoam
Date   : May 18 2016
Time   : 14:12:17
Host   : "ubuntu-mate-1510"
PID    : 29189
Case   : /home/ofuser/OpenFOAM/ofuser-3.0.1/run/sq_porous
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


SIMPLE: no convergence criteria found. Calculations will run for 100 steps.

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
}

No MRF models present

Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: porosity


--> FOAM FATAL ERROR: 
cannot find porous cellZone porosity

    From function Foam::porosityModel::porosityModel(const Foam::word&, const Foam::word&, const Foam::fvMesh&, const Foam::dictionary&, const Foam::word&)
    in file cfdTools/general/porosityModel/porosityModel/porosityModel.C at line 121.

FOAM exiting
What I'm doing wrong?
g7fernandes is offline   Reply With Quote

Old   May 18, 2016, 08:56
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

At the moment it is still a cellSet, not a cellZone. You will need to do one more step in your topoSet to get that. Look for setToCellZone to do the conversion.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Reply

Tags
cellzones, pipe flow, porosity;niyama, porous interface

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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 06:40
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[Commercial meshers] Using starToFoam clo OpenFOAM Meshing & Mesh Conversion 33 September 26, 2012 04:04
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 14:28.