CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Mesh quality improvement (http://www.cfd-online.com/Forums/openfoam/97298-mesh-quality-improvement.html)

anon_a February 14, 2012 06:29

Mesh quality improvement
 
Hello Foamers

I have a simple mesh generated by blockMesh, which however contains some "bad" cells. I generate sets for these cells with "checkMesh -allTopology -allGeometry" and can visualize them in paraView after isolating them with "setSet -batch makeCellSets.setSet" and "subsetMesh badCells". However, I have not been able to fix them.

Is there a non-manual (scriptable) way of using the foam mesh manipulation utilities in which I could fix the "bad" cells? I am looking for a combination of the mesh manipulation tools that can improve the quality of my mesh, mostly in terms of simulation stability.

Sorry if the question is rather vague or this information has been posted elsewhere but I have not been able to find it.

anon_a February 20, 2012 09:19

Bump. I would appreciate an answer, even if it's negative.
I wonder what I am doing so wrong and no one answers my posts :confused:

wyldckat February 20, 2012 10:04

Greetings anon_a,

AFAIK, no, there is no utility in OpenFOAM that fixes bad cells. The standard is to do things right the first time around.

Nonetheless, there are a few things that might come in handy in some situations:
  • "applications/utilities/mesh/advanced/removeFaces" - should be able to remove excess faces that are between cells.
  • "applications/utilities/mesh/advanced/modifyMesh" - can do limited mesh manipulation, such as collapsing edges, which might be useful for taking out skew faces.
But, if the problem you are getting is with blockMesh, then it's you who is doing things wrong ;) Try:
Code:

paraFoam -block
This can help you visualize and diagnose what you might be wrongly defining on "blockMeshDict" ;)

Best regards,
Bruno

anon_a February 20, 2012 11:47

Ok, I was sure I was the one doing it wrong :-D
My geometry is slightly more complicated than I can handle with blockMesh anymore, so I guess I will try something else.

I was asking because I would prefer to adapt the mesh to the changes in the flow along with time. For example, create the blockMesh in the beginning, run the simulation for 1ms, refine/remove cells, correct the "bad" cells, resume the simulation for 1 ms and so on. I am sure someone must have done something similar, right?

Thanks a lot for the answer Bruno!

wyldckat February 20, 2012 12:59

Ah, then that's a whole other ball game...
See the tutorials that use dynamic meshes, because there are several that use point displacement. But I've yet to understand how they work :(

anon_a February 20, 2012 13:08

I was afraid you were going to say that...
So the keyword here is point displacement, I will look for that.
Thanks :-)


All times are GMT -4. The time now is 00:37.