Number of cells in mesh don't match with size of cellLevel
Hi Foamers,
I encountered an other error message which I couldn't get rid of (note that I deleted the header) Code:
According to further comparison of execution times the failure must be somwhere during the refinement but I couldn't figure out where. For complementation here the snappyHexMeshDict file (also without header): Code:
// Which of the steps to run Thanks for your trouble regards Colin |
Either remove the 1/ 2/ 3/ folders before you run again or implement the following settings in controlDict:
startFrom startTime; startTime 0; |
Hi ziad,
unfortunately this seems to be not the problem for I don't have any 1/ 2/ 3/ folders and the starting time is already set to 0 too. However the case directory is indeed copied from an other case and contains some data from the original one. Could it be that I have to look for an other file/ folder that I have to change before I can run sHM? However thanks for your help ziad, I appreciate it. regards Colin |
Yeah that could be it. It helps to have your settings and cases in order anyway.
Do the blockMeshDict and snappyHexMeshDict correspond to each other? |
you also have pretty huge numbers in your original error message. Number of cells in mesh is 1319790 and cellLevel 1487102.
Is your original starting mesh already developed? If so delete it and reset blockMeshDict to give you the simplest possible mesh without any geometry detail inside. sHM takes care of that. It's explained very clearly in the user's guide. |
Hi Ziad,
thanks again for your help, also for the hint with the user guide. Finally I managed to get rid of that error message. I just forgot to replace my alpha1 file by a new copy of my alpha1.org file and after doing so everything worked out fine. The number of cells is indeed very big, but this has something to do with the domain size which is also very big (somewhat about 4-5 mio m^3). best regards Colin |
Glad it worked out.
Enjoy! |
I have also seen this before. Getting rid of the constant/polyMesh/refinementHistory file seemed to fix this for me.
|
Quote:
|
this has to do with the way OF saves the mesh. usually intermediate steps are stored in the 1 and 2 folder and the final mesh in the 3 folder as far as I understood. so when you open paraview you can click through the timeline and see different meshes from 0 to 3.
To supress this you have to type: snappyHexMesh -overwrite instead of only snappyHexMesh hope that helps regards Colin |
For anyone still struggling with such a problem, I solved mine by removing the 0 directory which was already containing data from a refined mesh.
Hope this can help. -Louis |
hi,
I have the same error message when using sHM. I already tried the tips posted here but it is still not running :-( I have to say that Im new to OpenFOAM so it might be a really stupid mistake. Thank you very much in advance for your help :) -> FOAM FATAL ERROR: Number of cells in mesh:512000 does not equal size of cellLevel:5829368 This might be because of a restart with inconsistent cellLevel. From function hexRef8::getLevel0EdgeLength() const in file polyTopoChange/polyTopoChange/hexRef8.C at line 358. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::hexRef8::getLevel0EdgeLength() const at ??:? #3 Foam::hexRef8::hexRef8(Foam::polyMesh const&, bool) at ??:? #4 Foam::meshRefinement::meshRefinement(Foam::fvMesh& , double, bool, Foam::refinementSurfaces const&, Foam::refinementFeatures const&, Foam::shellSurfaces const&) at ??:? #5 at ??:? #6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #7 at ??:? Aborted (core dumped) I used the motorbike sHMDict file and changed it were needed (well at least the stl names). It now looks like this: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.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 false; geometry { UCAV.stl { type triSurfaceMesh; name UCAV; } // refinementBox // { // type searchableBox; // min (-1.0 -0.7 0.0); // max ( 8.0 0.7 2.5); // } }; // Settings for the castellatedMesh generation. castellatedMeshControls { // Refinement parameters // ~~~~~~~~~~~~~~~~~~~~~ maxLocalCells 100000; maxGlobalCells 2000000; minRefinementCells 10; maxLoadUnbalance 0.10; nCellsBetweenLevels 3; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ features ( { file "UCAV.eMesh"; level 6; } ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces { motorBike { level (5 6); patchInfo { type wall; inGroups (motorBikeGroup); } } } // Resolve sharp angles resolveFeatureAngle 30; // Region-wise refinement // ~~~~~~~~~~~~~~~~~~~~~~ refinementRegions { refinementBox { mode inside; levels ((1E15 4)); } } // Mesh selection // ~~~~~~~~~~~~~~ locationInMesh (0 0 0); allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { nSmoothPatch 3; / tolerance 2.0; nSolveIter 30; nRelaxIter 5; // Feature snapping nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } // Settings for the layer addition. addLayersControls { relativeSizes true; layers { "(lowerWall|motorBike).*" { nSurfaceLayers 1; } } expansionRatio 1.0; finalLayerThickness 0.3; minThickness 0.1; nGrow 0; // Advanced settings featureAngle 60; slipFeatureAngle 30; nRelaxIter 3; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; } meshQualityControls { #include "meshQualityDict" // Advanced nSmoothScale 4; errorReduction 0.75; } // Advanced / writeFlags ( layerFields ); mergeTolerance 1e-6; |
did you solve this problem?
did you solve this problem? i have the same problem with my OF 2.1 and the flange tutorial
|
Sorry for updating this old thread, but I thought I might share my solution.
I had the same problem and deleted the folder "polyMesh" in /constant - now it works. I was using the case folder from an earlier project, that's probably why. |
Solved
Deleting the polyMesh directory solves the problem. There are some references ( Like the files celllevel, pointLevel etc. ) made about the mesh which do not hold when you re-run snappyHexMesh.
|
All times are GMT -4. The time now is 04:28. |