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

[snappyHexMesh] No the best edge refinment in my geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2019, 09:46
Default No the best edge refinment in my geometry
  #1
New Member
 
felipe ortega
Join Date: Sep 2019
Posts: 15
Rep Power: 6
flowwwww is on a distinguished road
hello everyone,
I am working in a convection oven, specifically in the duct that inyect the hot air.
I have been trying to mesh the geometry, but i have found some problems with the edges on a change section part and a curve part.
Captura de pantalla de 2019-10-11 23-58-38.png Vertical part. Upper -->change section/ Lower --> curve
Horizontal part. No problem


Captura de pantalla de 2019-10-11 23-57-45.png

Captura de pantalla de 2019-10-11 23-56-20.png
Here are some of the setted parameters.


*************

castellatedMesh true;
snap true;
addLayers false;

// Geometry.

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

inlet.stl
{
type triSurfaceMesh;
name inlet;
}

refinementBox
{
type searchableBox;
min (0.0 0.0 0.0 );
max ( 0.9 3.5 0.35 );
}

refinementCylinder1
{
type searchableCylinder;
point1 (0.9 0 0);
point2 (0.9 3.5 0);
radius 0.9;
}
castellatedMeshControls
{
maxLocalCells 100000;
maxGlobalCells 2000000;
minRefinementCells 10;
maxLoadUnbalance 0.10;
nCellsBetweenLevels 3;
// Explicit feature edge refinement
features
(

{
file "walls.eMesh";
level 3;
}
{
file "inlet.eMesh";
level 0;
}
refinementSurfaces
{
walls
{

level (2 2);

patchInfo
{
type wall;
inGroups (walls);
}
}
inlet
{
level (0 0);

patchInfo
{
type patch;
inGroups (inlet);
}
}
resolveFeatureAngle 5;
refinementRegions
{

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

refinementCylinder1
{
mode inside;
levels ((1E15 2));
}
locationInMesh (0.001 2.0 0.2);
allowFreeStandingZoneFaces true;


snapControls
{
nSmoothPatch 3;
tolerance 4.0;
nSolveIter 5;
nRelaxIter 5;

// Feature snapping

nFeatureSnapIter 0;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap true;
}


meshQualityControls
{

maxNonOrtho 90;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minVol -1e30;
minTetQuality 1e-30;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;

// Advanced

nSmoothScale 4;
errorReduction 0.75;
}
**********

In the other hand, i would like to ask if some of you know how to obtain a mesh inside the geometry besides the mesh in the geometry itself.



Thanks everyone.
flowwwww is offline   Reply With Quote

Old   October 15, 2019, 02:28
Default
  #2
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 55
Rep Power: 9
piotr.mecht is on a distinguished road
Your snapControls settings are very coarse:


nSolveIter of 5 might be waay to little. I often use 100-300 iterations in most cases (your shape is quite simple, so 100 could be more than enough).

You also use explicit feature snapping, but your nFeatureSnapIter value is 0, so it doesn't snap to any explicitly defined features (edges provided in walls.eMesh) at all.


Quote:
Originally Posted by flowwwww View Post
In the other hand, i would like to ask if some of you know how to obtain a mesh inside the geometry besides the mesh in the geometry itself.
What do you mean? Do you want to put an obstacle in your flow? You can provide another STL inside your channel, or you can provide STL with multiple solids defined

Last edited by piotr.mecht; October 15, 2019 at 02:50. Reason: answer fo the second question
piotr.mecht is offline   Reply With Quote

Old   October 15, 2019, 03:53
Default
  #3
Member
 
Damian Berghof
Join Date: May 2019
Posts: 41
Rep Power: 10
virengos will become famous soon enough
SnappyHexmesh is a really great mesher, but it comes with a steep learning curve though. For simple objects, like the duct, you could easily use the Salome software for meshing with a robust boundary layer and furthermore omit the blockmesh creation in OF. Let me know, if you need some further support on this.
best,
Damian
__________________
Get more support about Meshing with Salome and Visualization with ParaView in my growing groups
https://bit.ly/2lFfDkQ
https://bit.ly/2k2u8Pj
virengos is offline   Reply With Quote

Old   October 16, 2019, 10:49
Default
  #4
New Member
 
felipe ortega
Join Date: Sep 2019
Posts: 15
Rep Power: 6
flowwwww is on a distinguished road
Thanks Virgengos for the advice. I am a begginer in OpenFOAM and sHM, but i would like to learn this helpful tools now. Starting with problem with simple geometry.
flowwwww is offline   Reply With Quote

Old   October 16, 2019, 11:04
Default Update
  #5
New Member
 
felipe ortega
Join Date: Sep 2019
Posts: 15
Rep Power: 6
flowwwww is on a distinguished road
I adjusted some parameters according to the advices. My snap controls and meshqualitycontrols changed to the followings.


********

snapControls
{
nSmoothPatch 10;
tolerance 1.0;
nSolveIter 100;
nRelaxIter 5;

// Feature snapping

nFeatureSnapIter 35;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap true;
}


meshQualityControls
{

maxNonOrtho 90;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minVol -1e30;
minTetQuality 1e-30;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;

// Advanced

nSmoothScale 4;
errorReduction 0.75;
}
**********


This changes give me a way better mesh. But i still having some little problems.

foto1.png

foto2.png
I dont know if you have some ideas of small changes to improve it or this one is enough.

Best regards.

Last edited by flowwwww; October 16, 2019 at 16:29.
flowwwww is offline   Reply With Quote

Old   October 16, 2019, 13:30
Default
  #6
Member
 
Piotr Ładyński
Join Date: Apr 2017
Posts: 55
Rep Power: 9
piotr.mecht is on a distinguished road
It often requires some trial and error to make your best mesh..
I'd look at:
Code:
//- Relative distance for points to be attracted by surface feature point
    //  or edge. True distance is this factor times local
    //  maximum edge length.
    tolerance 1.0; //1.0;
or this duo:
Code:
//-    Existing cell edges are aligned with feature lines by default. 
    //    Unsuccessful alignment will result in concavity which consequently will lead to non-orthogonality 
    //    on the extruded mesh at the layer adding phase. 
    //    Where the mesh quality fails the extrusion is disabled. 
    //    Resulting in no prismatic layer coverage in the area. 
    //    The settings is typically followed by the layerTerminationAngle and detectExtrusionIsland 
    //    parameters in addLayerControls dictionary.
    //
    //    Sets the interval of iterations. Set to -1 to disable
    nFaceSplitInterval 2;
    
    //-    Angle at which the face is too concave and will be split. Default is 45 deg.
    concaveAngle 30;//40;
Sometimes, when you just change +1 or -1 cell in X, Y or Z in the background mesh the results are a bit different, so you can also play with this parameter.



There are some more keywords you can put into your snapControls:
https://www.openfoam.com/documentati...-snapping.html
piotr.mecht 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
[ICEM] Work with imported STL geometry KateEisenhower ANSYS Meshing & Geometry 2 July 9, 2015 10:46
[DesignModeler] Importing Solid Edge ST4 Geometry into Ansys Fluent 13.0 for meshing The Mighty Rearranger ANSYS Meshing & Geometry 0 November 27, 2012 12:44
[DesignModeler] extract edge of the geometry as input of the skethch Aysiyi ANSYS Meshing & Geometry 3 November 15, 2012 09:32
[ICEM] Hole near sharp trailing edge of airplane/wing geometry jlichtwa ANSYS Meshing & Geometry 2 September 21, 2010 15:19
vitual _ real deneb FLUENT 3 January 22, 2007 04:31


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