|
[Sponsors] |
[snappyHexMesh] addLayers issues on cylinder base surface |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: May 2019
Location: Paris, France
Posts: 7
Rep Power: 7 ![]() |
Hello,
I am currently a student and new to openFoam and as part of my intership I have to make some simulation with this software. I am now trying to mesh a cylinder so thereafter I can simulate some reacting flow inside. My problem right now is that my layers are collapsed on the surface of my cylinder. In both my inlet and outlet my layers are not surrounding the surface as you can see on the image attached. (one image is the inlet face the other is a the view when I cut the inlet in its half) I post my code here : Code:
// Which of the steps to run castellatedMesh true; // make basic mesh ? snap true; // decide to snap back to surface ? addLayers true; // decide to add viscous layers ? geometry // Load in STL files here { cylindre { type triSurfaceMesh; file "cylindremm.stl"; regions { patch0 {name inlet;} patch1 {name tube;} patch2 {name outlet;} } } refinementCylinder { type searchableCylinder; point1 (0 0 0); point2 (0 2 0); radius 0.1; } }; castellatedMeshControls { maxLocalCells 3000000; //max cells per CPU core //1000000 maxGlobalCells 10000000; //max cells to use before mesh deletion step //2000000 minRefinementCells 0; // zero means no bad cells are allowed during refinement stages maxLoadUnbalance 0.10; nCellsBetweenLevels 5; // 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 "cylindremm.eMesh"; level 0;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level { cylindre { // Global surface-wise min and max refinement level level (0 0); // Local surface-wise min and max refinement level // You will need to use the name given in the STL file regions { patch0 //inlet { level (2 2); patchInfo { type patch; } } patch1 //tube { level (2 2); patchInfo { type wall; } } patch2 //outlet { level (2 2); patchInfo { type patch; } } } } } resolveFeatureAngle 15; // Resolve sharp angles // Default 30 refinementRegions // In descending levels of fine-ness { cylindre { mode inside; levels ((1e-4 2)); } } locationInMesh (0 1 0) ; //to decide which side of mesh to keep ** allowFreeStandingZoneFaces false; } // Settings for the snapping. snapControls { nSmoothPatch 5; tolerance 7; nSolveIter 150; nRelaxIter 20; nFeatureSnapIter 20; // 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 { relativeSizes true; expansionRatio 1.2; finalLayerThickness 0.6; minThickness 0.02; //firstLayerThickness 0.01 layers { tube { nSurfaceLayers 5; } } // Advanced settings featureAngle 130; slipFeatureAngle 30; nGrow 0; nLayerIter 50; nRelaxedIter 20; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedialAxisAngle 90; minMedianAxisAngle 90; nMedialAxisIter 10; nBufferCellsNoExtrude 0; additionalReporting false; } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { maxNonOrtho 70; maxBoundarySkewness 4; 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; relaxed { maxNonOrtho 75; //maxBoundarySkewness 25; //maxInternalSkewness 8; } } // Advanced debug 0; //// Write flags writeFlags ( scalarLevels // write volScalarField with cellLevel for postprocessing layerSets // write cellSets, faceSets of faces in layer layerFields // write volScalarField for layer coverage ); // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1E-6; // ************************************************************************* // If anyone can see what’s wrong with my case and that could help me with this issue that would be nice, thank you ![]() |
|
![]() |
![]() |
![]() |
Tags |
addlayer, snappyhexmesh |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Surface triangulation using snappyHexMesh | shaileshbg | OpenFOAM Meshing & Mesh Conversion | 4 | October 17, 2019 04:42 |
CFX convergence issues with free surface | adenlan | CFX | 3 | September 2, 2011 06:43 |
surface and base of cylinder | susan | CFX | 4 | December 16, 2007 16:52 |
Normal - Helical Surface | m. malik | Main CFD Forum | 3 | February 3, 2006 12:56 |
base pressure for circular cylinder | fpz | Main CFD Forum | 7 | June 20, 2005 21:30 |