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] Acute angle snapping (https://www.cfd-online.com/Forums/openfoam-meshing/253504-acute-angle-snapping.html)

JulioPieri December 13, 2023 09:50

Acute angle snapping
 
4 Attachment(s)
Hi all!

I consider myself an experienced OF/SHM user, but I never had this much trouble with meshing. I'm familiar with all of snappy's commands and options, but I'm struggling with an acute corner.

Attached you can see the problem that I'm facing. Castellated phase seem to cut out "too much" elements, and the snapping phase can't reach the correct surface. The final elements are terrible. In the picture you can see the stl surface (shaded) and the eMesh file.

I've tried changing every single Snap parameter, iterations, tolerance, number of elements, etc - without success. The elements do get a little better, but hardly usable.

My procedure is to cut the inside of the STL (containing just the tubes and the steam-drum) out of the domain - I've made a background mesh of the furnace and I'm just removing the tubes from it. This guarantees good elements on all other corners, avoiding snappying surfaces that could be created straight from the background. Alternatively, I could have made the usual "sculpt the whole confined fluid domain out of a big blockMesh".

1) How do you guys snap this kind of sharp corner?
2) I'm using meshQuality as default. Maybe changing it could help?
3) I'm suspecting that my eMesh is also not very good. I generated it with surfaceFeatureExtract from the main STL, and with angle of 150. Is that how you guys do it? Could the problem be here?

Basic info:
v2212, Background mesh generated in Salome,
Watertight stl created in FreeCAD and re-triangulated in Blender (uniform and small triangles).
The STL is bigger than the background mesh (pic) - which leads to success when snapping corners of tubes that are 90deg with mesh.
Other corners are ok - for instance, when the tube crosses a vertical side of the mesh.

My (simplified) snappy-dict is:

Code:

castellatedMesh true;
snap            true;
addLayers      false;


// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
    mesh.stl
    {
        type triSurfaceMesh;
        name mesh;
    }

}
castellatedMeshControls
{

    maxLocalCells 10000000;


    maxGlobalCells 20000000;

    minRefinementCells 10;


    maxLoadUnbalance 0.10;


    nCellsBetweenLevels 4;

    features
    (
        {
            file "mesh.eMesh";
            level 0;
        }
    );



    refinementSurfaces
    {
        mesh
        {
            level (3 3);
            patchInfo
            {
                type wall;
            }
        }
    }

    // Resolve sharp angles
    resolveFeatureAngle 54;


    refinementRegions
    {
    }


 
    locationInMesh (0.861 0.001 8.711);

    allowFreeStandingZoneFaces false;
}

snapControls
{

    nSmoothPatch 3; // tried 4, 5 and 8

    tolerance 1; // tried 0.8, 1.5 and 3

    nSolveIter 300; // tried 150

    nRelaxIter 12; // tried 4

    // Feature snapping

        nFeatureSnapIter 4; // tried 6, 8, 12 and 24

        implicitFeatureSnap true; // tried false, although implicit usually works better for me
        explicitFeatureSnap false;

        multiRegionFeatureSnap false;

}

Any advice? Thanks!

AtoHM December 14, 2023 02:11

Since you are doing the blocking manually already, you could try to make the background mesh align with the end "face" of these tubes?
Also one more level of edge refinement for the edges of the tubes might help alot.

JulioPieri December 14, 2023 10:44

Quote:

Originally Posted by AtoHM (Post 861669)
Since you are doing the blocking manually already, you could try to make the background mesh align with the end "face" of these tubes?
Also one more level of edge refinement for the edges of the tubes might help alot.

Thank you for your reply.

It's a good idea. However, the inclined surface you see on the picture (the steam drum) is also cut out in snappy.
In order to make those elements aligned with the tube, I'd have to have cut that inclined surface in Salome as well, which would imply complex blocking (subdivisions of 4 sides) to keep it quadrangle. I'd end up with elements radially aligned with the steam drum, instead of vertically aligned with the tubes. Unless... I carefully place the quadrangles to guarantee that alignment. I'll try that!

In the mean time, I noticed that using nSmoothPatch of 2 significantly increased the quality of the elements, though not yet very good. Some very tiny/flat/deformed elements started to show up.
Refining the edge helped as well, but there are still some poor elements in the same spots.

AtoHM December 15, 2023 01:29

Can you share the geometry? I have a tool to build the blockMesh visually - I cannot make it public at the moment - but I could give it a try.

JulioPieri December 15, 2023 08:12

That would be great. Please let's talk via email, if that's ok? I can't publicly share the whole geometry (here).


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