|
[Sponsors] |
March 8, 2013, 04:20 |
SnappyHexMesh cylinder 2D
|
#1 |
New Member
Matthijs Zweemer
Join Date: Feb 2013
Posts: 5
Rep Power: 13 |
Good morning!
Currently working on a 2d problem where I would like to cut out a perfect cylinder shape from the mesh by using the SnappyHexMesh tool. Problems I'm facing are the shape of the cylinder which isn't perfect (there are some bumps in the cylinder, even when decreasing the mesh size), and is it possible to prevent cells to become triangular shaped (as the cells which lay next to the ones generated with 'addlayercontrols')? Underneath you can find my snappyHexMeshDict and a figure of the mesh. Thanks! ------------------- /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ 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 geometry { outCylinder { type searchableCylinder; point1 (900e-5 100e-5 0); point2 (900e-5 100e-5 1e-5); radius 50.0e-5; } }; castellatedMeshControls maxLocalCells 100000; maxGlobalCells 2000000; minRefinementCells 0; maxLoadUnbalance 0.10; nCellsBetweenLevels 1; refinementSurfaces { outCylinder { level (0 0); } } resolveFeatureAngle 30; // Region-wise refinement refinementRegions { outCylinder { mode outside; levels ((1.0 0)); } } // Mesh selection locationInMesh (1200.001e-5 100.001e-5 0.001e-5); snapControls { nSmoothPatch 5; tolerance 2.0; nSolveIter 30; nRelaxIter 5; } addLayersControls { relativeSizes true; layers { outCylinder_region0 { nSurfaceLayers 8; } } expansionRatio 1.0; finalLayerThickness 1.0; minThickness 0.25; nGrow 0; // Advanced settings featureAngle 60; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; nRelaxedIter 20; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minVol 1e-18; minTetQuality 1e-9; minArea -1; minTwist 0.05; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; //minVolCollapseRatio 0.5; // Advanced nSmoothScale 4; errorReduction 0.75; relaxed { maxNonOrtho 75; } } // Advanced debug 0; mergeTolerance 1e-6; // ************************************************** *********************** // Last edited by mzweemer; March 8, 2013 at 06:38. |
|
March 27, 2013, 07:53 |
|
#3 |
New Member
Matthijs Zweemer
Join Date: Feb 2013
Posts: 5
Rep Power: 13 |
Hi Skeptik,
I've already improved my current mesh but too bad there is no way to get rid of the triangular shaped grid cells. The bumps I ment can be seen at the inner wall of the cyllinder. But I have got rid of them by running SnappyHexMesh a second time, adding some additional layers on the inside of the cyllinder. Herewith the cyllinder became perfectly round! |
|
March 27, 2013, 09:14 |
|
#4 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
Alternatively, if you are interested in cylinders only (and don't want to use it as a simple test case for complex geometries), you could go for a blockMesh-created cylinder. Have a look at the forum, there should be some examples that use m4 macro processor utility. But to be honest - doesn't the mesh look nice enough?
Arne |
|
March 27, 2013, 10:58 |
|
#5 |
New Member
Matthijs Zweemer
Join Date: Feb 2013
Posts: 5
Rep Power: 13 |
Hi Arne,
The fact is that I'm interested in the behavior of a bubble in liquid passing this cylinder. The minor errors on the cylinder wall influences the break-up of the bubble, so a perfect shaped cylinder is what I want. I have been struggeling with the blockMesh-created cylinder as well, but that took me to long. Matthijs |
|
March 27, 2013, 14:07 |
|
#6 | |
Member
|
Quote:
blockMesh is better. espesially when you have analytical surfaces.
__________________
practice makes perfect |
||
March 28, 2013, 04:34 |
|
#7 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18 |
That's what I think as well. Especially when you want to compare your results with analytical solutions, you should have a 'perfect' shape. sHM does not provide this.
|
|
Tags |
2d problem, cylinder, snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Create cylinder around snappyHexMesh for MRF/rotating | linnemann | OpenFOAM Meshing & Mesh Conversion | 6 | October 20, 2014 00:19 |
[snappyHexMesh] snappyHexMesh - 2D Cylinder Problems | Logan Page | OpenFOAM Meshing & Mesh Conversion | 4 | May 27, 2013 13:07 |
Incorrect Drag and Drag Coefficient for flow over a cylinder | ozzythewise | Main CFD Forum | 8 | June 13, 2012 07:24 |
[snappyHexMesh] SnappyHexMesh Meshing inside a cylinder | nammari | OpenFOAM Meshing & Mesh Conversion | 5 | March 11, 2011 20:49 |
[blockMesh] Specifying boundary faces failes in blockMesh | blaise | OpenFOAM Meshing & Mesh Conversion | 0 | May 10, 2010 04:56 |