SnappyHexMesh Not Refining Cells
1 Attachment(s)
Hi All,
I'm running into issues trying to get my mesh to refine near the surface. I have run SHM many times, and been able to get different levels of surface refinement across a variety of surfaces, but in this case I simply can't get any level of refinement, the cells are all the same size in the domain. SHM runs without any errors, and the STL snaps into the domain no problem. My blockMesh and SHM files are listed below, and a screenshot of what the domain looks like after Meshing is attached: BlockMesh convertToMeters 1; vertices ( (44 -2451510 -1765) (1465 -2451510 -1765) (1465 -2449783 -1765) (44 -2449783 -1765) (44 -2451510 -1400) (1465 -2451510 -1400) (1465 -2449783 -1400) (44 -2449783 -1400) ); blocks ( hex (0 1 2 3 4 5 6 7) (5 6 1) simpleGrading (1 1 1) ); edges ( ); boundary ( outlet { type patch; faces ( (0 4 7 3) (3 7 6 2) ); } inlet { type patch; faces ( (2 6 5 1) (1 5 4 0) ); } Mesa { type wall; faces ( (0 3 2 1) ); } top { type patch; faces ( (4 5 6 7) ); } ); mergePatchPairs ( ); snappyHexMesh /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers true; geometry { refinementBox { type searchableBox; min (0 -2451600 -2000); max (1470 -2440000 -1000); } Mesa { type triSurfaceMesh; file "Mesa.stl"; } }; castellatedMeshControls { maxLocalCells 2000000000; maxGlobalCells 2000000000; minRefinementCells 1; maxLoadUnbalance 0.10; nCellsBetweenLevels 1; features ( ); refinementSurfaces { Mesa { level (0 2); regions { refinementBox { level (3 3); } } } } resolveFeatureAngle 5; refinementRegions { refinementBox { mode inside; levels ((5 5)); } } locationInMesh (1000 -2450000 -1600); allowFreeStandingZoneFaces true; } snapControls { nSmoothPatch 3; tolerance 1.0; //was 2.0 nSolveIter 30; nRelaxIter 5; } addLayersControls { relativeSizes true; layers { } expansionRatio 1.0; finalLayerThickness 1; //was 0.3 minThickness 0.25; nGrow 0; 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 45; maxBoundarySkewness 10; maxInternalSkewness 2; maxConcave 80; minVol 1e-13; minTetQuality 1e-30; minArea -1; minTwist 0.05; minDeterminant 0.001; minFaceWeight 0.05; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; relaxed { maxNonOrtho 45; } } mergeTolerance 1e-5; // ************************************************** *********************** // Using this SHM script on other domains (switching relevant values out) has produced refinement before, but not in this case. If anyone could provide some insight that would be greatly appreciated |
This looks like an error to me. Do you write out a log file for your sHM-Runs? If you do, it should show an error. The refinementBox is not a region of Mesa, it should be a separate entry.
Code:
refinementSurfaces |
Hi Ato,
Thanks for the reply, I don't write out a log after it's finished I just watch it as it does it. It finishes with no errors and checkMesh produces no errors either. What do you mean regarding the refinement box? Apologies for the confusion |
CheckMesh wouldn't show errors, as you have the blockMesh it can work on.
I am not sure why you mention the refinementBox at all in refinementSurfaces subdictionary, but if you do, it should probably look like this Code:
refinementSurfaces Hopefully this helps. |
All times are GMT -4. The time now is 08:29. |