CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] snappyhexmesh (https://www.cfd-online.com/Forums/openfoam-meshing/121977-snappyhexmesh.html)

sasanghomi August 9, 2013 07:40

snappyhexmesh
 
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.

Hiroshiman August 9, 2013 07:59

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

sasanghomi August 10, 2013 05:23

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.

Hiroshiman August 10, 2013 15:57

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

sasanghomi August 11, 2013 14:25

1 Attachment(s)
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.

elvis August 12, 2013 04:29

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

Hiroshiman August 12, 2013 09:23

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 August 13, 2013 06:18

Dear Hiroshiman

Thank you very very very much.... ;)


All times are GMT -4. The time now is 21:09.