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

How to create a subpatch from a patch

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 9, 2015, 13:36
Default How to create a subpatch from a patch
  #1
New Member
 
Marcel Vonlanthen
Join Date: Nov 2012
Location: Zurich, Switzerland
Posts: 28
Rep Power: 6
Sylv is on a distinguished road
Dear Foamer,

I have the mesh of a hilly terrain (very similar to the tutorial of moveDynamicMesh). The mesh is composed by the following boundaries:
  • north
  • south
  • east
  • west
  • top
  • ground
I want to extract from "ground" a sub-patch named "hill". To do this, I am thinking about using createPatch, but I need a faceSet with ONLY patch faces, and this is very problematic. My strategy was to use toposet like this:

  • create a cellSet with boxToCell. The box enclosed the faces that will be part of "hill" (easy)
  • create a faceSet with cellToFace (easy)
From this faceSet, I have to remove the internal faces. How can I do that?

Or is there a better option?

Cheers,
Marcel
Sylv is offline   Reply With Quote

Old   July 10, 2015, 16:59
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,669
Rep Power: 27
alexeym will become famous soon enoughalexeym will become famous soon enough
Send a message via Skype™ to alexeym
Hi,

You can use subset action in topoSetDict, it would be something like:

Code:
    {
        name hill;
        type faceSet;
        action subset;
        source patchToFace;
        sourceInfo
        {
            name "ground";
        }
    }
Where hill is the name of faceSet you have created with cellToFace.
alexeym is offline   Reply With Quote

Old   November 7, 2015, 16:23
Default
  #3
Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 98
Rep Power: 6
himanshu28 is on a distinguished road
Quote:
Originally Posted by Sylv View Post
Dear Foamer,

I have the mesh of a hilly terrain (very similar to the tutorial of moveDynamicMesh). The mesh is composed by the following boundaries:
  • north
  • south
  • east
  • west
  • top
  • ground
I want to extract from "ground" a sub-patch named "hill". To do this, I am thinking about using createPatch, but I need a faceSet with ONLY patch faces, and this is very problematic. My strategy was to use toposet like this:

  • create a cellSet with boxToCell. The box enclosed the faces that will be part of "hill" (easy)
  • create a faceSet with cellToFace (easy)
From this faceSet, I have to remove the internal faces. How can I do that?

Or is there a better option?

Cheers,
Marcel
Hi Marcel & Alexey,

I am also trying to achieve similar thing as Marcel showed in the post, for my problem I have following patches:
1) Top wall 2) Left wall

I want to extract only few faces on Top Wall and left wall and build the faceset
(faces of Interest)
|-------|----------------------|------- |
|
|_
|
| (Faces of Interest)
|
|_
|

I am trying the approach as Alexey told but how should I make sure that the "subset" is the set of my interest I will be thankful to both if you can give some detail about the approach .

Thank you

Regards
himanshu28 is offline   Reply With Quote

Old   November 7, 2015, 17:44
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,669
Rep Power: 27
alexeym will become famous soon enoughalexeym will become famous soon enough
Send a message via Skype™ to alexeym
Hi,

Maybe I am missing something but...

1. Select cells near top wall. You know location of the top wall, you know size of the cells there, so it should not be a problem. Create faceSet with cellToFace action. Then subSet these faces with patchToFace.

2. Repeat the same with "Left wall".

3. Then you use createPatch utility (maybe you will need to merge faceSets before creating patch, it is done with add action).
alexeym is offline   Reply With Quote

Old   November 7, 2015, 19:18
Default
  #5
Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 98
Rep Power: 6
himanshu28 is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

Maybe I am missing something but...

1. Select cells near top wall. You know location of the top wall, you know size of the cells there, so it should not be a problem. Create faceSet with cellToFace action. Then subSet these faces with patchToFace.

2. Repeat the same with "Left wall".

3. Then you use createPatch utility (maybe you will need to merge faceSets before creating patch, it is done with add action).
Hi alexeym,

Thanks for the Help. Its working out

Regards
himanshu28 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 110 April 21, 2016 11:54
Cyclic Boundary Condition Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Running, Solving & CFD 36 July 2, 2012 12:23
Fluent3DMeshToFoam simvun OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 May 14, 2012 05:20
Actuator disk model audrich FLUENT 0 September 21, 2009 07:06
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19


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