|
[Sponsors] |
April 13, 2022, 08:39 |
SnappyHexMesh Not Refining Cells
|
#1 |
New Member
Anon
Join Date: Dec 2020
Posts: 20
Rep Power: 6 |
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 |
|
April 13, 2022, 10:35 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
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 { Mesa { level (0 2); regions { refinementBox { level (3 3); } } } } |
|
April 14, 2022, 07:28 |
|
#3 |
New Member
Anon
Join Date: Dec 2020
Posts: 20
Rep Power: 6 |
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 |
|
April 15, 2022, 07:23 |
|
#4 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
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 { Mesa { level (0 2); } refinementBox { level (3 3); } } Hopefully this helps. |
|
Tags |
cfd, refine mesh, shm |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh running killed! | Mark JIN | OpenFOAM Meshing & Mesh Conversion | 7 | June 14, 2022 02:37 |
cellZone not taking all the cells inside | rahulksoni | OpenFOAM | 0 | January 16, 2019 02:16 |
Problem with divergence | TDK | FLUENT | 13 | December 14, 2018 07:00 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[snappyHexMesh] snappyHexMesh Segmentation Fault | avd28 | OpenFOAM Meshing & Mesh Conversion | 11 | May 11, 2015 21:32 |