|
[Sponsors] |
[snappyHexMesh] SnappyHexMesh refuses to refine certain edges |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 2, 2012, 09:49 |
SnappyHexMesh refuses to refine certain edges
|
#1 |
New Member
Tom Potters
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
Dear all,
I have the following problem. I'm trying to mesh a radial fan with snappyHexMesh and for some reason it refines certain edges in the emesh file while it refuses to do it for others. Basically the blades are ok but the edges on the plates are not refined at all. Below you can find a picture of the mesh and the emesh file. The snappyHexMeshDict is also included in attachement. Anybody experienced this problem before? Tom |
|
May 2, 2012, 13:41 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Have you checked the eMesh files to ensure that the edge has been detected? Other than that, you may want to try changing the includedAngle option when running surfaceFeatureExtract. 91 seems to work pretty well for sharp edges.
|
|
May 3, 2012, 03:48 |
|
#3 |
New Member
Tom Potters
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
I investigated the issue somewhat further and so far this is what I found:
Tom |
|
May 3, 2012, 05:46 |
|
#4 | |
Member
|
Quote:
I don't know either what FeaturePoints are, but you might try the following (as you probably already did for viewing the features in parafoam): surfaceFeatureConvert TLR200x62E-real.eMesh TLR200x62E-real.obj Then import the "TLR200x62E-real.obj" in Blender (www.blender.org).
Now enter Edit Mode by hitting "tab". You may now select single vertices on your "circle"-feature-edge and delete a few, so not to have a full circle. After that, leave the Edit Mode by hitting "tab" again. Select all lines on screen using "Shift+RMC" or hit "A" twice. Then use "File -> Export -> Wavefront (.obj)" to export. You may now convert the .obj back to your .eMesh file by using surfaceFeatureConvert blender_edited_file.obj TLR200x62E-real.eMesh I know this is a little tricky, especially when not having used Blender before, but it's a good way to get exactly those feature lines you want. You may just attach your "stl", so we could give it a try. Greets from Berlin, SirWombat
__________________
~~~_/)~~~ |
||
May 3, 2012, 10:51 |
|
#5 |
New Member
Tom Potters
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
I agree that this is a workaround but not one I want to use when there are lots of these loops in my geometry. Also in blender I would not delete vertices because this removes the conected edges. It is better to select an edge (in edge select mode) an then press 'y'. This will separate this edge from the loop, effectively interupting the loop without loosing any valuable geometry. When you export to obj be sure to uncheck the export materials.
The resulting obj file isn't usable as such. Blender puts and f (probably from face) in front of the line definitions. This was quickly resolved by a find and replace in a text editor but it constitutes and extra step. Now you can convert the obj file back to the emesh format. But this file can't be used by snappyHexMesh. In the the header the time of creation is mentioned just before the object name. In a regular emesh file this is the location and snappyHexMesh needs the location or at least it doesn't like the creation date before the object name. The result of this procedure is shown below. For the ring I interupted the edges and for the plate I did not. Still I think snappyhexMesh should recognize edge loops for refinement. I also added the stl file with the plates in attachement. |
|
May 4, 2012, 04:24 |
|
#6 |
Member
|
Thx for the detailed description of the conversion from Blender .obj to OpenFOAM .eMesh I totally forget about that.
Seperating the edge instead of deleting a vertex seems a perfekt idea!
__________________
~~~_/)~~~ |
|
May 10, 2012, 09:15 |
|
#7 |
New Member
Tom Potters
Join Date: Jul 2009
Posts: 14
Rep Power: 17 |
A small update:
Feature points are points that are connected to more than 2 edges (e.g. corners of a cube). They are not the cause of the problems, because interrupting a loop actually brings down the number of connected edges. So far edge refinement works as long as we interrupt the loop or we detect nearly every edge in the geometry. We just don’t know why. There is something else I noticed. In the duct geometry for the fan I isolated the rim edge as a separate surface so that I could set a separate refinement level for it. Initially I only set the feature edge refinement level (of the rim) to a higher value but it didn’t refine near the rim. When I also raised the surface refinement level of the rim it still didn’t refine. Apparently I had to refine the attached housing geometry up to a certain level before it even noticed the rim. Once it “knows” it’s there everything again works as expected. Any thoughts on this? |
|
May 10, 2012, 10:14 |
|
#8 | |
Senior Member
|
This may be a silly question but have you tried increasing this value here:
Quote:
|
||
June 13, 2012, 09:45 |
|
#9 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
||
October 24, 2013, 11:31 |
|
#10 |
Member
R. P.
Join Date: Jul 2010
Posts: 73
Rep Power: 16 |
Hi all,
I'm having some problems to get a very defined curve using the sHM. Please, see images attached. Anyone have some idea in how to improve this part of my mesh ? I already tried the surfaceFeatureExtract and it didn't work. Thanks a lot. |
|
October 25, 2013, 07:13 |
|
#11 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Rophys,
you have to refine the cells in this Region. Therefor you have a lot of opportunitys to do that. a) Refine the surface there b) build a closed surface around this Corner and refine the Region there c) normally it should be possible to do it with the featureEdges (but as you said it is not working) Your Problem does not depend on the "surfaceFeatureExtract". This tool is for exploding the edges out of your geometry so that openfoam can snap the cell vertex to that lines. But if you have just one cell that goes around the whole curve it is not possible to get a better resolution Regards Tobi |
|
October 25, 2013, 07:34 |
|
#12 |
Member
R. P.
Join Date: Jul 2010
Posts: 73
Rep Power: 16 |
Thanks Tobi,
I'll try your hints. |
|
February 8, 2014, 05:58 |
|
#13 | |
New Member
Nejc Brelih
Join Date: Apr 2013
Posts: 5
Rep Power: 13 |
Quote:
Maybe you could try with the minVolCollapseRatio enabled under meshQualityControls. Regards, Nejc |
||
November 14, 2014, 22:39 |
surface refinement problem
|
#14 |
New Member
sd
Join Date: May 2014
Posts: 14
Rep Power: 12 |
I was able to creat a layer and refinement over surface but still found some refinement problem on surface. If anybody can give some idea ...........
FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; // make basic mesh ? snap true; // decide to snap back to surface ? addLayers true;//false; // decide to add viscous layers ? geometry // Load in STL files here { inlet_1.stl {type triSurfaceMesh; name inlet_1;} outlet.stl {type triSurfaceMesh; name outlet;} inlet_2.stl {type triSurfaceMesh; name inlet_2;} inlet_3.stl {type triSurfaceMesh; name inlet_3;} wall.stl {type triSurfaceMesh; name wall;} //cylinder.stl {type triSurfaceMesh; name volume;} refineCylinder {type searchableCylinder; point1 (0 0 0); point2 (0 0 2); radius 0.13;} //refinementBox {type searchableBox; min (-0.5 -0.5 -0.5); max ( 0.5 0.5 0.5);} }; castellatedMeshControls { maxLocalCells 1000000; //max cells per CPU core maxGlobalCells 2000000; //max cells to use before mesh deletion step minRefinementCells 10; //was 0 - zero means no bad cells are allowed during refinement stages maxLoadUnbalance 0.10; nCellsBetweenLevels 1; // expansion factor between each high & low refinement zone // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command ( {file "inlet_1.eMesh"; level 2;} {file "outlet.eMesh"; level 2;} {file "wall.eMesh"; level 3;} {file "inlet_2.eMesh"; level 2;} {file "inlet_3.eMesh"; level 2;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level { inlet_1 {level (2 2);} outlet {level (2 2);} wall {level (5 5);} inlet_2 {level (2 2);} // was 4 4 inlet_3 {level (2 2);} // was 4 4 } resolveFeatureAngle 80; // Resolve sharp angles // Default 30 refinementRegions // In descending levels of fine-ness {refineCylinder {mode distance; levels ((1E15 2));}} // (0.002 3) (0.01 2));}} // was ((0.001 4) (0.003 3) (0.01 2)) locationInMesh (0.01 0.01 0.01); //to decide which side of mesh to keep ** allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { nSmoothPatch 3; tolerance 4.0; nSolveIter 30; nRelaxIter 5; nFeatureSnapIter 15; // default is 10 // New settings from openfoam 2.2 onwards for SHMesh implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract explicitFeatureSnap true; // default is true multiRegionFeatureSnap false; // deafault is false - detects features between multiple surfaces } // Settings for the layer addition. addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName { relativeSizes false; // was true layers { wall {nSurfaceLayers 3;} // was 3 //visc_refine_1 // {nSurfaceLayers 3;} // was 3 //visc_refine_2 // {nSurfaceLayers 3;} // was 3 } expansionRatio 1.3; finalLayerThickness 0.00016; //was 0.00016 minThickness 0.00008; //was 0.00008 nGrow 0; // was 1 // Advanced settings featureAngle 80; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle. nRelaxIter 3; //- Max# of snapping relaxation iter. Should stop before upon reaching a correct mesh. nSmoothSurfaceNormals 1; // Number of smoothing iterations of surface normals nSmoothNormals 3; // Number of smoothing iterations of interior mesh movement direction nSmoothThickness 10; // Smooth layer thickness over surface patches maxFaceThicknessRatio 0.5; // Stop layer growth on highly warped cells maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large minMedianAxisAngle 130; // Angle used to pick up medial axis points nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations nLayerIter 50; // Overall max number of layer addition iterations } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minTetQuality 1e-9; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; // Advanced nSmoothScale 4; errorReduction 0.75; } // Advanced debug 0; // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1E-6; |
|
August 30, 2017, 11:19 |
Corner edge of cube are not detecting Sharply by snappy Hexamesh
|
#15 |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 12 |
Hello every one,
I have a simple Geometry of cube containing inlet , outlet and a solid cube, I am interested in studying the heat transfer by using chtMultiregionSimpleFoam. I have tried to mesh the geometry by by snappyHexamesh. The edges of the cube is not capturing properly by snappyHexamesh, the view of mesh is given below. I have changed the include angle from 150 to 180, still I am unable to solve this problem. I am attaching my blockMeshDict, snappyHexamesh and surfaceFeatureextractDict. I also have a problem of giving 10 layers with in a total layer thickness of 0.04m which is also failing. In another case it forms 7 layers on 0.5 maximum layer thickness and it is not forming at the corners of cube. Thanks In Advance Shadab |
|
Tags |
edge, feature, snappyhexmesh |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh sticking point | natty_king | OpenFOAM Meshing & Mesh Conversion | 11 | February 20, 2024 10:12 |
[snappyHexMesh] SnappyHexMesh running killed! | Mark JIN | OpenFOAM Meshing & Mesh Conversion | 7 | June 14, 2022 02:37 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
[snappyHexMesh] snappyHexMesh aborting | Tobi | OpenFOAM Meshing & Mesh Conversion | 0 | November 10, 2010 04:23 |