# finite volume method: unstructured mesh vs octree adaptation + cell cutting

I'm working with the OpenFOAM C++ Computational Continuum Mechanics library (it can deal with fluid-solid interaction, MHD flows...) which uses arbitrary unstructured meshes. This was driven by the idea of using the advantage of fast generation (automatic usually) of unstructured meshes to simulate problems in complex geometries.

However, recently I've encountered another approach: octree adaptive carthesian meshes with cell "cutting", where the agressive mesh refinement is used to describe a complex geometry.

From the standpoint of the numerics, Carthesian meshes are much more accurate, so my question is: has anyone experience in using/implementing one or both of these approaches? How do they compare agains each other?

I'm developing codes for two phase fluid flow and I noticed e.g. that the reconstruction of the field gradients can be easily made more accurate on Carthesian meshes, while unstructured mesh requires linear regression for abrupt changes in the field...

• Another alternative: cartesian cut-cell methods. There is a large literature; this paper may be a good starting place: dx.doi.org/10.1016/S0378-4754(02)00107-6. Dec 22 '11 at 5:04

I think all the more modern FEM libraries (e.g. deal.II, libmesh, ...) use the octree-based scheme (or, to be more precise: oct-forests, with one tree starting from each cell of an unstructured coarse mesh). There are many advantages to this, primarily because you know the hierarchy of mesh cells. This implies that you can easily do coarsening, geometric multigrid, etc, all of which is incredibly difficult if you start with just a fine unstructured mesh. Furthermore, partitioning becomes an almost trivial problem. The downside of the approach is that if you have a complicated geometry, previously you only needed to describe it to the mesh generator whereas now you also have to describe it to the FEM code because you need the geometry when refining a cell that's located on the boundary.

All else being equal, I think that the octree-based approach is far more flexible and useful than using one ginormous unstructured mesh.

• I dint't mean that I would use a large unstructured mesh. The refinement is octree based, but there is a difference in accuracy if you compare a carthesian octree refined mesh, and an unstructured octree refined mesh. Unstructured meshes have been pushed by the industry in hope of automatic (at least fast) mesh generation for complex geometries, but now, cell cutting + carthesian meshes seems to do the job quite fast as well, with additional numerical accuracy provided by the structured nature of the mesh... Jan 6 '12 at 11:55
• I thought that I have accepted this answer already.. :) Sorry for the delay. Jul 7 '12 at 10:13

Dynamic $h$-adaptive mesh refinement is very effective for picking up isotropic features of the solution. Many AMR implementation enforce a refinement criterion like $2:1$ for octree refinement. This sometimes leads to a larger refined region than necessary, but usually some geometric grading is necessary anyway and different AMR implementations can keep the refinement localized within a modest constant factor of the best unstructured refined mesh.

Where $h$-AMR has the most trouble is capturing anisotropic features, because $h$-AMR does not have a way to rotate the coordinates to conform to these anisotropic features. For example, high Reynolds number CFD has extremely thin boundary layers and meshes with aspect ratio of $10^6$ or higher are used in many industrial simulations. Capturing such thin boundaries with an unaligned structured grid is quite inefficient. There are ways to nest locally rotated grids, but these methods are quite technical and outside the scope of octree refinement or cut-cell methods. Note that moving mesh methods (often called $r$-refinement, Huang and Russell's recent book is a good resource) can be used to align to moving anisotropic features.

Also note that implicit time discretization and the method of lines are simpler and have nicer properties for methods in which the number of dofs and connectivity of the mesh is not changing. Additionally, provided the physics and spatial discretization is continuously differentiable, there will be a continuous adjoint (useful for sensitivity analysis, optimization, uncertainty quantification, etc).

The best choice is highly problem dependent, but for CFD problems with thin boundary layers, especially when using wall resolution instead of wall modeling, unstructured or block-structured conforming meshes are good choices.

Structured grids allow for a lot of assumptions that can be exploited for performance but are generally more difficult to implement and less efficient to perform than unstructured grids in presence of complex boundaries. Unstructured grids will efficiently approximate complex boundaries at no additional programming but very few assumptions can be made about the matrix structure. As always, there is no better approach other than the one better suited for your needs. The former is often employed in ocean, climate, cosmo/geo modeling, the latter in engineering problems.