CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Collecting faces with setSet (http://www.cfd-online.com/Forums/openfoam-pre-processing/94423-collecting-faces-setset.html)

AlmostSurelyRob November 15, 2011 09:30

Collecting faces with setSet
 
Dear All,

I am trying to create some baffles in my mesh. I've seen the tutorials and I believe I have a fairly good idea how to do it. The problem is that I can't find the way to create the faceSetZone. Most of the tutorials just use boxToFaces which will not work in my.

My baffle is supposed to lie on the faces that are aligned with 4 vertices in blockMeshDict. Is there any way to identify the points or the faces that are located on a boundary of a block in blockMeshDict after blockMesh has been run?

I've realised now that I could rotate my mesh and then use boxToFaces to collect the right faces and then rotate back... but is there any easier way?

I would be grateful for any hints or comments.

Robert

gschaider November 15, 2011 19:10

Quote:

Originally Posted by AlmostSurelyRob (Post 332197)
Dear All,

I am trying to create some baffles in my mesh. I've seen the tutorials and I believe I have a fairly good idea how to do it. The problem is that I can't find the way to create the faceSetZone. Most of the tutorials just use boxToFaces which will not work in my.

My baffle is supposed to lie on the faces that are aligned with 4 vertices in blockMeshDict. Is there any way to identify the points or the faces that are located on a boundary of a block in blockMeshDict after blockMesh has been run?

I've realised now that I could rotate my mesh and then use boxToFaces to collect the right faces and then rotate back... but is there any easier way?

I would be grateful for any hints or comments.

Robert

Not directly. But you can identify the blocks and then use setSet to create the set of faces that belongs to two blocks (you'll have to play around a bit here)

To identify cells you can insert a name (for instance "block1" into the blocks-definitions in blockMeshDict):
Code:

    hex (0 1 2 3 4 5 6 7) block1 (60 20 1) simpleGrading (1 1 1)
blockMesh will then generate a cellZone block1 with all the cells in that block

AlmostSurelyRob November 15, 2011 19:29

That's brilliant! This is exactly what I wanted and it will work nicely in my case.

By the way of block identification can I do something similar within blockMeshDict for vertices? I posted this question in this post:
http://www.cfd-online.com/Forums/ope...kmeshdict.html

But generally this solves the problem. I admit though that I did the the trick with rotation meanwhile and it worked as well, but I'll update it to include this identification method.

Thanks!

AlmostSurelyRob November 18, 2011 10:47

If anybody was looking for a solution to a similar problem. The right set of commands that extract the faces from neighbouring block cells is

Code:

faceSet baffleFaces new cellToFace B4 all
faceSet baffleFaces subset cellToFace B1 all
faceZoneSet baffleFaces new setToFaceZone baffleFaces



All times are GMT -4. The time now is 05:50.