CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [cfMesh] Difficulties in using cfMesh: division is not uniform (https://www.cfd-online.com/Forums/openfoam-community-contributions/152547-difficulties-using-cfmesh-division-not-uniform.html)

rnburne May 3, 2015 13:28

Difficulties in using cfMesh: division is not uniform
 
3 Attachment(s)
If cfMesh is given a unit cube (side=1) and a maxCellSize of .1 , with the intent of creating 10 divisions, it divides the sides into 18 parts. If the maxCellSize is changed to .101 , it does indeed divide the sides into 10 parts. However, the division is not uniform. The cells range in size from .087 to .115 with an aspect ratio of up to 1.35 (pic A) . Is it possible to force a uniform division?
Also, when working with a refinement zone within the unit cube (thru objectRefinements) another undesired result occurs: cells with nonparallel sides (pic B) . Can this be controlled or overcome?

Ron

franjo_j May 4, 2015 08:39

Re: Difficulties in using cfMesh: division is not uniform
 
There are a few things you can try to get the desired behaviour.
1. Do not insert boundary layers by commenting out generateBoundaryLayers() function from the generateMesh function in cartesianMeshGenerator.C. This will deteriorate mesh quality in 99.99% of realistic cases, and hence cartesianMesh always generates additional cells. However, you may safely turn it off for the purpose of meshing a cube.
2. Non-parallel cells occur as a consequence of mesh smoothing. You can turn of the laplacian smoother in the function optimizeMeshFV() in optimizeMeshFV.C. This will preserve orthogonal lines in mesh, and will probably increase meshing times once you start running complex geometries.

I hope this helps you solve your problems.

rnburne May 6, 2015 21:44

Franjo, thanks for the help.
After playing with the problem I have concluded that the cells with nonparallel walls will occur only where there is a transition from one refinement level to another.......and nowhere else. And, unfortunately, turning off the smoother has no effect.


All times are GMT -4. The time now is 04:18.