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

splitMeshRegions doesn't find my regions.

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 13, 2013, 10:06
Default splitMeshRegions doesn't find my regions.
  #1
New Member
 
Join Date: Apr 2013
Posts: 24
Rep Power: 4
GPesch is on a distinguished road
Hi,

I am trying to set up a very simple multi region case to test a solver I am working on.
The problem is that when I run "splitMeshRegions -cellZones -overwrite" I will always get the output

"Only one region. Doing nothing".

I defined a cubic block with blockMesh, which worked fine. Here's the blockMeshDict:

Code:
convertToMeters 1;

vertices
(
    (0 0 0)
    (1 0 0)
    (1 1 0)
    (0 1 0)
    (0 0 1)
    (1 0 1)
    (1 1 1)
    (0 1 1)
);

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

edges
(
);

boundary
(
    maxY
    {
        type wall;
        faces
        (
            (3 7 6 2)
        );
    }
    minX
    {
        type patch;
        faces
        (
            (0 4 7 3)
        );
    }
    maxX
    {
        type patch;
        faces
        (
            (2 6 5 1)
        );
    }
    minY
    {
        type wall;
        faces
        (
            (1 5 4 0)
        );
    }
    minZ
    {
        type wall;
        faces
        (
            (0 3 2 1)
        );
    }
    maxZ
    {
        type wall;
        faces
        (
            (4 5 6 7)
        );
    }
);

mergePatchPairs
(
);
after running "blockMesh" I ran "topoSet" with the following topoSetDict:

Code:
actions
(
    // Left
    {
        name    left;
        type    cellSet;
        action    new;
        source    boxToCell;
        sourceInfo
        {
            box (0 0 0) (0.5 1 1)
        }
    }
    {
        name    left;
        type    cellZoneSet;
        action    new;
        source    setToCellZone;
        sourceInfo
        {
            set left;
        }
    }


    // Right
    {
        name    right;
        type    cellSet;
        action    new;
        source    boxToCell;
        sourceInfo
        {
            box (0.5 0 0) (1 1 1)
        }
    }
    {
        name    right;
        type    cellZoneSet;
        action    new;
        source    setToCellZone;
        sourceInfo
        {
            set right;
        }
    }
);
So actually I just want to divide it into two parts, "left" and "right". The border should be in the middle of the volume at "x = 0.5".
After doing so I get the two files "polyMesh/sets/left" and "right". Both containing 500 different numbers, I'm assuming that are the cellIds. Okay, so far so good.
But when I run "splitMeshRegions -cellZones -overwrite" I will receive the following output:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Creating single patch per inter-region interface.

Trying to match regions to existing cell zones.


Number of regions:1

Writing region per cell file (for manual decomposition) to "/home/gp/OpenFOAM/gp-2.1.1/run/multiRegionElectrostatics/constant/cellToRegion"

Writing region per cell as volScalarField to "/home/gp/OpenFOAM/gp-2.1.1/run/multiRegionElectrostatics/0/cellToRegion"

Region    Cells
------    -----
0    1000

Region    Zone    Name
------    ----    ----
0    -1    domain0

Sizes of interfaces between regions:

Interface    Region    Region    Faces
---------    ------    ------    -----

Reading volScalarField phi
Reading volScalarField cellToRegion

Only one region. Doing nothing.
End
I am wondering—am I missing something? Is there a simple explanation why splitMeshRegions doesn't detect the two specified regions?
I am running on OF 2.1.1. if that matters.

Thank you so much for the time to read this thread and for your answer in advance.

Best regards
Georg
GPesch is offline   Reply With Quote

Old   November 13, 2013, 16:39
Default
  #2
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 5
zhengzh5 is on a distinguished road
hey, not sure if that's causing trouble but your definition of right zone should be
sourceInfo
{
box (0.5 1 1) (1 1 1)
}

and not
sourceInfo
{
box (0.5 0 0) (1 1 1)
}?

Quote:
Originally Posted by GPesch View Post
Hi,

I am trying to set up a very simple multi region case to test a solver I am working on.
The problem is that when I run "splitMeshRegions -cellZones -overwrite" I will always get the output

"Only one region. Doing nothing".

I defined a cubic block with blockMesh, which worked fine. Here's the blockMeshDict:

Code:
convertToMeters 1;

vertices
(
    (0 0 0)
    (1 0 0)
    (1 1 0)
    (0 1 0)
    (0 0 1)
    (1 0 1)
    (1 1 1)
    (0 1 1)
);

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

edges
(
);

boundary
(
    maxY
    {
        type wall;
        faces
        (
            (3 7 6 2)
        );
    }
    minX
    {
        type patch;
        faces
        (
            (0 4 7 3)
        );
    }
    maxX
    {
        type patch;
        faces
        (
            (2 6 5 1)
        );
    }
    minY
    {
        type wall;
        faces
        (
            (1 5 4 0)
        );
    }
    minZ
    {
        type wall;
        faces
        (
            (0 3 2 1)
        );
    }
    maxZ
    {
        type wall;
        faces
        (
            (4 5 6 7)
        );
    }
);

mergePatchPairs
(
);
after running "blockMesh" I ran "topoSet" with the following topoSetDict:

Code:
actions
(
    // Left
    {
        name    left;
        type    cellSet;
        action    new;
        source    boxToCell;
        sourceInfo
        {
            box (0 0 0) (0.5 1 1)
        }
    }
    {
        name    left;
        type    cellZoneSet;
        action    new;
        source    setToCellZone;
        sourceInfo
        {
            set left;
        }
    }


    // Right
    {
        name    right;
        type    cellSet;
        action    new;
        source    boxToCell;
        sourceInfo
        {
            box (0.5 0 0) (1 1 1)
        }
    }
    {
        name    right;
        type    cellZoneSet;
        action    new;
        source    setToCellZone;
        sourceInfo
        {
            set right;
        }
    }
);
So actually I just want to divide it into two parts, "left" and "right". The border should be in the middle of the volume at "x = 0.5".
After doing so I get the two files "polyMesh/sets/left" and "right". Both containing 500 different numbers, I'm assuming that are the cellIds. Okay, so far so good.
But when I run "splitMeshRegions -cellZones -overwrite" I will receive the following output:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Creating single patch per inter-region interface.

Trying to match regions to existing cell zones.


Number of regions:1

Writing region per cell file (for manual decomposition) to "/home/gp/OpenFOAM/gp-2.1.1/run/multiRegionElectrostatics/constant/cellToRegion"

Writing region per cell as volScalarField to "/home/gp/OpenFOAM/gp-2.1.1/run/multiRegionElectrostatics/0/cellToRegion"

Region    Cells
------    -----
0    1000

Region    Zone    Name
------    ----    ----
0    -1    domain0

Sizes of interfaces between regions:

Interface    Region    Region    Faces
---------    ------    ------    -----

Reading volScalarField phi
Reading volScalarField cellToRegion

Only one region. Doing nothing.
End
I am wondering—am I missing something? Is there a simple explanation why splitMeshRegions doesn't detect the two specified regions?
I am running on OF 2.1.1. if that matters.

Thank you so much for the time to read this thread and for your answer in advance.

Best regards
Georg
zhengzh5 is offline   Reply With Quote

Old   November 14, 2013, 06:20
Default
  #3
New Member
 
Join Date: Apr 2013
Posts: 24
Rep Power: 4
GPesch is on a distinguished road
Quote:
Originally Posted by zhengzh5 View Post
hey, not sure if that's causing trouble but your definition of right zone should be
sourceInfo
{
box (0.5 1 1) (1 1 1)
}

and not
sourceInfo
{
box (0.5 0 0) (1 1 1)
}?
Are you sure? box(0.5 1 1) (1 1 1) is defining a flat area, not a box—or am I mistaking?
GPesch is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple regions Tobi OpenFOAM Native Meshers: snappyHexMesh and Others 47 September 9, 2014 09:36
Paraview 3.98.0 does not update list of mesh regions letzel OpenFOAM Paraview & paraFoam 4 January 31, 2013 06:32
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 13:38
Problem Building OF on Centos cluster (no admin rights) CKH OpenFOAM Installation 5 November 13, 2011 07:32
refinement causes composite regions, how to solve? Harry CFX 4 December 8, 2004 06:13


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