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

[snappyHexMesh] snappyhexmesh

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Hiroshiman
  • 1 Post By Hiroshiman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2013, 08:40
Default snappyhexmesh
  #1
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 15
sasanghomi is on a distinguished road
Hi everybody ,

These days I am trying to use snappyhexmesh and I have a question about specifying names for each boundary in the geometry.How can I specify a name for a boundary in the geometry? I know that I can use snappyhexmeshDict for surfaces those have regular shapes (e.g. sphere & cylinder & cubic ) But when there are some complicated surfaces How can I specify a name for a boundary in the geometry?? Is it possible to specify names for boundaries in STL file? ( I know CATIA and Solidworks can't do this action )
Any idea? Any software?

I appreciate any help from you.
Thanks and best regards,
Sasan.
sasanghomi is offline   Reply With Quote

Old   August 9, 2013, 08:59
Default
  #2
Member
 
Join Date: Sep 2012
Posts: 51
Rep Power: 14
Hiroshiman is on a distinguished road
You can spit your .stl by angle before meshing using
Code:
surfaceAutoPatch in.stl out.stl angle
SnappyHexMesh will then consider the different patchs. It can be coupled with
Code:
surfaceFeatureExtract
a meshing taking account of the angle.

Florian
elvis likes this.
Hiroshiman is offline   Reply With Quote

Old   August 10, 2013, 06:23
Default
  #3
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 15
sasanghomi is on a distinguished road
Thank you very much for your reply ,
Can you explain more? I think there is one .STL file So what are in.stl and out.stl ?? and what is the angle exactly ? Can you say me what do the first commend do exactly ?
surfaceAutoPatch in.stl out.stl angle
Thank you very much
Sasan.
sasanghomi is offline   Reply With Quote

Old   August 10, 2013, 16:57
Default
  #4
Member
 
Join Date: Sep 2012
Posts: 51
Rep Power: 14
Hiroshiman is on a distinguished road
I mean in.stl is your original file and out.stl is the newly generated one. The angle is the angle which will be used to separate surface ; it's similar to the autoPatch function but on the stl, not the mesh.

After running surfaceAutoPatch, look at your stl in paraview and you'll see the different areas.
The surface tools are listed here :
http://www.openfoam.org/docs/user/st...-utilities.php
Hiroshiman is offline   Reply With Quote

Old   August 11, 2013, 15:25
Default
  #5
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 15
sasanghomi is on a distinguished road
Hi Dear Hiroshiman,

Thank you very much .
I tried to generate the mesh for a simple geometry and I used your advice (surfaceAutoPatch)...But unfortunately the mesh didn't create..I attached case file. Please take a look at this case . Can you help me for finding the origin of this problem ?

I appreciate any help from you.
Thanks and best regards,
Sasan.
Attached Files
File Type: gz snappyhexmesh.tar.gz (9.8 KB, 13 views)
sasanghomi is offline   Reply With Quote

Old   August 12, 2013, 05:29
Default
  #6
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Hi,

if you look at
Catia to snappyHexMesh


http://www.cfd-online.com/Forums/ope...tml#post344263

there seems to be a catia-script that supports writing STLīs with named surfaces
http://www.cfd-online.com/Forums/att...-stlexport.txt

feedback if that works would be great
elvis is offline   Reply With Quote

Old   August 12, 2013, 10:23
Default
  #7
Member
 
Join Date: Sep 2012
Posts: 51
Rep Power: 14
Hiroshiman is on a distinguished road
sasanghomi :
An few things : if you look at the STLSolidLabeling in paraview of your out.stl you'll see the separated surface, it worked fine.
Concerning the mesh generation, your blockMeshDict wasn't correct. Use s
Code:
urfaceCheck -blockMesh constant/triSurface/out.stl
to know the bounding box size. I used :
Code:
vertices
(
    (0.499997 0.071262 0.499997)
    (100.5 0.071262 0.499997)
    (100.5 7.19745 0.499997)
    (0.499997 7.19745 0.499997)
    (0.499997 0.071262 50.5)
    (100.5 0.071262 50.5)
    (100.5 7.19745 50.5)
    (0.499997 7.19745 50.5)
);
blocks
(
    hex ( 0 1 2 3 4 5 6 7) (50 50 20) simpleGrading (1 1 1)
);

It worked fine. after running snappyHexMesh, it saw and used the patches which can therefore be used for BCs.
The boundaries files looks like :
Code:
9
(
    defaultFaces
    {
        type            empty;
        inGroups        1(empty);
        nFaces          3011;
        startFace       2475746;
    }
    patch0
    {
        type            wall;
        nFaces          288000;
        startFace       2478757;
    }
    patch1
    {
        type            wall;
        nFaces          3600;
        startFace       2766757;
    }
    patch2
    {
        type            wall;
        nFaces          129600;
        startFace       2770357;
    }
    patch3
    {
        type            wall;
        nFaces          2400;
        startFace       2899957;
    }
    patch4
    {
        type            wall;
        nFaces          32400;
        startFace       2902357;
    }
    patch5
    {
        type            wall;
        nFaces          1600;
        startFace       2934757;
    }
    patch6
    {
        type            wall;
        nFaces          8603;
        startFace       2936357;
    }
    patch7
    {
        type            wall;
        nFaces          0;
        startFace       2944960;
    }
)
If you use a bigger bounding box, one empty wall will disappear.

Enjoy,

Florian
sasanghomi likes this.
Hiroshiman is offline   Reply With Quote

Old   August 13, 2013, 07:18
Default
  #8
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 15
sasanghomi is on a distinguished road
Dear Hiroshiman

Thank you very very very much....
sasanghomi 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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 07:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 03:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 03:55
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? klausb OpenFOAM Meshing & Mesh Conversion 1 March 7, 2015 12:55
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 03:09


All times are GMT -4. The time now is 12:32.