|
[Sponsors] |
November 13, 2020, 07:08 |
Help with topoSet
|
#1 |
New Member
Join Date: Nov 2020
Posts: 14
Rep Power: 6 |
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 ( ); 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); } } ); 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? |
|
November 13, 2020, 08:21 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 746
Rep Power: 14 |
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) Code:
box (100 100 21) (0 0 11) Code:
box (0 0 11)(100 100 21) |
|
November 13, 2020, 08:25 |
|
#3 |
New Member
Join Date: Nov 2020
Posts: 14
Rep Power: 6 |
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. |
|
November 13, 2020, 10:16 |
|
#4 |
Senior Member
Join Date: Oct 2015
Location: Germany
Posts: 100
Rep Power: 11 |
Hi, I think a checkMesh output might give a hint on a possibly less obvious problem.
|
|
November 13, 2020, 19:02 |
|
#5 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
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) 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) ; } } ); |
|
Tags |
cellset, openfoam, toposet |
|
|
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 |