CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Construct cellZone based on a cellLabelList (https://www.cfd-online.com/Forums/openfoam-programming-development/189514-construct-cellzone-based-celllabellist.html)

Tobi June 21, 2017 10:53

Construct cellZone based on a cellLabelList
 
Hi everybody,

I am trying to build a cellZone which has no physical meaning but I want to check it out in paraview. The cellZone I am trying to create has arbitrary (random) cells. E.g. by using the bounding box of the geometry and the Random object class, I make arbitrary positions which I then use to check if there is a cell at that position (mesh.findCell()). After that I have the cellLabels in a labelList which I want to transform to a cellZone now in order to visualize the cells that are selected.

Right now, I cannot find anything in Doxygen but I will go to setSets in order to see how it is done there. However, maybe someone is faster and know it already :)

Tobi June 21, 2017 12:30

Hi all,

problem solved and it was easy as always (there might be a better way)

  • label list of cells are used to construct a cellSet
  • cellSet is used to write the cellSet
  • topoSet is used to change the cellSet into a cellZone
That is fine for me :)


All times are GMT -4. The time now is 08:19.