CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] Set internal face as boundary with blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mike.franky

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2016, 18:58
Default Set internal face as boundary with blockMesh
  #1
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
Hi,

I am trying to create a very simple mesh of a box with an inlet located on its bottom face. In addition to the 8 vertices forming my box, is it possible to create 4 more vertices which lie on the bottom plane and and use them to define an inlet? (or even just select a number of faces from the bottom face to represent the boundary!!)

If not, is my only other option to split the box into 5 blocks etc.? That sounds way too complicated for what I need.

Thanks in advance for your help

Cheers
Mike
mike.franky is offline   Reply With Quote

Old   March 16, 2016, 22:03
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

You will probably need to define a faceSet with topoSet and then use the faceSet to create a patch using createPatchDict.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   March 17, 2016, 07:55
Default
  #3
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
Hi Antimony,

This was exactly what I was looking for. Thank you so much.
mike.franky is offline   Reply With Quote

Old   March 24, 2016, 05:05
Question
  #4
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
Hi Antimony and all foamers,

I've seen that you're told to make a toposetDict to extract some faces. But I'm a bit lost with these tools, and I didn't find many documents on it.

I would like to select only few face of my mesh which are define on one of my walls (in order to define them as an inlet boundary). So how to select only few faces of a path ?

I've been thinking of doing this :

In a first time, the tool patchToFace will allow me to select all my wall faces.

Then, in a second time, I'll have to select only the faces that are interesting me by naming them one by one using the tool labelToFaces.

So here is my questions:

FIRST : Is it possible to do it ? I mean, doing a first selection of faces, then doing a second selection, more precise, among the first selection.

SECOND : IF IT'S POSSIBLE. How to know the numbering of the faces in order to select them in the second time ?

FIRD : IF it's not possible or if it's not the best way to do it, how would you do it ?

I hope I've been clear.
Any clue would be welcome
Thanks
adrieno is offline   Reply With Quote

Old   March 24, 2016, 05:21
Default
  #5
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

A1. Yes, you can do that. In the "action" type choose "subset"

A2. Unfortunately, I am not aware of how the faces are numbered. But isn't there an easier criteria for you to use instead of labels? Maybe they all lie in a box? Or a cylinder? Whose coordinates you can define?

A3. Basically combine A1 and A2 and look through the example topoSetDict available (https://github.com/OpenFOAM/OpenFOAM...et/topoSetDict)
It has always been my go to source when I want to know what I can and can't do with topoSet and has been extremely useful for me.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   March 24, 2016, 05:45
Default
  #6
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
Thank you Antimony,

I didn't know the website you've told me. That would be very helpful ! Especially for topoSet were I didn't find much documents on it.

Unfortunately my wall is a bit complicated curved surface (three sides in straight line but a fourth side curved). So I only know the four corners position of my wall... As a result, I can't specify any coordinates to select faces.
adrieno is offline   Reply With Quote

Old   March 24, 2016, 06:04
Default
  #7
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
Hi adrieno,

If the faces you want to select are not on the same plane, topoSet allows you to define a volume and select all the cells/faces whose centres are within that volume. Have a look at

http://nerdalytics.blogspot.co.uk/20...-circular.html

Here the first action (jetCells) gathers all the cells within the specified cylinder. The next action (f0) selects all the faces of the previously gathered cells. And the last action (f0 again) chooses the subset of faces which are in the specified volume.

I hope this helps.
adrieno likes this.
mike.franky is offline   Reply With Quote

Old   March 25, 2016, 05:12
Post
  #8
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
Hi,

A special thanks to you two mike.franky and Antimony.
Yesterday with your advices I've been able to make my new boundary.

For anyone who would have one day the same questions than me:
  • Here is a link that also helped me: http://www.cfd-online.com/Forums/ope...reate-new.html
  • My topoSetDict with comments and my createPatchDict as an example (be careful I haven't been running it for the moment, so I'm not sure that it's working but the outline should be good).
Attached Files
File Type: txt topoSetDict.txt (2.3 KB, 103 views)
File Type: txt createPatchDict.txt (1.2 KB, 69 views)
adrieno is offline   Reply With Quote

Old   March 29, 2016, 09:23
Unhappy so close but so far
  #9
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
Hi again all foamers,

I've been trying to run your method in order to make an inlet from my wall, but as a result I've got a problem with a "ghost boundary".

I explain myself:

  • I've defined a wall (named "wallWithOpening") patch in my blockMeshDict,
  • I've defined two other patches (thanks to a topoSetDict and a createPatchDict) from wallWithOpening :
  1. an "opening" (my new inlet)
  2. a "wallWithoutOpening" (same wall as before without the opening)


Here is my problem, when I run icofoam I get this message :


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR:
Cannot find patchField entry for wallWithOpening



Why is "wallWithOpening" boundary still existing while it's the "old" patch ?

Moreover, I don't understand because when I run my createPatchDict I get on my terminal:


Removing zero-sized patch wallWithOpening type wall at position 1
Removing patches.
Writing repatched mesh to 5e-05




which tell me that all went fine, this old patch has been delated because it was empty (as I understand).


Maybe this is due to the way I'm doing all of this ?
FIRST: I run blockMesh
SECOND: I run topoSet (my topoSetDict is in my "system" folder)
FIRD : I run createPatch (my topoSetDict is in my "system" folder)
FOURTH : I run icoFoam.


Should I change manually something in my file "Boundary" or something else ?
(Because nothing changes in my Boundary file (in constant) after runing topoSet and createPatch)
adrieno is offline   Reply With Quote

Old   March 29, 2016, 09:38
Default
  #10
Member
 
Michael Frank
Join Date: Aug 2012
Posts: 55
Rep Power: 13
mike.franky is on a distinguished road
Hi adrieno,

When using createPatch, use the -overwrite switch with it:
createPatch -overwrite

Hope this helps
mike.franky is offline   Reply With Quote

Old   March 29, 2016, 09:45
Thumbs up
  #11
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
Yes cool that's it !
Thank you very much !
So happy
adrieno is offline   Reply With Quote

Old   June 26, 2019, 16:06
Default Create internal faces as walls
  #12
New Member
 
Paras
Join Date: Jun 2019
Posts: 3
Rep Power: 6
CFD_Paras is on a distinguished road
Hello All,
I have been trying a lot in creating internal walls which are inclined at some angle but didn't succeed. I have been successful in generating vertical faces as walls by creating a faceSet in topoSetDict using boxToFace and then running createBaffles.
I know I cannot use boxToFace for inclined walls. So is there a way to create a face inside my mesh domain? It's a simple 2D mesh. I think pointToFace should work but I am not sure what point means here. When tried it asks for pointSet. How do I define it. I know the coordinates through which the face passes.
CFD_Paras is offline   Reply With Quote

Reply


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
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
How to make only some parameters pass trough internal face converted into a boundary mizo OpenFOAM Running, Solving & CFD 4 April 30, 2017 12:15
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
[blockMesh] blockMesh how to set internal face ? seav OpenFOAM Meshing & Mesh Conversion 2 May 8, 2014 16:10
Create an internal face aylalisa OpenFOAM Pre-Processing 1 June 19, 2013 12:02


All times are GMT -4. The time now is 15:56.