CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

snappyhexmesh

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

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 9, 2013, 07:40
Default snappyhexmesh
  #1
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Iran - Tehran
Posts: 185
Rep Power: 5
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, 07:59
Default
  #2
Member
 
Join Date: Sep 2012
Posts: 50
Rep Power: 5
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, 05:23
Default
  #3
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Iran - Tehran
Posts: 185
Rep Power: 5
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, 15:57
Default
  #4
Member
 
Join Date: Sep 2012
Posts: 50
Rep Power: 5
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, 14:25
Default
  #5
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Iran - Tehran
Posts: 185
Rep Power: 5
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, 8 views)
sasanghomi is offline   Reply With Quote

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

if you look at
Catia to snappyHexMesh


Catia to snappyHexMesh

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, 09:23
Default
  #7
Member
 
Join Date: Sep 2012
Posts: 50
Rep Power: 5
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, 06:18
Default
  #8
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Iran - Tehran
Posts: 185
Rep Power: 5
sasanghomi is on a distinguished road
Dear Hiroshiman

Thank you very very very much....
sasanghomi 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
Strange Results With snappyHexMesh calebamiles OpenFOAM Running, Solving & CFD 0 August 14, 2011 16:02
stitchMesh and snappyHexMesh gdbaldw OpenFOAM 0 December 23, 2009 03:09
SnappyHexMesh samiam1000 OpenFOAM 0 October 5, 2009 10:32
Problem with snappyHexMesh samiam1000 OpenFOAM 0 October 3, 2009 05:08
SnappyHexMesh not generate mesh first time mavimo OpenFOAM Mesh Utilities 4 August 26, 2008 07:08


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