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

snappyHexMesh does not create boundary patches from .stl files

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

Like Tree1Likes
  • 1 Post By bug_or_feature

Reply
 
LinkBack Thread Tools Display Modes
Old   June 28, 2016, 10:07
Default snappyHexMesh does not create boundary patches from .stl files
  #1
New Member
 
Join Date: Jun 2016
Posts: 5
Rep Power: 2
bug_or_feature is on a distinguished road
Hi everyone,

Having read quite a few threads I decided to join the forum myself. Thanks for all the help you have already provided me with while not even being registered.

Now to a problem I was not able to solve yet: I am trying to mesh a multi region case (one region solid, one region fluid). I have .stl files for each region (solid.stl, fluid.stl). According to the surfaceCheck utility both .stl files are closed surfaces (which was hard enough to begin with). Additionally both .stl files contain various different patches:

Code:
solid solid_region_1
    ...
endsolid
solid solid_region_2
    ...
endsolid
I configured my blockMesh so that the box is slightly larger than my geometry. The geometry is cut in half in the middle because I assume it to be symmetric to that plane (this is the only place where the blockMesh cuts the geometry).

In my snappyHexMeshDict I loaded the .stl files in the geometry sub-directory like this:

Code:
geometry
{
    solid.stl
    name solid
    regions
    {
         solid_region_1
         {
              name solid_region_1
         }
         ...
    }
    fluid.stl
    ....
}
I also declared them in the refinementSurfaces sub-dict:

Code:
refinementSurfaces
{
    solid
    {
        level (1 1);
        faceZone solid;
        cellZone solid;
        cellZoneInside inside;
        regions
        {
            solid_region_1
            {
                level (2 2);
                patchInfo
                {
                    type wall;
                }
           }
           ...
My Problem is, that all these patches I declared in the .stl file (and it was a pain to declare them and keep the surface closed), are simply disappearing after running snappyHexMesh. It just puts "defaultFaces" and "solid_to_fluid" in constant/soild/polyMesh/boundary. It also keeps adding "domain0" (and respective boundaries), which is the empty space resulting from the blockMesh being a little bit bigger than the actual geometry.

My question is: How can I tell snappyHexMesh to keep all the patches that are nicely defined in the .stl files so I can use those patches to apply boundary conditions in my simulation later on?

I found quite a few threads on similar topics but non provided the answer I was looking for. I even ran snappy only on the solid part of the geometry (altering all the necessary files of course) but that does not change the problem that my patches are gone after the meshing process.

Can someone give me a hint what I am doing wrong?

Best regards and thanks in advance

Last edited by bug_or_feature; June 28, 2016 at 10:26. Reason: typo in code
bug_or_feature is offline   Reply With Quote

Old   June 28, 2016, 20:43
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 267
Rep Power: 6
Antimony is on a distinguished road
Hi,

solid { level (1 1); faceZone solid; cellZone solid; cellZoneInside inside;

I am not sure if this is what is causing the problem, but by stating "cellZoneInside inside", you are asking snappyHexMesh to mesh through, which means that there will be no patches from the solid.stl file...

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   June 28, 2016, 20:43
Default
  #3
Senior Member
 
Join Date: Aug 2013
Posts: 267
Rep Power: 6
Antimony is on a distinguished road
Hi,

Code:
solid    
 {         
            level (1 1);
            faceZone solid;
            cellZone solid;
            cellZoneInside inside;
I am not sure if this is what is causing the problem, but by stating "cellZoneInside inside", you are asking snappyHexMesh to mesh through, which means that there will be no patches from the solid.stl file...

Cheers,
Antimony

Last edited by Antimony; June 28, 2016 at 20:44. Reason: Wrapping necessary tags properly
Antimony is offline   Reply With Quote

Old   June 29, 2016, 04:07
Default
  #4
New Member
 
Join Date: Jun 2016
Posts: 5
Rep Power: 2
bug_or_feature is on a distinguished road
Hi Antimony,

Thank you for your answer! I think you are right. I commented that line out and now I can find the patches in the boundary file in constant/polyMesh.

I am new to OpenFOAM. Can you briefly explain what "cellZonesInside" actually does? I am confused what cell zones actually are (you read it everywhere but I did not find a proper explanation how they are assigned). From what I have read I suspect cell zones are groups of cells? And face zones groups of cell faces?

Best regards
bug_or_feature is offline   Reply With Quote

Old   June 29, 2016, 07:38
Default
  #5
New Member
 
Join Date: Jun 2016
Posts: 5
Rep Power: 2
bug_or_feature is on a distinguished road
Hi again,

Maybe I should elaborate a bit on what I am trying to achieve:

My geometry is basically a block with a hole inside. I have one .stl file for the block (with the hole cut out) and one .stl file for the cylinder that fills that very hole. The fluid is supposed to flow through the hole (hence the fluid.stl contains the cylinder). I want to simulate the heat transfer from the fluid to the solid. Therefore I need meshes of both the cylinder (fluid) and the block surrounding it (solid). I don't need a mesh of the surrounding of my geometry (I guess this is the domain0 I get all the time, but I think this one can be deleted after the meshing). But I need to have patches on the outside of the solid domain to be able to use boundary conditions on those (because heat is dissipated by the solid block).

Best regards
bug_or_feature is offline   Reply With Quote

Old   June 30, 2016, 11:36
Default
  #6
New Member
 
Join Date: Jun 2016
Posts: 5
Rep Power: 2
bug_or_feature is on a distinguished road
Hey,

I think I have found the problem: cutting my geometry in half with blockMesh was apparently no good idea. I have tested meshing without cutting the objects and the patches show up in the boundary file.

Best regards
Antimony likes this.
bug_or_feature is offline   Reply With Quote

Old   August 13, 2016, 13:19
Default
  #7
New Member
 
Appu
Join Date: Apr 2016
Posts: 3
Rep Power: 3
ullal is on a distinguished road
Quote:
Originally Posted by bug_or_feature View Post
Hey,

I think I have found the problem: cutting my geometry in half with blockMesh was apparently no good idea. I have tested meshing without cutting the objects and the patches show up in the boundary file.

Best regards
Hi bug_or_feature

Can you post your snappy Hex mesh dict. I am having the same problem-only part of my patches are showing up. Other patches along with the geometry part is missing

Thanks
ullal is offline   Reply With Quote

Old   August 30, 2016, 19:18
Default
  #8
New Member
 
Join Date: Jun 2016
Posts: 5
Rep Power: 2
bug_or_feature is on a distinguished road
Hi,
Sorry for the delay.

In my case this had nothing to do with the sHMD at all. Therefore posting it does not really help you I guess.

I did modify the blockMeshDict to fix the problem. You need to be aware, that the block you define in the blockMeshDict has to fit or surround your geometry. I tried to cut through my geometry with the blockMesh and this must have caused my error. Maybe you are trying something similar?

greetings :-)
bug_or_feature 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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 27 November 2, 2015 18:04
mirrorMesh and undoing the joining of patches chegdan OpenFOAM Mesh Utilities 3 October 21, 2015 08:09
how to set periodic boundary conditions Ganesh FLUENT 13 January 22, 2014 05:11
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 23:54.