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

[mesh manipulation] How to create a subpatch from a patch

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 13
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,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
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, 15:23
Default
  #3
Senior Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13
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, 16:44
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
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, 18:18
Default
  #5
Senior Member
 
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13
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

Old   August 20, 2018, 14:15
Default
  #6
Senior Member
 
Ali Shayegh
Join Date: Oct 2015
Posts: 130
Rep Power: 10
amuzeshi 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

There is only one step:
Code:
create a faceSet with boxToFace (easy)
amuzeshi 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
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 05:37
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 15:33
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Cyclic Boundary Condition Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Running, Solving & CFD 36 July 2, 2012 12:23
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


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