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

[snappyHexMesh] Smooth Devision around objects with sHM

Register Blogs Community New Posts Updated Threads Search

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2023, 07:32
Default Smooth Devision around objects with sHM
  #1
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Hi all,
I have wondered why snappyHexMesh does not divide the object into equal parts?
how can I fix it?
I have attached a sample mesh below.
Besides, I have seen other problem in my mesh, in which the surface is bent (showed by arrow)
any suitable ideas are welcome
Attached Images
File Type: jpg Screenshot (149).jpg (129.0 KB, 48 views)

Last edited by saeed jamshidi; October 16, 2023 at 09:46.
saeed jamshidi is offline   Reply With Quote

Old   October 18, 2023, 05:30
Default
  #2
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Any idea??
saeed jamshidi is offline   Reply With Quote

Old   October 18, 2023, 05:50
Default
  #3
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
There's no fix besides meshing it manually with blockMesh. If you look at the cells over the top layer you can see why. If you don't, run the meshing without the layers phase and see how the cells are distributed at the surface. Snappy needs to snap the cells to the surface and with a non-aligned blockMesh as a start there is no easy way to distribute the cells equally. Setting nCellsBetweenLevels to 4 might help a bit.
The bend is also there above the BL, so I think it also comes from the snap stage. Probably your stl is not really fine, but thats just a guess. You have to check before layer generation.
Yann, hogsonik and saeed jamshidi like this.
AtoHM is offline   Reply With Quote

Old   October 18, 2023, 06:20
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,065
Rep Power: 26
Yann will become famous soon enough
Hello Saeed,

Snappy works with a pure hexa mesh which is refined using an octree structure.

After refining the mesh, cells are cut and morphed to conform to your geometry surface. During the snapping phase, snappy checks mesh quality and try to generate cells satisfying mesh quality criteria.

When trying to cut and morph a cartesian mesh on a cylinder, you end up with zones where you need to remove cells and move nodes in order to find the best solution to conform to the geometry while satisfying mesh quality.

This is why you end up seeing patterns on surface faces after snapping on a cylinder or a sphere. (see first screenshot)
There is no solution to avoid this since this is inherent to the way snappy works. The only thing your can do is to use a cylindrical / spherical initial mesh centered on your geometry in order to have a clean and regular snapping.

Once snappy finished the snapping phase, it moves on the layer addition phase where it will basically moves the mesh away from the surface to insert layers. The inserted layers are based on the surface faces and this is why you will end up with irregular spacing. On the 2nd screenshot I've highlighted in red the cells you got after snapping. The layers spacing is related to these cells.

Yann

EDIT: AtoHM was faster
Attached Images
File Type: jpg sphere.jpg (151.0 KB, 22 views)
File Type: jpg Screenshot (149).jpg (120.9 KB, 27 views)
AtoHM, hogsonik and saeed jamshidi like this.
Yann is online now   Reply With Quote

Old   October 18, 2023, 06:58
Default
  #5
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Thank you for the reply.
So, I think it's better to use other tools like workbench for mesh generation.

I have generated a mesh by workbench v. 2022 (attached), would you please tell me how can I import it in openFoam? Becuase Fluent3DMeshToFoam does not works with mesh of new version of workbench!
Attached Images
File Type: jpg Screenshot (152).jpg (140.6 KB, 25 views)
File Type: jpg Screenshot (153).jpg (144.3 KB, 14 views)
saeed jamshidi is offline   Reply With Quote

Old   October 18, 2023, 08:09
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,065
Rep Power: 26
Yann will become famous soon enough
I'm afraid I cannot really help on this one since I don't use workbench.
I think I have seen some posts on the forum mentioning the mesh needs to be exported in ASCII format but I never really used Fluent3DMeshToFoam myself.
saeed jamshidi likes this.
Yann is online now   Reply With Quote

Old   October 18, 2023, 08:42
Default
  #7
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Quote:
Originally Posted by Yann View Post
EDIT: AtoHM was faster

And yet, you beat me (again) providing nice pictures and a thorough explanation!


Regarding Fluent3DMeshToFoam utility: please check other posts here on the forum. I tried it once and got it to work using advices from youtube tutorials and posts here on the forum. As Yann suggests, you need to export in ASCII and non-zipped. If you are eager to stay in the OpenFOAM/open source world, you can try the blockMesh interface in Blender: swiftBlock (google it). There is a tutorial for a sphere meshing you can readily adjust for your cylinder case shown.
Yann and saeed jamshidi like this.
AtoHM is offline   Reply With Quote

Old   November 2, 2023, 08:55
Default
  #8
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
I have found the problem.
Previously I was generating cylinder via searchable type in snappHexMesh, but when I created a cad model with stl format and executed surfaceFeatureExtract I got rid of the bend on the cylinder surface.
Just for foamers information.
Attached Images
File Type: jpg boundary layer.jpg (142.5 KB, 23 views)
File Type: jpg boundary layer 2.jpg (105.1 KB, 21 views)
Yann likes this.
saeed jamshidi is offline   Reply With Quote

Old   November 9, 2023, 12:58
Default
  #9
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Hi again,

Now I'm thinking about smooth transition betweem last prism cells and first hex cells as demonstrated in below.

Would you please tell me how can I treat it in a proper way?

Thank for you time in advance.
Attached Images
File Type: jpg Screenshot (177).jpg (135.6 KB, 18 views)
saeed jamshidi is offline   Reply With Quote

Old   November 10, 2023, 03:40
Default
  #10
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,065
Rep Power: 26
Yann will become famous soon enough
I depends on your layers parameters: firstLayerThickness, finalLayerThickness, expansionRatio. (depending on which one you are using)

Of course the number of layers you are inserting and the mode (relative or absolute) will also play a role.

Yann
Yann is online now   Reply With Quote

Old   November 10, 2023, 04:07
Default
  #11
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
I consider firstLayerThickness & expansionRatio in absolute mode.

Dear Yann, consider this situation, how can I make it better?

I know you mean I should play with expansionRatio & number of layers to get the best transition.
saeed jamshidi is offline   Reply With Quote

Old   November 10, 2023, 04:19
Default
  #12
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,065
Rep Power: 26
Yann will become famous soon enough
Quote:
Originally Posted by saeed jamshidi View Post
I know you mean I should play with expansionRatio & number of layers to get the best transition.
Exact!

On your screenshot the layers don't really make sense as it is thicker than the initial mesh.
Either you don't need layers if the initial mesh is already fine enough, or you can set a smaller firstLayerThickness and adjust expansion ratio and number of layers to achieve a smooth transition between first layer and outer mesh.
saeed jamshidi likes this.
Yann is online now   Reply With Quote

Old   November 10, 2023, 04:28
Default
  #13
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Yahh, you are right, thank you.

First of all I should build resionable prism layers, however, I considered yplus=40 and I am using wall functions.
saeed jamshidi is offline   Reply With Quote

Old   November 15, 2023, 03:06
Default
  #14
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Finally, I could create a nice and smooth transition for a cylinser, but I'm wondering when I want to create mesh around an airfoil, snappyHexMesh does not adding layers, even with largefirstcell hight or number of layers!!!

I would appreciate it if you give me any solution.

Best,
Saeed
Attached Images
File Type: jpg Screenshot (179).jpg (127.5 KB, 24 views)
File Type: jpg Screenshot (178).jpg (162.8 KB, 21 views)
saeed jamshidi is offline   Reply With Quote

Old   November 16, 2023, 02:45
Default
  #15
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Hi again,
I'm really wondering because of SnappyHexMesh performance!!
Why when layer adddition parameters is met, it doesn't construct prism layers?

What are the other important criteria except for minthickness in order to generate prism layers in sHM?

Thanks.
saeed jamshidi is offline   Reply With Quote

Old   November 16, 2023, 05:33
Default
  #16
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,065
Rep Power: 26
Yann will become famous soon enough
Hello Saeed,

I don't know why you don't get layers on your airfoil. It seems there is absolutely no layers, so maybe there are some syntax issues in your snappyHexMeshDict?

It's important to keep in mind that layer addition process is done while check mesh quality criteria. In many situations, layers are not constructed not because of the layer addition parameters, but because the layer insertion would lead to cell(s) quality(ies) not matching the mesh quality criteria.

However in your case, the fact you don't have a single layer created on your whole geometry makes me think there might be something wrong with your layer parameters.

What does SHM says when it gets to the layer addition phase?
saeed jamshidi likes this.
Yann is online now   Reply With Quote

Old   November 16, 2023, 06:20
Default
  #17
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Hi Yann, I am grateful for your permanet help.

I used the same layaer addition parameters as I created mesh around cylinder(I attached it in the previous posts). Just in order to be sure that total prism layers are greater than the minthickness value.

However, I just change the geometry from cylinder to NACA with the same length (4 cm), but I could not see any layer addition, so I thought I shoud start with a little simple geometry such as oval.
Now, sHM does not works even for oval!!!

Here are my snappyHexMesh & meshQualityDict & surfaceFeatureExtractDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       true;


// 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
{
    NACA.stl
    {
        type triSurfaceMesh;
        name NACA;
    }
	/*
    refinementBox
    {
        type box;
        min  (-0.2 -0.2 -0.01);
        max  ( 0.2  0.2 0.01);
    }
	*/
}


// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    // Refinement parameters
    // ~~~~~~~~~~~~~~~~~~~~~

    // If local number of cells is >= maxLocalCells on any processor
    // switches from from refinement followed by balancing
    // (current method) to (weighted) balancing before refinement.
    maxLocalCells 100000;

    // Overall cell limit (approximately). Refinement will stop immediately
    // upon reaching this number so a refinement level might not complete.
    // Note that this is the number of cells before removing the part which
    // is not 'visible' from the keepPoint. The final number of cells might
    // actually be a lot less.
    maxGlobalCells 2000000;

    // The surface refinement loop might spend lots of iterations refining just a
    // few cells. This setting will cause refinement to stop if <= minimumRefine
    // are selected for refinement. Note: it will at least do one iteration
    // (unless the number of cells to refine is 0)
    minRefinementCells 10;

    // Allow a certain level of imbalance during refining
    // (since balancing is quite expensive)
    // Expressed as fraction of perfect balance (= overall number of cells /
    // nProcs). 0=balance always.
    maxLoadUnbalance 0.10;


    // Number of buffer layers between different levels.
    // 1 means normal 2:1 refinement restriction, larger means slower
    // refinement.
    nCellsBetweenLevels 4;



    // Explicit feature edge refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies a level for any cell intersected by its edges.
    // This is a featureEdgeMesh, read from constant/triSurface for now.
    features
    (
        {
            file "NACA.eMesh";
            level 0;
        }
    );



    // Surface based refinement
    // ~~~~~~~~~~~~~~~~~~~~~~~~

    // Specifies two levels for every surface. The first is the minimum level,
    // every cell intersecting a surface gets refined up to the minimum level.
    // The second level is the maximum level. Cells that 'see' multiple
    // intersections where the intersections make an
    // angle > resolveFeatureAngle get refined up to the maximum level.

    refinementSurfaces
    {
        NACA
        {
            // Surface-wise min and max refinement level
            level (5 5);

            // Optional specification of patch type (default is wall). No
            // constraint types (cyclic, symmetry) etc. are allowed.
            patchInfo
            {
                type wall;
                inGroups (NACAGroup);
            }
        }
    }

    // Resolve sharp angles
    resolveFeatureAngle 30; //30


    // Region-wise refinement
    // ~~~~~~~~~~~~~~~~~~~~~~

    // Specifies refinement level for cells in relation to a surface. One of
    // three modes
    // - distance. 'levels' specifies per distance to the surface the
    //   wanted refinement level. The distances need to be specified in
    //   descending order.
    // - inside. 'levels' is only one entry and only the level is used. All
    //   cells inside the surface get refined up to the level. The surface
    //   needs to be closed for this to be possible.
    // - outside. Same but cells outside.

    refinementRegions
    {
		/*
        refinementBox
        {
            mode inside;
            levels ((1E15 2));
        }
		*/
    }


    // Mesh selection
    // ~~~~~~~~~~~~~~

    // After refinement patches get added for all refinementSurfaces and
    // all cells intersecting the surfaces get put into these patches. The
    // section reachable from the locationInMesh is kept.
    // NOTE: This point should never be on a face, always inside a cell, even
    // after refinement.
    locationInMesh (0.5 0.3 0);


    // Whether any faceZones (as specified in the refinementSurfaces)
    // are only on the boundary of corresponding cellZones or also allow
    // free-standing zone faces. Not used if there are no faceZones.
    allowFreeStandingZoneFaces true;
}



// Settings for the snapping.
snapControls
{
    //- Number of patch smoothing iterations before finding correspondence
    //  to surface
    nSmoothPatch 3;

    //- Relative distance for points to be attracted by surface feature point
    //  or edge. True distance is this factor times local
    //  maximum edge length.
    tolerance 2.0;

    //- Number of mesh displacement relaxation iterations.
    nSolveIter 30;

    //- Maximum number of snapping relaxation iterations. Should stop
    //  before upon reaching a correct mesh.
    nRelaxIter 5;

    // Feature snapping

        //- Number of feature edge snapping iterations.
        //  Leave out altogether to disable.
        nFeatureSnapIter 10;

        //- Detect (geometric only) features by sampling the surface
        //  (default=false).
        implicitFeatureSnap false;

        //- Use castellatedMeshControls::features (default = true)
        explicitFeatureSnap true;

        //- Detect points on multiple surfaces (only for explicitFeatureSnap)
        multiRegionFeatureSnap false;
}



// Settings for the layer addition.
addLayersControls
{
    // Are the thickness parameters below relative to the undistorted
    // size of the refined cell outside layer (true) or absolute sizes (false).
    relativeSizes false;

    // Per final patch (so not geometry!) the layer information
    layers
    {
        "(NACA)"
        {
            nSurfaceLayers 25; 
        }
    }

    // Expansion factor for layer mesh
    expansionRatio 1.05; 

    // Wanted thickness of final added cell layer. If multiple layers
    // is the thickness of the layer furthest away from the wall.
    // Relative to undistorted size of cell outside layer.
    // See relativeSizes parameter.
    firstLayerThickness 1.12e-4;  

    // Minimum thickness of cell layer. If for any reason layer
    // cannot be above minThickness do not add layer.
    // Relative to undistorted size of cell outside layer.
	
    minThickness 1.96e-3;   //Boundary layer thickness  

    // If points get not extruded do nGrow layers of connected faces that are
    // also not grown. This helps convergence of the layer addition process
    // close to features.
    // Note: changed(corrected) w.r.t 1.7.x! (didn't do anything in 1.7.x)
    nGrow 0;

    // Advanced settings

    // When not to extrude surface. 0 is flat surface, 90 is when two faces
    // are perpendicular
    featureAngle 60;

    // At non-patched sides allow mesh to slip if extrusion direction makes
    // angle larger than slipFeatureAngle.
    slipFeatureAngle 30;

    // Maximum number of snapping relaxation iterations. Should stop
    // before upon reaching a correct mesh.
    nRelaxIter 5; //3

    // Number of smoothing iterations of surface normals
    nSmoothSurfaceNormals 1;

    // Number of smoothing iterations of interior mesh movement direction
    nSmoothNormals 3;

    // Smooth layer thickness over surface patches
    nSmoothThickness 10;

    // Stop layer growth on highly warped cells
    maxFaceThicknessRatio 1; //0.5

    // Reduce layer growth where ratio thickness to medial
    // distance is large
    maxThicknessToMedialRatio 0.1; //0.3

    // Angle used to pick up medial axis points
    // Note: changed(corrected) w.r.t 1.7.x! 90 degrees corresponds to 130
    // in 1.7.x.
    minMedialAxisAngle 90;


    // Create buffer region for new layer terminations
    nBufferCellsNoExtrude 0;


    // Overall max number of layer addition iterations. The mesher will exit
    // if it reaches this number of iterations; possibly with an illegal
    // mesh.
    nLayerIter 5; //50
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
    // Specify mesh quality constraints in separate dictionary so can
    // be reused (e.g. checkMesh -meshQuality)
    #include "meshQualityDict"


    // Advanced

        // Number of error distribution iterations
        nSmoothScale 4;
        // amount to scale back displacement at error points
        errorReduction 0.75;
}


// Advanced

// Write flags
writeFlags
(
    scalarLevels
    layerSets
    layerFields     // write volScalarField for layer coverage
);


// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;


// ************************************************************************* //
meshQualityDict:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  v2112
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      meshQualityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 75;

//- Max skewness allowed. Set to <0 to disable.
maxBoundarySkewness 20;
maxInternalSkewness 4;

//- Max concaveness allowed. Is angle (in degrees) below which concavity
//  is allowed. 0 is straight face, <0 would be convex face.
//  Set to 180 to disable.
maxConcave 80;

//- Minimum pyramid volume. Is absolute volume of cell pyramid.
//  Set to a sensible fraction of the smallest cell volume expected.
//  Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;

//- Minimum quality of the tet formed by the face-centre
//  and variable base point minimum decomposition triangles and
//  the cell centre. Set to very negative number (e.g. -1E30) to
//  disable.
//     <0 = inside out tet,
//      0 = flat tet
//      1 = regular tet
minTetQuality 1e-15;

//- Minimum face area. Set to <0 to disable.
minArea -1;

//- Minimum face twist. Set to <-1 to disable. dot product of face normal
// and face centre triangles normal
minTwist 0.02;

//- Minimum normalised cell determinant. This is the determinant of all
//  the areas of internal faces. It is a measure of how much of the
//  outside area of the cell is to other cells. The idea is that if all
//  outside faces of the cell are 'floating' (zeroGradient) the
//  'fixedness' of the cell is determined by the area of the internal faces.
//  1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;

//- Relative position of face in relation to cell centres (0.5 for orthogonal
//  mesh) (0 -> 0.5)
minFaceWeight 0.05;

//- Volume ratio of neighbouring cells (0 -> 1)
minVolRatio 0.01;

//- Per triangle normal compared to average normal. Like face twist
//  but now per (face-centre decomposition) triangle. Must be >0 for Fluent
//  compatibility
minTriangleTwist -1;

nSmoothScale   4;

errorReduction 0.75;

//- If >0 : preserve cells with all points on the surface if the
//  resulting volume after snapping (by approximation) is larger than
//  minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
//  If <0 : delete always.
//minVolCollapseRatio 0.1;


// ************************************************************************* //
surfaceFeatureExtractDict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

NACA.stl
{
    // How to obtain raw features (extractFromFile || extractFromSurface)
    extractionMethod    extractFromSurface;

    // Mark edges whose adjacent surface normals are at an angle less
    // than includedAngle as features
    // - 0  : selects no edges
    // - 180: selects all edges
    includedAngle       150; //150

    subsetFeatures
    {
        // Keep nonManifold edges (edges with >2 connected faces)
        nonManifoldEdges       no;

        // Keep open edges (edges with 1 connected face)
        openEdges       yes;
    }


    // Write options

    // Write features to obj format for postprocessing
    writeObj            yes;
}


// ************************************************************************* //
saeed jamshidi is offline   Reply With Quote

Old   November 16, 2023, 06:21
Default
  #18
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
and here is the terminal output; sorry for long text.
Code:
.
.
.
Merging all faces of a cell
---------------------------
    - which are on the same patch
    - which make an angle < 60 degrees (cos:0.5)
    - as long as the resulting face doesn't become concave by more than 90 degrees
      (0=straight, 180=fully concave)

    faces with face-decomposition tet quality < 1e-15      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.05        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Snapped mesh : cells:57926  faces:188050  points:72606
Cells per refinement level:
    0   2734
    1   304
    2   984
    3   2960
    4   10048
    5   40896
Writing mesh to time constant
Merging 0 sets of faces.

No faces merged ...

Merging all points on surface that
- are used by only two boundary faces and
- make an angle with a cosine of more than 0.5.

No straight edges simplified and no points removed ...

No layers to generate ...
Layer mesh : cells:57926  faces:188050  points:72606
Cells per refinement level:
    0   2734
    1   304
    2   984
    3   2960
    4   10048
    5   40896
Writing mesh to time constant
Wrote mesh in = 3.62 s.
Mesh snapped in = 32.25 s.
Layer specification as
- first layer thickness ('firstLayerThickness')
- expansion ratio ('expansionRatio')
--> FOAM Warning :
    From Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 915
    Cannot find any patch or group names matching "(NACA)"
--> FOAM Warning :
    From Foam::layerParameters::layerParameters(const Foam::dictionary&, const Foam::polyBoundaryMesh&, bool)
    in file snappyHexMeshDriver/layerParameters/layerParameters.C at line 540
    Reading "system/snappyHexMeshDict.addLayersControls.layers" at line 225
    Layer specification for "(NACA)" does not match any patch.
Valid patches are 8(inlet outlet top Bottom front Back NACA_SurfaceBody<stlunit=M> NACA_FFF<stlunit=M>)

Shrinking and layer addition phase
----------------------------------

Using mesh parameters
{
    maxNonOrtho     75;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave      80;
    minVol          1e-13;
    minTetQuality   1e-15;
    minArea         -1;
    minTwist        0.02;
    minDeterminant  0.001;
    minFaceWeight   0.05;
    minVolRatio     0.01;
    minTriangleTwist -1;
    nSmoothScale    4;
    errorReduction  0.75;
}



Merging all faces of a cell
---------------------------
    - which are on the same patch
    - which make an angle < 60 degrees (cos:0.5)
    - as long as the resulting face doesn't become concave by more than 90 degrees
      (0=straight, 180=fully concave)

Wrote mesh in = 3.51 s.
Mesh snapped in = 32.37 s.
Layer specification as
- first layer thickness ('firstLayerThickness')
- expansion ratio ('expansionRatio')
--> FOAM Warning :
    From Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 915
    Cannot find any patch or group names matching "(NACA)"
--> FOAM Warning :
    From Foam::layerParameters::layerParameters(const Foam::dictionary&, const Foam::polyBoundaryMesh&, bool)
    in file snappyHexMeshDriver/layerParameters/layerParameters.C at line 540
    Reading "system/snappyHexMeshDict.addLayersControls.layers" at line 225
    Layer specification for "(NACA)" does not match any patch.
Valid patches are 8(inlet outlet top Bottom front Back NACA_SurfaceBody<stlunit=M> NACA_FFF<stlunit=M>)

Shrinking and layer addition phase
----------------------------------

Using mesh parameters
{
    maxNonOrtho     75;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave      80;
    minVol          1e-13;
    minTetQuality   1e-15;
    minArea         -1;
    minTwist        0.02;
    minDeterminant  0.001;
    minFaceWeight   0.05;
    minVolRatio     0.01;
    minTriangleTwist -1;
    nSmoothScale    4;
    errorReduction  0.75;
}



Merging all faces of a cell
---------------------------
    - which are on the same patch
    - which make an angle < 60 degrees (cos:0.5)
    - as long as the resulting face doesn't become concave by more than 90 degrees
      (0=straight, 180=fully concave)

Wrote mesh in = 0.63 s.
Layers added in = 0.63 s.
Checking final mesh ...
Checking faces in error :
    non-orthogonality > 75  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
Merging 0 sets of faces.

No faces merged ...

Merging all points on surface that
- are used by only two boundary faces and
- make an angle with a cosine of more than 0.5.

No straight edges simplified and no points removed ...

No layers to generate ...
Layer mesh : cells:57926  faces:188050  points:72606
Cells per refinement level:
    0   2734
    1   304
    2   984
    3   2960
    4   10048
    5   40896
Writing mesh to time constant
Merging 0 sets of faces.

No faces merged ...

Merging all points on surface that
- are used by only two boundary faces and
- make an angle with a cosine of more than 0.5.

No straight edges simplified and no points removed ...

No layers to generate ...
Layer mesh : cells:57926  faces:188050  points:72606
Cells per refinement level:
    0   2734
    1   304
    2   984
    3   2960
    4   10048
    5   40896
Writing mesh to time constant
    faces with face-decomposition tet quality < 1e-15      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.05        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Finished meshing without any errors
Finished meshing in = 74.97 s.
End

Wrote mesh in = 0.65 s.
Layers added in = 0.65 s.
Checking final mesh ...
Checking faces in error :
Wrote mesh in = 0.69 s.
Layers added in = 0.69 s.
Checking final mesh ...
Checking faces in error :
    non-orthogonality > 75  degrees                        : 0
    non-orthogonality > 75  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-15      : 0
    faces with face-decomposition tet quality < 1e-15      : 0
    faces with concavity > 80  degrees                     : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.05        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.05        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Finished meshing without any errors
Finished meshing in = 76.77 s.
End

    faces on cells with determinant < 0.001                : 0
Finished meshing without any errors
Finished meshing in = 76.84 s.
End
Attached Images
File Type: jpg Screenshot (180).jpg (144.1 KB, 13 views)
saeed jamshidi is offline   Reply With Quote

Old   November 16, 2023, 06:31
Default
  #19
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,065
Rep Power: 26
Yann will become famous soon enough
It's important to read logs! Here you go:

Code:
--> FOAM Warning :
    From Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 915
    Cannot find any patch or group names matching "(NACA)"
--> FOAM Warning :
    From Foam::layerParameters::layerParameters(const Foam::dictionary&, const Foam::polyBoundaryMesh&, bool)
    in file snappyHexMeshDriver/layerParameters/layerParameters.C at line 540
    Reading "system/snappyHexMeshDict.addLayersControls.layers" at line 225
    Layer specification for "(NACA)" does not match any patch.
Valid patches are 8(inlet outlet top Bottom front Back NACA_SurfaceBody<stlunit=M> NACA_FFF<stlunit=M>)
Your STL file probably contains 2 named surfaces (also referred as regions) : SurfaceBody<stlunit=M> and FFF<stlunit=M>

In order to apply layers on any patch starting by "NACA", you can define it like this:

Code:
	"NACA.*"
        {
            nSurfaceLayers 25; 
        }
Cheers,
Yann
saeed jamshidi likes this.
Yann is online now   Reply With Quote

Old   November 16, 2023, 06:55
Default
  #20
Senior Member
 
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7
saeed jamshidi is on a distinguished road
Well done Yann,

I got it, because I extruded an oval via symmetry in both direction. I think that was the reason of multiple surfaces creation. There is a roughness at the middle of oval too. I should work on my cad file.

Thank you again for your time.
Attached Images
File Type: jpg Screenshot (182).jpg (130.0 KB, 21 views)
Yann likes this.
saeed jamshidi 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
Run function objects on final time b.simpson OpenFOAM Post-Processing 3 September 19, 2022 20:09
[snappyHexMesh] Advice on limitations of SHM Tobermory OpenFOAM Meshing & Mesh Conversion 0 February 26, 2021 07:09
Multiple floating objects using InterDyMFoam and sixDoFRigidBodyMotion solver FloatingSolar OpenFOAM Running, Solving & CFD 4 December 29, 2020 11:09
[snappyHexMesh] SHM not snapping to some surfaces Swift OpenFOAM Meshing & Mesh Conversion 13 January 4, 2016 01:56
Using clip filter to acquire smooth interface sharonyue OpenFOAM Post-Processing 0 April 14, 2015 11:03


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