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

[snappyHexMesh] snappyHexMesh - different patch names from stl file

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By mabubel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2017, 03:23
Default snappyHexMesh - different patch names from stl file
  #1
New Member
 
Join Date: Aug 2015
Posts: 3
Rep Power: 11
cptlddd is on a distinguished road
I'm trying to mesh an stl file, and have all of the faces of the mesh have different names, so that I can specify different boundary conditions.

I have created an stl file which has all of the faces bounded by

solid inlet
endsolid inlet

etc.

However, when I run snappyHexMesh I am unable to retain these names in my mesh. It only gives me "flow_to_domain0 - patch"

I have attached the case I am trying to mesh which shows my snappyHexMeshDict.
I am aiming for flow inside a cylinder, I want to be able to specify inner wall boundaries, outer wall boundaries, and inlet and outlet.
Attached Files
File Type: gz meshpatchexample.tar.gz (11.3 KB, 35 views)
cptlddd is offline   Reply With Quote

Old   October 30, 2017, 17:14
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Not quite sure I got right what you are trying to achieve with snappyHexMesh. Would you like to get something like on attached screenshot or you would like to introduce "internal" boundaries inside your cuboid mesh (to have two separate regions for CHT, for example)?
Attached Images
File Type: png mesh.png (128.9 KB, 139 views)
alexeym is offline   Reply With Quote

Old   October 30, 2017, 21:47
Default
  #3
New Member
 
Join Date: Aug 2015
Posts: 3
Rep Power: 11
cptlddd is on a distinguished road
Yes, multiple regions for CHT, the outer blockmesh, the hollow cylinder and the cylinder inside the hollow cylinder.
cptlddd is offline   Reply With Quote

Old   November 2, 2017, 04:57
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Then you have to supply more STLs, for all your regions. See snappyMultiRegionHeater for example.
alexeym is offline   Reply With Quote

Old   November 21, 2017, 11:32
Default
  #5
New Member
 
Join Date: May 2017
Posts: 5
Rep Power: 9
mabubel is on a distinguished road
Hi,
I am trying to achieve the same as cptldd (at least I think so).

The first problem I hit, when running cptldd's setup is that I do not get the same result as alexeym. While his mesh shows different patches, mine does only show a single one.

I attahed a picture of it. What am I doing wrong?

EDIT:
https://sites.google.com/site/snappy...t#TOC-geometry says cptldd used the right method to assign patches, correct?
Attached Images
File Type: jpg mesh.jpg (99.5 KB, 65 views)
mabubel is offline   Reply With Quote

Old   November 21, 2017, 13:25
Default
  #6
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

To learn "what you are doing wrong", you have to post more info. Ideally your case, cause to answer your question, people need to look at your STLs and at your snappyHexMeshDict.
alexeym is offline   Reply With Quote

Old   November 22, 2017, 07:54
Default
  #7
New Member
 
Join Date: May 2017
Posts: 5
Rep Power: 9
mabubel is on a distinguished road
Hi alexeym,

it took me some time, but i pieced things together from tutorials and videos of Tobias Holzmann. In case someone else has the same problems i had, this is how I solved it.

boundary conditions:
- I have one solid domain enclosed by a fluid domain
- the boundary solid <-> fluid should be created automatically
- the fluid domain is supposed to be created with different patches (inlet, outlet, wall)
- the fluid domain as well as the solid domain are both defined by STL files
- in my case the outlet is not plane

The first tutorial i used was this: https://www.youtube.com/watch?v=fayEbpze3I4
It shows the process of how to set up the fluid domain with different patches and an arbitrary shape (4.4 and 4.5 videos might be useful as well)

The second tutorial I used is from Tobias as well: https://holzmann-cfd.de/openfoam/ope...region-meshing
In this one he created an example of how to mesh more than one region. The problem with this one was, that he used the backgroundmesh to assign inlet and outlet, hence arbitrary inlet and outlet forms were not possible.

After combining both tutorials my snappyHexMeshDict now looks like this:
(please keep in mind that this excerpt describes my setup of a ball inside a tube not the setup of cptlddd)

Code:
geometry
{
    Rohrmesh.stl
    {
        type triSurfaceMesh;
        regions
        {
           inlet  {name inlet; }
           outlet {name outlet; }
           wall   {name wall; }
        }
    }
    Kugelmesh.stl
    {
        type triSurfaceMesh;
        name kugel;       
    }
};
and

Code:
    refinementSurfaces
    {
       Rohrmesh.stl
       {
          level (1 1);
          
          regions
          {
             inlet     { level (1 1); patchInfo { type patch; }}
             outlet    { level (1 1); patchInfo { type patch; }}
             wall      { level (2 2); patchInfo { type wall; }}
          }
       }
       
       kugel
       {
          level (4 4);
           
          faceZone kugel;
          cellZone kugel;
          cellZoneInside inside;
       }  
         
    }
As you can see, I am using the setup of the video tutorial to describe the outer hull of my fluid domain including its patches and then I am using the setup of the second tutorial for my solid domain inside the fluid domain.

So far this seems to work, I will probably find new problems on the way
erinsam and Jim1310 like this.

Last edited by mabubel; November 22, 2017 at 07:55. Reason: Added reminder about my dict file
mabubel 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
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 18:34
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 06:18
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


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