|
[Sponsors] |
topoSet select cells by layers in a structured grid |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 11, 2020, 14:38 |
topoSet select cells by layers in a structured grid
|
#1 |
New Member
Join Date: Jun 2019
Posts: 15
Rep Power: 7 |
Hello,
I have a structured mesh around an object as shown in the first attached image. Is there a way in topoSet or setSet utilities to select cells by number of layers from a wall. (e.g: in the figure below, select the third layer from the wall shown in green: see attached image). Thanks |
|
May 12, 2020, 16:46 |
|
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20 |
I think there is no direct way. But you could try selecting first the faces belonging to the patch. Then grow this set three times. Do same for a second set, but grow only two times. Finally subtract second from first. Not tested but should work.
|
|
May 12, 2020, 17:57 |
|
#3 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
- I think there is one topoSet can do this: haloToCell, which selects a specified number of layers, i.e. the entry of "steps". - You need two subsequent haloToCell with "steps=2", and "steps=1", respectively. The first haloToCell (steps=2) will select the first two layers, and based on this haloToCell, another haloToCell (steps=1), the third layer only will be selected. Hope this helps. PS: Just out of curiosity, why do you wanna select the third layer only?
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 13, 2020, 18:35 |
|
#4 |
New Member
Join Date: Jun 2019
Posts: 15
Rep Power: 7 |
Could you please give me an example on how to use that?
I need to select the third layer because if that is possible I can create faceZones easily by the same approach (to create baffles, etc.). |
|
May 13, 2020, 18:37 |
|
#5 |
New Member
Join Date: Jun 2019
Posts: 15
Rep Power: 7 |
How to grow a set three time?
|
|
May 14, 2020, 10:57 |
|
#6 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20 |
Good question. This should do the trick:
Code:
actions ( // face set from patch { name f0; type faceSet; source patchToFace; action new; sourceInfo { name patchName; action new; } } // first layer cells { name c0; type cellSet; action new; source faceToCell; sourceInfo { set f0; option any; } } { name f0; type faceSet; source cellToFace; action new; sourceInfo { set c0; option all; } } // first and second layer cells { name c0; type cellSet; action new; source faceToCell; sourceInfo { set f0; option any; } } ); |
|
May 15, 2020, 18:06 |
|
#7 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
For `haloToCell` set, the following might be used as a guideline (haven't tested it): Code:
actions ( // first layer { name c1; type cellSet; source patchToCell; action new; sourceInfo { name <patchName>; } } // second layer { name c2; type cellSet; source haloToCell; action new; steps 1; sourceInfo { set c1; } } // third layer { name c3; type cellSet; source haloToCell; action new; steps 1; sourceInfo { set c2; } } ); Hope this helps.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Structured grid without blocking in ICEM | BahaZero | ANSYS Meshing & Geometry | 19 | March 5, 2013 12:36 |
[ICEM] error analysis | despaired student | ANSYS Meshing & Geometry | 7 | June 27, 2012 12:57 |
killed "snappyHexMesh" | parkh32 | OpenFOAM Pre-Processing | 2 | April 8, 2012 18:12 |
[snappyHexMesh] snappyHexMesh aborting | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 10, 2010 04:23 |
structured grid and/or increase convergence rate | Ashish Pande | FLUENT | 0 | May 12, 2006 04:36 |