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

[snappyHexMesh] snappyHexMesh is not using the stl file

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By a_habib
  • 1 Post By christos

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2014, 12:15
Unhappy snappyHexMesh is not using the stl file
  #1
Member
 
a_habib's Avatar
 
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 11
a_habib is on a distinguished road
Hello every one, I'm training on the use of snappyHexMesh and during the procedure I'm having a problem,the snappyHexMesh is not using the triSurfaces so there is no cells to remove, it types these in the terminal:
(
Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 1(car.stl)
)
and
(
Not all entries in refinementRegions dictionary were used. The following entries were not used : 1(car.stl)
)
- the *.stl file where made once by SOLIDWORKS (ASCII format) and once by FreeCAD (ASCII format).
- the stl file is in the correct direction (constant/triSurface).
- the stl file is closed surface (I used surfaceCheck).
- the stl file is like this:
(( solid car
facet normal 0.991911 0.126938 0.000000
outer loop
vertex -0.026076 -0.011176 -0.033830
vertex -0.026017 -0.011637 -0.033390
.
.
.
vertex -0.025949 -0.012660 0.031710
endloop
endfacet
endsolid car))
- the stl file is in the center of the background mesh (I used paraview to make sure).
- the background mesh has the aspect ratio of 1 and an appropriate grid spacing (the stl file is much much bigger than the zero level cell.


so what to do
please help
a_habib is offline   Reply With Quote

Old   December 16, 2014, 12:33
Default
  #2
New Member
 
larry
Join Date: Jul 2014
Posts: 12
Rep Power: 12
christos is on a distinguished road
Hi Ahmad,

I am also new to OpenFOAM world. Can you post your snappyHexMeshDict file? Maybe during copy paste you have made an error in the geometry sub-directory of snappyHexMesh. Are you sure that the names corresponds to the .stl surfaces?
christos is offline   Reply With Quote

Old   December 16, 2014, 12:59
Default snappyHexMeshDict
  #3
Member
 
a_habib's Avatar
 
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 11
a_habib is on a distinguished road
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      snappyHexMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap            true;
addLayers       false;


geometry
{
    car.stl
    {
        type triSurfaceMesh;
        name cylinder;
    }

    refineBox
    {
        type searchableBox;
        min	(-0.1 -0.1 -0.1);
        max	(0.1 0.1 0.1);
    }
};



castellatedMeshControls
{

    maxLocalCells 10000000;

    maxGlobalCells 10000000;

    minRefinementCells 0;

    nCellsBetweenLevels 1;


    features
    (
    );

    refinementSurfaces
    {
        car.stl
        {
            // Surface-wise min and max refinement level
            level (4 4);
        }
    }

    resolveFeatureAngle 30;

    refinementRegions
    {
        refineBox
        {
            mode inside;
            levels ((1E15 2));
        }
        car.stl
        {
            mode distance;
            levels ((0.05 4) (0.1 3));
        }
    }


    locationInMesh (-0.19999 0.0001 0.0001);

      allowFreeStandingZoneFaces true;
}




snapControls
{
      nSmoothPatch 3;
    tolerance 1.0;
    nSolveIter 300;
    nRelaxIter 5;
        nFeatureSnapIter 10;
        implicitFeatureSnap false;
        explicitFeatureSnap true;
        multiRegionFeatureSnap true;
}



addLayersControls
{
       relativeSizes true;

  
    layers
    {
//        ""
//        {
//            nSurfaceLayers 1;
//        }
    }


    expansionRatio 1.0;

    finalLayerThickness 0.3;

    minThickness 0.25;

    nGrow 0;

    featureAngle 30;

    nRelaxIter 5;

    nSmoothSurfaceNormals 1;

    nSmoothNormals 3;

    nSmoothThickness 10;

    maxFaceThicknessRatio 0.5;

    maxThicknessToMedialRatio 0.3;


    minMedianAxisAngle 90;


    nBufferCellsNoExtrude 0;

    nLayerIter 50;

    nRelaxedIter 20;
}



meshQualityControls
{
    #include "meshQualityDict"

    relaxed
    {
 
        maxNonOrtho 75;
    }

    nSmoothScale 4;
 
    errorReduction 0.75;
}

writeFlags
(
    scalarLevels    // write volScalarField with cellLevel for postprocessing
    layerSets       // write cellSets, faceSets of faces in layer
    layerFields     // write volScalarField for layer coverage
);


mergeTolerance 1E-6;


// ************************************************************************* //

Last edited by a_habib; December 16, 2014 at 14:45.
a_habib is offline   Reply With Quote

Old   December 16, 2014, 13:08
Default
  #4
New Member
 
larry
Join Date: Jul 2014
Posts: 12
Rep Power: 12
christos is on a distinguished road
Hi Ahmad

Make the following modification and tell me if it works

Code:
geometry
{
    car.stl
    {
        type triSurfaceMesh;
        name car;
    }
christos is offline   Reply With Quote

Old   December 16, 2014, 14:10
Default
  #5
Member
 
a_habib's Avatar
 
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 11
a_habib is on a distinguished road
it didn't work and I don't know where the ''cylinder'' came from,
a_habib is offline   Reply With Quote

Old   December 16, 2014, 14:24
Default
  #6
New Member
 
larry
Join Date: Jul 2014
Posts: 12
Rep Power: 12
christos is on a distinguished road
Hi Ahmad,

I think that your snappyHexMeshDict is not correct. For example, you haven't included anything in the features sub-dictionary. I am not sure but for your case the feature subdictionary should be sth like that:

Code:
features
(

     {
            file "car.eMesh";
            level 2; 

     }


)
Try to change the features list. If it doesn't work again, look in a proper snappyHexMeshDict (e.x look the flange snappyHexMeshDict /tutorials/mesh/snappyHexMeshDict/flange) and find the differences with your own.
christos is offline   Reply With Quote

Old   December 16, 2014, 14:36
Default
  #7
Member
 
a_habib's Avatar
 
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 11
a_habib is on a distinguished road
look at this
Code:
Reading refinement surfaces.
--> FOAM Warning : 
    From function refinementSurfaces::refinementSurfaces(..)
    in file autoHexMesh/refinementSurfaces/refinementSurfaces.C at line 226
    Reading "/home/ahmad/my_tutorials/snappyHexMesh/car_snappyHexMesh_02/system/snappyHexMeshDict.castellatedMeshControls.refinementSurfaces" from line 70 to line 70
    Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 1(car.stl)
Read refinement surfaces in = 0.02 s

Reading refinement shells.
Refinement level 2 for all cells inside refineBox
--> FOAM Warning : 
    From function shellSurfaces::shellSurfaces(..)
    in file autoHexMesh/shellSurfaces/shellSurfaces.C at line 420
    Reading "/home/ahmad/my_tutorials/snappyHexMesh/car_snappyHexMesh_02/system/snappyHexMeshDict.castellatedMeshControls.refinementRegions" from line 82 to line 88
    Not all entries in refinementRegions dictionary were used. The following entries were not used : 1(car.stl)
Read refinement shells in = 0 s
a_habib is offline   Reply With Quote

Old   December 16, 2014, 17:33
Wink I Got It
  #8
Member
 
a_habib's Avatar
 
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 11
a_habib is on a distinguished road
this is the it:
Code:
    refinementSurfaces
    {
        car
        {
            level (3 3);
        }
    }

    resolveFeatureAngle 30;



    refinementRegions
    {
        refineBox
        {
            mode inside;
            levels ((1E15 1));
        }
        car
        {
            mode distance;
            levels ((0.05 3) (0.1 2));
        }
    }
I was using car.stl and the correct is car
katete and hogsonik like this.
a_habib is offline   Reply With Quote

Old   December 16, 2014, 17:50
Default
  #9
New Member
 
larry
Join Date: Jul 2014
Posts: 12
Rep Power: 12
christos is on a distinguished road
That's nice man!!

I am happy you solved your problem.

Regards, Christos
a_habib likes this.
christos is offline   Reply With Quote

Old   June 12, 2020, 18:36
Thumbs up Thank you contributors!
  #10
New Member
 
Morgan
Join Date: Jun 2020
Posts: 2
Rep Power: 0
mm_FOAM is on a distinguished road
The above posts were very helpful to me in troubleshooting my snappyHexMesh. Thanks all!
mm_FOAM is offline   Reply With Quote

Reply

Tags
help needed, snappyhexmesh, stl file


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
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 07:47
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46


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