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

Can' get stl patch name for addLayers right?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 2, 2012, 09:10
Default Can' get stl patch name for addLayers right?
  #1
Member
 
Klaus
Join Date: Mar 2009
Posts: 65
Rep Power: 8
klausb is on a distinguished road
Hello,

I need to add layers to my wing boundary to ultimately resolve the boundary layer.

So far I was not able to get the patch name of the wing (wing.stl with the name wing) right so no layers were added. I know other people ran into the same problem but I couldn't find an answer.

How is this name defined?

What's the correct syntax in the snappyHexMeshDict?

Here the relevant sections of snappyHexMeshDict:

addLayers true; // true;
...

geometry
{
wing.stl
{
type triSurfaceMesh;
name wing;

regions
{
wing
{
name wing;
}
}
}

...

// Settings for the layer addition.
addLayersControls
{
relativeSizes true;

layers
{
wing
{
nSurfaceLayers 3;
}

}

Klaus
klausb is offline   Reply With Quote

Old   January 2, 2012, 10:25
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 445
Rep Power: 14
linnemann will become famous soon enough
Disable layers and note the name of the patches of the output.

It will probably be wing_solid.

If you open the stl file the first line will read.

solid some_name_here

If some_name_here is empty snappy will add _solid to the patch name.

If some_name_here is present snappy will add _some_name_here to the patch name.

This is the name you have to use for the layers.

So its the name of the final output patch, not geometry!
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   January 2, 2012, 10:59
Default Name is right but no layers added?!
  #3
Member
 
Klaus
Join Date: Mar 2009
Posts: 65
Rep Power: 8
klausb is on a distinguished road
Thank you for your feedback,

in my case even so the name defined in the stl file is wing (solid wing ...), the patch name accepted by OpenFoam is just wing - fixed.

Nevertheless, the problems remains, no layers are added - see attached picture, snappyHexMeshDict and log file.

What's wrong?

Klaus
Attached Images
File Type: jpg noLayers.jpg (98.5 KB, 23 views)
Attached Files
File Type: txt log.snappyHexMesh.txt (46.7 KB, 7 views)
File Type: txt snappyHexMeshDict.txt (9.8 KB, 11 views)
klausb is offline   Reply With Quote

Old   January 2, 2012, 19:31
Default
  #4
New Member
 
anonymous
Join Date: Jan 2012
Posts: 7
Rep Power: 5
PeterX30 is on a distinguished road
Most likely it will work when you change the layers definition entry

wing

in line 208 of your sHMdict into

wing_solid

If there is no specific region name specified in the STL then automatically the
created patch will get "_solid" at the end of the patch name.
PeterX30 is offline   Reply With Quote

Old   January 2, 2012, 19:48
Default There IS a specific region name in the stl file!
  #5
Member
 
Klaus
Join Date: Mar 2009
Posts: 65
Rep Power: 8
klausb is on a distinguished road
Hello,

There IS a specific region name in the stl file! It's wing (first line in the file is: solid wing)

I am aware of the naming in the first line of stl files.

That's why I am struggling with the error identification.

Klaus
klausb is offline   Reply With Quote

Old   January 3, 2012, 06:53
Default
  #6
New Member
 
Stefan
Join Date: Nov 2011
Posts: 4
Rep Power: 5
bobburnquist is on a distinguished road
Hi Klaus,
do you work with ascii or binary stl file?
You can change the name in the ascii file. In my case its:
solid part
---
endsolid part

You have to define this name in the sHMDict: nameofstl_part

But i have the same problems with the layers (see pictures)
I changed these values again and again.
Code:
finalLayerThickness 1;//0.3

    //- 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 0.5; //0.1
Hopefully we ll get a solution.
Attached Images
File Type: jpg rau.jpg (24.0 KB, 20 views)
bobburnquist is offline   Reply With Quote

Old   January 3, 2012, 06:55
Default
  #7
New Member
 
anonymous
Join Date: Jan 2012
Posts: 7
Rep Power: 5
PeterX30 is on a distinguished road
Check the log. Here the names of the patches are documented.
In your case it might be now :"wing_wing"
PeterX30 is offline   Reply With Quote

Old   January 3, 2012, 07:28
Default
  #8
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 445
Rep Power: 14
linnemann will become famous soon enough
Hi Again

When you do the regions thing in the snappyDict it does not add _name to the patch name.

Try and change the geometry section to this instead

Code:
geometry
{
    wing.stl
    {
        type triSurfaceMesh;
        regions
        {
            wing
            {
                name wing;
            }
        }
    }
If you notice its a little different from you initial post.

If this does not work its not a naming issue, but some settings.

If you want/can share the case using maybe a public dropbox link.

EDIT.

on a side note you have set

relativeSizes true;

and the

finalLayerThickness 0.002;

If relative is set to true its relative to the first cell height as I recall.
So 0.002 relative to the first cell height which is already small might get you below the tolerance and it will skip adding the layer.

what happens if you use the settings from the SHM flange tutorial?
just paste this in I've changed the names.

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

    // Per final patch (so not geometry!) the layer information
    layers
    {
        "wing.*"
        {
            nSurfaceLayers 3;
        }
    }

    // Expansion factor for layer mesh
    expansionRatio 1.2;


    //- Wanted thickness of final added cell layer. If multiple layers
    //  is the thickness of the layer furthest away from the wall.
    //  See relativeSizes parameter.
    finalLayerThickness 0.3;

    //- Minimum thickness of cell layer. If for any reason layer
    //  cannot be above minThickness do not add layer.
    //  See relativeSizes parameter.
    minThickness 0.25;

    //- 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.
    nGrow 0;


    // Advanced settings

    //- When not to extrude surface. 0 is flat surface, 90 is when two faces
    //  make straight angle.
    featureAngle 30;

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

    // 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 0.5;

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

    // Angle used to pick up medial axis points
    minMedianAxisAngle 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 50;

    // Max number of iterations after which relaxed meshQuality controls
    // get used. Up to nRelaxIter it uses the settings in meshQualityControls,
    // after nRelaxIter it uses the values in meshQualityControls::relaxed.
    nRelaxedIter 20;
}

Best
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


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