5.3 Adaptation Procedure
5.3.1 Selection of Cells and Mesh Refinement
Selection of cells is performed by using the information about the error on the faces provided by the FREE. A hexahedral cell can be split parallel to a face without making any changes in other directions. This directional refinement results in re- duced computational cost as the number of the cells in the adapted mesh is smaller than in the case when the cells are split in all three directions.
Selection of cells for refinement also has an impact on the quality of the adapted mesh and it has to be performed in such a way that it does not have an adverse effect on accuracy. The accuracy may be reduced at the interface between the refined cells
and the rest of the mesh where split-hexahedron cells appear, Fig. 5.1. A split- hexahedron can have one or more split faces which obey the property that each split face can be shared with two or four neighbouring cells, Fig. 5.1. In Section 3.6 it was
1 2 3 4 6 0 5 7
Figure 5.1: A split-hexahedron cell with left face split in one direction shared with two cells. The top face is cross-split and shared with four cells
shown that split-hexahedra produce higher errors than the hexahedra for the same cell size when higher solution gradients are non-zero. This happens due to increased distance between the neighbouring nodes of the split face, Eqn. (3.78), skewness and non-orthogonality which reduce the quality of the mesh. It may therefore happen that the solution on the refined mesh has higher errors than on its parent mesh in the regions where split-hexahedra are present. To prevent this from happening, selection of cells for refinement is performed in two steps:
1. Compare the estimated error on the face ef with the specified upper limit E.
If:
ef > E, (5.1)
the face is marked and the adjacent cells are marked for refinement in the direction parallel to that face, Fig. 5.2. This reduces the distance between the neighbouring nodes which are the main contributors to the error on that face. Therefore, the directional information about the error is directly used to drive the adaptation.
This rule has exceptions. If the marked face is a split face of a split-hexahedron, only the split-hexahedron cell is split such that the face is not a split face any more, in order to minimise skewness, non-orthogonality and the distance between the neighbouring nodes, as shown in Fig. 5.3.
5.3 Adaptation Procedure 111
marked face
Marked face Refined mesh
Figure 5.2: Directional splitting of cells
l h h "split−hexahedron" |d| 0.25l h marked face h h 0.5l 0.5l |d| = h
Before refinement After refinement Figure 5.3: Refinement of split-hexahedron cells
If the flow under consideration is turbulent and a high-Re model with wall- functions is used, it is necessary to ensure that the wall-functions is still valid on the refined mesh by not allowing refinement of the near-wall cells parallel to the wall if Y+ <50.
2. The second step is aimed to make the estimated error reduce monotonically with mesh refinement and to minimise the number of cycles required to achieve the desired accuracy. Fig. 5.4 shows that the distance between neighbouring
h h |d| = h l marked face l h h "split−hexahedron" |d| 0.25l h
Before refinement After refinement Figure 5.4: Node distances at a split face
nodes increases at the boundary between the refined regions and the rest of the mesh. The ratior between node distances before and after the face is split is: r= s h2+ l2 16 h2 , (5.2)
whereh andl are the cell height and the cell length, respectively, see Fig. 5.4. This ratio may become large for high aspect ratio cells wherel >> h. Eqs. (4.42) and (4.45) show that the FREE is dependent on the square of the distance between neighbouring nodes. Taking that into account, it is possible to ap- proximate the estimated solution error on the refined mesh before the refined mesh and the solution on that mesh are known and before the error estimation on the refined mesh is performed. The approximated estimated error on the faces of the refined mesh created from a face of the parent mesh which should become a split face of a split-hexahedron is:
eaf terRef ≈r2ef. (5.3)
where ef is the estimated error in the solution on the parent mesh and r is
5.3 Adaptation Procedure 113 which is not a true estimated error because the refined mesh is not known at this stage. It is an approximation of the estimated error which is used to detect regions where split-hexahedra may have a large influence on the accuracy. If: eaf terRef < E, (5.4)
then this is not considered a problematic region because it is unlikely to have the estimated error in the solution on the refined mesh above the upper limit E. If Eqn. (5.4) is not true, it is very likely to have the estimated error above the required upper limit once the refined mesh and the solution on that mesh are known. To prevent this from happening, the cell which would become a split-hexahedron is marked for refinement such that it does not become a split-hexahedron. This process is shown in Fig. 5.5 and it is repeated until
marked face
(a) Faces selected after step 1.
afterRef e eafterRef afterRef e eafterRef < E < E < E > E Marked face
(b) Checking of errors on faces which will become split faces of split-hexahedra
Marked face
(c) Final selection of cells for re- finement
Figure 5.5: Additional splitting of cells
Eqn. (5.4) is satisfied for every face which may become a split face of the split-hexahedron. By doing this it is possible to reduce the number of cycles required to reach the required error level because the regions where split-
hexahedra may cause problems are treated in the current cycle instead of one cycle after another.
The equations of continuum mechanics are coupled and non-linear, so the errors in a given variable field can have an impact on the accuracy of the solutions of the other equations. The errors are therefore estimated for every field and the selection of cells for refinement is performed for all error fields except the pressure. The error is the pressure field is closely related to the error in the velocity field.
Mesh Refinement Procedure
So far cells have been marked for refinement in the directions required by the error estimator. Before the refined mesh is generated it is necessary to check if it will consist of cells types which are either a hexahedron or a split-hexahedron defined above and shown in Fig. 5.1. In order to satisfy this requirement it is sometimes necessary to split some additional cells or add some additional directions to cells already marked for refinement.
The combinations which are not allowed and their remedies are:
• If the two neighbours which share a split face of a split-hexahedron need to be split such that the split face changes, the split-hexahedron is split into two new cells to ensure that the refined mesh consists only of hexahedra and split- hexahedra, Fig. 5.6.
Selected cells Refined mesh
Figure 5.6: Consistency over a split face in 2D (dotted lines represent the selected refinement)
• In any of the four neighbouring cells of a cross-split face of a split-hexahedron should be split such that the cross-split face changes, the split-hexahedron should be split into four cells as in Fig. 5.7.
5.3 Adaptation Procedure 115
Selected cells Refined mesh
Figure 5.7: Consistency over a cross-split face in 3D (dotted lines represent the selected refinement)
• It may also happen that two neighbouring cells should be split such that their shared face is cross-split. In such case both cells are split in two directions, Fig. 5.8.
Selected cells Refined mesh
Figure 5.8: Treatment of incompatible cell splitting directions in 3D (dotted lines represent the selected refinement) This final step is needed to ensure that the refined mesh can be refined again by using the same rules. Otherwise the mesh after every cycle of refinement might require additional rules to treat new combinations and new cell types. It also serves the purpose of preserving mesh quality by not allowing abrupt changes between the refined and coarse regions.