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

Help with topoSet

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Tobermory
  • 1 Post By Bloerb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2020, 07:08
Default Help with topoSet
  #1
New Member
 
Join Date: Nov 2020
Posts: 14
Rep Power: 6
Enternald is on a distinguished road
Hi all,


I am running into an issue using topoSet. I have created my blockMeshDict:
Code:
convertToMeters 1;

// This is a list of all the verticed in our geometry of interest.
vertices
(
//   x       y       z
    (0       0       0)           //0
    (100     0       0)          //1
    (100     100     0)          //2
    (0       100     0)          //3
    (0       0       10)         //4
    (100     0       10)         //5
    (100     100     10)         //6
    (0       100     10)         //7
    (0       0       10)         //8
    (100     0       10)         //9
    (100     100     10)         //10
    (0       100     10)         //11
    (0       0       11)         //12
    (100     0       11)         //13
    (100     100     11)         //14
    (0       100     11)         //15
    (0       0       11)         //16
    (100     0       11)         //17
    (100     100     11)         //18
    (0       100     11)         //19
    (0       0       21)         //20
    (100     0       21)         //21
    (100     100     21)         //22
    (0       100     21)         //23
);

// These are all the 'blocks' in our geometry, for this iteration there are three.
blocks
(
    hex ( 0  1  2  3  4  5  6  7)       vacuum     ( 10  10  50 )    simpleGrading (1 1 1)
    hex ( 8  9  10 11 12 13 14 15)      membrane   ( 50  50  100 )   simpleGrading (1 1 1)
    hex ( 16 17 18 19 20 21 22 23)      oxygen     ( 10  10  50 )    simpleGrading (1 1 1)

);

// Edges is a blank dictionary as they are unnecessary if this iteration.
edges
(
);

// Boundaries is where we define our boundary patches.
boundary
(
    outlet
    {
        type patch;
        faces
        (
            (0 1 5 4)
            (2 6 5 1)
            (2 3 7 6)
            (0 4 7 3)
            (0 3 2 1)
        );
    }
    membraneOut
    {
        type patch;
        faces
        (
            (8 11 10 9)
        );
    }
    membraneWalls
    {
        type patch;
        faces
        (
            (9 13 12 8)
            (9 10 14 13)
            (10 11 15 14)
            (8 12 15 11)
        );
    }
    membraneIn
    {
        type patch;
        faces
        (
            (12 15 14 13)
        );
    }
    inlet
    {
        type patch;
        faces
        (
           (20 21 22 23)
           (18 22 21 17)
           (17 21 20 16)
           (20 23 19 16)
           (18 19 23 22)
        );
    }
 
);

mergePatchPairs
(
);
Then I created a topoSet Dictionary:


Code:
actions
(
// The first entry here is to select the relevant cells in our oxygen region.
     {
        name    oxygenCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (100 100 21) (0 0 11);
        }
    }
// The second entry here is to select the relevant cells in our membrane region.
     {
        name    membraneCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (100 100 11) (0 0 10);
        }
     }
// The third entry here is to select the relevant cells in our vacuum region.
    {
       name    vacuumCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (100 100 10) (0 0 0);
        }
    }
);
My problem is that when I run topoSet I receive the following:


Create time

Create polyMesh for time = 0

Reading topoSetDict

Time = 0
mesh not changed.
Created faceSet oxygenCellSet
Applying source boxToCell
Adding cells with center within boxes 1((100 100 21) (0 0 11))
faceSet oxygenCellSet now size 0
Created cellSet membraneCellSet
Applying source boxToCell
Adding cells with center within boxes 1((100 100 11) (0 0 10))
cellSet membraneCellSet now size 0
Created cellSet vacuumCellSet
Applying source boxToCell
Adding cells with center within boxes 1((100 100 10) (0 0 0))
cellSet vacuumCellSet now size 0
End


Can someone help me understand why my CellSet sizes are 0?
Enternald is offline   Reply With Quote

Old   November 13, 2020, 08:21
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 746
Rep Power: 14
Tobermory will become famous soon enough
Have you tried adjusting the coords, so that the first set of coords in the boxToCell are the min values, and the second the max values? As far as I recall, the syntax is
Code:
boxToCell (MINX MINY MINZ) (MAXX MAXY MAXZ)
In other words change
Code:
box (100 100 21) (0 0 11)
to
Code:
box (0 0 11)(100 100 21)
jadidi.cfd likes this.
Tobermory is offline   Reply With Quote

Old   November 13, 2020, 08:25
Default
  #3
New Member
 
Join Date: Nov 2020
Posts: 14
Rep Power: 6
Enternald is on a distinguished road
Thank you for the suggestion, however, it still states that the size is zero! I updated some of the boundary types, I turned the wall boundarys to wall, however, that also did not change anything.

One thing I am noticing though is when I open the geometry in paraFoam I see the following under oxygen - cellZone. Isn't this what I am looking for (its just weird that it is stating no cells are selected but it still appears in paraFoam). I have attached an image of what I see in paraFoam when only allowing the oxygen - cellZone to be viewed.
Attached Images
File Type: png 1.PNG (166.0 KB, 43 views)
Enternald is offline   Reply With Quote

Old   November 13, 2020, 10:16
Default
  #4
Senior Member
 
NablaDyn's Avatar
 
Join Date: Oct 2015
Location: Germany
Posts: 100
Rep Power: 11
NablaDyn is on a distinguished road
Hi, I think a checkMesh output might give a hint on a possibly less obvious problem.
NablaDyn is offline   Reply With Quote

Old   November 13, 2020, 19:02
Default
  #5
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
OpenFOAM has cellSets and cellZones. They are the same, but cellSets are not used during the solver run, cellZones however are. Your blockMesh already creates cellZones for each block you have named:

Code:
hex ( 0  1  2  3  4  5  6  7) vacuum  (10  10  50) simpleGrading (1 1 1)
hex ( 8  9  10 11 12 13 14 15) membrane ( 50  50  100) simpleGrading (1 1 1)
hex ( 16 17 18 19 20 21 22 23) oxygen (10  10  50) simpleGrading (1 1 1)
If you want to convert these to cellSets I'd recommend not using boxToCell but rather zoneToCell. This would directly convert your current cellZone to a cellSet. I am however fairly certain that you already have everything you need, or why do you need a cellSet? And as already suggested you need to keep the ordering from minX minY minZ to maxX maxY maxZ for boxToCell.


As already mentioned however the following works as tested by me:
Code:
actions
(
// The first entry here is to select the relevant cells in our oxygen region.
     {
        name    oxygenCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (0 0 11) (100 100 21) ;
        }
    }
// The second entry here is to select the relevant cells in our membrane region.
     {
        name    membraneCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (0 0 10) (100 100 11) ;
        }
     }
// The third entry here is to select the relevant cells in our vacuum region.
    {
       name    vacuumCellSet;
        type    cellSet;
        action  new;
        source  boxToCell;
        sourceInfo
        {
            box (0 0 0) (100 100 10) ;
        }
    }
);
jadidi.cfd likes this.
Bloerb is offline   Reply With Quote

Reply

Tags
cellset, openfoam, toposet


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
[Other] Error: topoSet – create patch from .stl – searchableSurfaceToFaceZone carl_r OpenFOAM Meshing & Mesh Conversion 1 November 18, 2022 18:06
fail to run series of runApplication topoSet -dict jiahui_93 OpenFOAM Programming & Development 1 May 25, 2022 13:56
[snappyHexMesh] Problem using refineMesh, topoSet and snappyHexMesh Rasmusiwersen OpenFOAM Meshing & Mesh Conversion 0 October 3, 2019 05:33
[snappyHexMesh] TopoSet does not select all faces Mondal131211 OpenFOAM Meshing & Mesh Conversion 3 July 24, 2019 10:39
[snappyHexMesh] Porous Media using TopoSet RobertoCirolini OpenFOAM Meshing & Mesh Conversion 3 August 30, 2016 09:34


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