CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

Multi region meshing & recovering the original patch names

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

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Display Modes
Old   March 24, 2010, 08:01
Default Multi region meshing & recovering the original patch names
  #1
New Member
 
Join Date: Mar 2010
Posts: 1
Rep Power: 0
fluidpath is on a distinguished road
Hello All,

I have been trying to do some multi region (multi volume) using snappyHexMesh (sHM) with a simple two boxes side by side geometry. I am struggling with getting it to work, in terms of getting 2 distinct volume regions and recovering my original geometry patches. I've attached a tiny tar archive of the case for reference.


I started with the following individual STL files :-

box01.stl (5 out of 6 faces of a closed box)
baffle01.stl (common wall between the two box volumes)
box02.stl (5 out of 6 faces of a closed box)
baffle02.stl (copy of baffle01.stl but with flipped normals)


I then edited the individual STL files and post-fixed the "solid" and "endsolid" keywords with the desired region name :-

box01_baffle01
box01_box01
box02_baffle02
box02_box02

These four individual files were then concatenated together to form the final 2 closed volume multi region STL parts :-

cat box01.stl baffle01.stl > fluid_box01.stl
cat box02.stl baffle02.stl > fluid_box02.stl


As a side note I found that I couldn't recover the correct two volumes if the normals weren't consistently facing outward for each volume (I am guessing inward normals would also work).

In the sHM dictionary (under refinementSurfaces{} ) I defined the following 2 face and 2 cell zone names in order to extract the 2 regions (the key geometry{} & refinementsurfaces{} sections are posted at the bottom of this message for convenience) :-

fluid_box01_fz
fluid_box01_cz
fluid_box02_fz
fluid_box02_cz

I then ran blockMesh (whose extents are purposefully larger than those of the STL geometry) and sHM on the case before running "splitMeshRegions -cellZones" utility. This recovers nicely the 3 distinct regions in my case - fluid_box01_cz, fluid_box02_cz and domain0 which contains the remaining volume cells, outside of the 2 box STL geometry.

The following lists the resulting patches for each of the 3 recovered regions :-

"domain0" boundary patches
----------
minX
maxX
minY
maxY
minZ
maxZ
domain0_to_fluid_box01_cz
domain0_to_fluid_box02_cz

"fluid_box01_cz" boundary patches
-----------
fluid_box01_cz_to_domain0
fluid_box01_cz_to_fluid_box02_cz


"fluid_box02_cz" boundary patches
-----------
fluid_box02_cz_to_fluid_box01_cz
fluid_box02_cz_to_domain0


My question is how can I preserve or recover the original patch region names that I specified in the 2 STL files. As you can see from above I currently end up with names along the lines of "cellZone A_to_cellZoneB". This test case only had two region patches in each of the 2 closed STL files so a simple renaming operation could be used. However, if each of the 2 closed STL files had 6 region patch names (i.e. 1 per box side) then I think you would still only get the above list of resulting patches?

Am I correct in thinking that sHM cannot use many separate STL files to do multi region meshing, unless the separate regions are wholely contained inside a single closed volume stl file? So if you had a box shaped region that you wanted meshed and this was contained in 2 separate stl files this would not work.


Thank you for any help or assistance you can give me!






geometry
{
fluid_box01.stl
{
type triSurfaceMesh;
//cannot use name with regions
// name fluid_box01;

regions
{
box01_box01 // Named region in the STL file
{
name box01_box01; // User-defined patch name
}
box01_baffle01
{
name box01_baffle01;
}
}
}

fluid_box02.stl
{
type triSurfaceMesh;
//cannot use name with regions
// name fluid_box02;

regions
{
box02_box02 // Named region in the STL file
{
name box02_box02; // User-defined patch name
}
box02_baffle02
{
name box02_baffle02;
}
}
}

};


.
.
.


refinementSurfaces
{
fluid_box01.stl
{
// Surface-wise min and max refinement level
level (1 1);
faceZone fluid_box01_fz;
cellZone fluid_box01_cz;
zoneInside true;

regions
{
box01_box01 // Named region in the STL file
{
level (1 1); // User-defined patch name
}
box01_baffle01
{
level (1 1);
}
}
}

fluid_box02.stl
{
// Surface-wise min and max refinement level
level (1 1);
faceZone fluid_box02_fz;
cellZone fluid_box02_cz;
zoneInside true;

regions
{
box02_box02 // Named region in the STL file
{
level (1 1); // User-defined patch name
}
box02_baffle02
{
level (1 1);
}
}
}
}

.
.
.
Attached Files
File Type: gz twobox_case2.tar.gz (6.4 KB, 22 views)
fluidpath is offline   Reply With Quote

Old   May 17, 2013, 17:01
Default Nobody knows the solution?
  #2
New Member
 
Jackie Chou
Join Date: Mar 2013
Posts: 11
Rep Power: 4
jackeyhust is on a distinguished road
I had the same problem. Could anybody give some solution? thanks a lot!
jackeyhust is offline   Reply With Quote

Old   May 19, 2013, 06:08
Default
  #3
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,516
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings to all! Jackie, welcome to the forum!

@Jackie: I got your email about this thread. I know I've either answered to this question in the past or I've already seen the answer in the forum. But after 15 minutes of searching, I can't find it.
Either way, try reading the following threads for ideas:
Best regards,
Bruno
jackeyhust likes this.
wyldckat is offline   Reply With Quote

Old   May 19, 2013, 06:33
Default
  #4
Member
 
Daniel Pielmeier
Join Date: Apr 2012
Posts: 96
Rep Power: 5
billie is on a distinguished road
I want do do the same thing with sHM and I searched the forums up and down but could not find a solution.

I think original patches are preserved if there is one region and a blockMesh which is larger than than the actual geometry but not if you have multiple regions.

I tried with a simple test case, a short pipe with only a subset of the solid walls as separate patch where a heat flux should be applied but the original patch is not preserved by sHM. I can share the case and upload it next week if anyone wants to take a look at it.
billie is offline   Reply With Quote

Old   May 19, 2013, 19:13
Default Thank you so much!
  #5
New Member
 
Jackie Chou
Join Date: Mar 2013
Posts: 11
Rep Power: 4
jackeyhust is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all! Jackie, welcome to the forum!

@Jackie: I got your email about this thread. I know I've either answered to this question in the past or I've already seen the answer in the forum. But after 15 minutes of searching, I can't find it.
Either way, try reading the following threads for ideas:
Best regards,
Bruno
Hi, Bruno,

it's really kind of you! I read your recommended post. That's quite nice and useful. I will try it and give you the feedback.

regards,

Jackie
jackeyhust is offline   Reply With Quote

Reply

Tags
multi, patch, recovering, region, snappyhexmesh

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
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 18:31.