checkMesh Erros after refineMesh
Hello,
I have a mesh that was created using snappyHexMesh that I am trying to refine using refineMesh, but after running refineMesh, checkMesh gives me errors. I am running an interFoam simulation and am trying to refine the mesh near the air/water interface. In order to use refineMesh, I first created a cellSet using topoSet based on the value of alpha and then used that to define which cells need to be refined. refineMesh completes without errors and based on visual inspection the correct locations seem to be refined. However, when I run checkMesh I get errors. My refineMeshDict and checkMesh output are below. I have tried to use patchLocal coordinates and geometricCut instead, but neither fixed the problem (although the results were different). If I change the directions so that it doesn't refine in the normal direction, checkMesh does not give errors but the refinement is not what I need (i.e. not refined in the z direction). I have also tried to visualize were the problems might be using foamToVTK but don't seem to be able to see the faces in paraFoam, I am guessing because maybe they are too small and spreadout. At this point I am stuck. There don't seem to be very many input parameters to change for refineMesh, so I am not sure what to do next. Thoughts? I have tried it in both 2.1.0 and 2.1.x with the same results. refineMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
hydro@Bass:rasWES-WithPier-Refined2$ checkMesh -time 0.001 |
I would also be interested in the solution regarding this. I'm trying to refine a structured purely hex mesh, and when refining in the z-direction checkMesh complains about non-ortho faces.
The smallest cells I'm trying to cut in the normal direction are 1-2m, which is not that small ... |
Unfortunately I have not been able to figure out what is happening or what is causing the problem.
As a workaround, since I am using snappyHexMesh to generate my mesh, I defined refinement regions in my SHM dictionary. The results in more cells being refined than really need to be but it worked OK. I would definitely still be interested in knowing how to resolve this if you figure it out. |
But snappy refinement region's feature does the same thing as refineMesh, so it's weird you're not getting errors also with SHM. It splits cells 2x2x2...
|
I agree that it is weird. The extent of the areas being refined are different between SHM and refineMesh because when using refinedMesh I selected my cells using topoSet to select the ones that had alpha1 between 0.001 and 0.999. When using SHM I made a series of boxes that encompass those same cells, which results in many cells more being refined. Could you try and use SHM without an stl file, or an stl file that is outside your mesh? How were you creating your cellSet for refineMesh?
|
I'm using SHM without STL file:
// Which of the steps to run castellatedMesh true; snap false; addLayers false; When using refineMesh, I select the cells with cellSet using the cellSetDict: boxToCell (400 400 40) (600 600 120) which is exactly the same principle in SHM with geometry { box { type searchableBox; min (400 400 40); max (600 600 120); } }; |
I am not 100% sure as I have an STL file in mine. I am actually running my analysis on my unrefined mesh that was generated using SHM, then running SHM again to generate a new mesh that has refinement regions specified, then mapping the first results to the refined mesh and running again. However, I would guess that what you have "castellatedMesh true;" would be fine - I don't expect that it will do anything as you aren't specifying a surface...hopefully it will still refine the refinement regions.
|
Quote:
The problem is that when it refines normally (z-direction), checkMesh complains about non ortho faces. Samething happens with refineMesh, which I dont understand since it's only cutting hex in 2x2x2 and it uses polyhedra for the transition between refinement levels. In refineMesh, when normal direction is commented, no problem in checkMesh! |
Just to follow-up on this, I have come up with a slightly better work around using SHM that doesn't result in refining more cells than needed as was the case when using refinement boxes. First create a cell set as if you were going to use refineMesh. Next, convert the cellSet to VTK using foamToVTK, then convert that to STL using the script in the post linked below. This STL can then be added to the SHM dict and used as a refinement region using mode inside.
http://www.cfd-online.com/Forums/ope...-openfoam.html Hope this helps someone else. |
What writePrecision do you have in system/controlDict?
I got similar errors after doing topoSet and refineMesh on a simple blockMesh.
Turned out I was running with too low writePrecision (= 3 because I need to write out A LOT of data and don't need all those decimals) in system/controlDict. Changing writePrecision to 4 removed all errors in the checkMesh. Hope this helped. |
Quote:
I saw your post and wish if you can help me. I want to refine a specific region(small box shape) inside my original region(big box). I am using OpenFOAM 2.1.1. I used toposet dict to set up the cellSet as a box. so basically I ran blockMesh, topoSet, then refineMesh. But the problem now I get all the domain refined including the small box which I want to just refine it. couled you please direct me? do I need to use another utility? Regards, Sandy13, |
All times are GMT -4. The time now is 01:57. |