CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   STL file (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/96143-stl-file.html)

openfoam_user January 13, 2012 09:28

STL file
 
Hi,

I have problem with newly created STL files.

I use OF-2.1.x.
I have created an STL file with ICEMCFD version 13.
But SHM doesn't see any patch:

Adding patches for surface regions
----------------------------------

Patch Type Region
----- ---- ------
Added patches in = 0 s

Has someone encountered same kind of problem recently.

Best regards,

Stephane

wyldckat January 15, 2012 09:53

Hi Stephane,

OK, there are several reasons why this might have happened:
  • The STL file might not be in a visible place in the initial bounding box mesh.
  • The resolution of the bounding mesh might be insufficient to have enough lines crossing the STL geometry.
  • The names used in "snappyHexMeshDict" might not relate directly to the STL file.
  • Which "snappyHexMeshDict" file are you using as reference? If it was from OpenFOAM 1.7 or older, I think those aren't compatible with the new definitions on and above 2.0.
  • Is the STL file in binary or ASCII format?
  • Just in case... Did you try this with OpenFOAM 2.0.x as well?

Best regards,
Bruno

openfoam_user January 16, 2012 05:19

Hi Bruno,

None of your proposals solve my problem.

It is strange because when I use the surfaceFeatureExtract command to extract the edges sHM see the edges (and do the refinement). But sHM still doesn't any patch so it can't delete any cells inside or outside.

Best regards,

Stephane.

openfoam_user January 16, 2012 06:24

Hi Bruno,

If I write as below sHM see the patch:

geometry
{
flange.stl
{
type triSurfaceMesh;
name flange;
}
};

But if I write as below sHM doesn't see any patch:

geometry
{
flange.stl
{
type triSurfaceMesh;
regions
{
FLANGE// Named region in the STL file
{
name flange;// User-defined patch name
}
}
}
};

Why ?

Regards,

Stephane.

wyldckat January 16, 2012 16:14

Hi Stephane,

I thought it might be something like that. Older versions of OpenFOAM (<2.0.0) allowed that kind of renaming. But with >= 2.0.0, snappyHexMesh considers a more hierarchical name assignment. If I'm not mistaken, you should write "flange_FLANGE" or "flange.FLANGE". Let me check the examples... no, wait, that's only when the naming procedure is done automatically, as shown in the examples:
  • "mesh/snappyHexMesh/flange"
  • "incompressible/simpleFoam/motorBike"
But tutorial "multiphase/interPhaseChangeFoam/cavitatingBullet" does support the naming procedure you are using!


OK, the base example present in the source code at "applications/utilities/mesh/generation/snappyHexMesh/" clearly indicates:
Code:

    sphere.stl
    {
        type triSurfaceMesh;

        //tolerance  1E-5;  // optional:non-default tolerance on intersections
        //maxTreeDepth 10;    // optional:depth of octree. Decrease only in case
                              // of memory limitations.

        // Per region the patchname. If not provided will be <name>_<region>.
        regions
        {
            secondSolid
            {
                name mySecondPatch;
            }
        }
    }

Mmm... upon re-reading your last post, the comments are too much on top of the word itself:
Quote:

FLANGE//
There is no space between the name and the comment marker!

Best regards,
Bruno


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