5.2.3 Cell-Centred versus Median-Dual Scheme 单元中心格式与中位对偶格式的比较[cfd-5-2-3]

单元中心格式与中位对偶格式孰优孰劣,一直是颇具争议的话题。主要原因在于,缺少针对真实外形、在精度、计算时间和内存等方面对两种方法的公平比较。我们此处的意图,是围绕以下四个方面收集支持与反对每种方法的最重要论据:

  • 精度;
  • 计算量;
  • 内存需求;
  • 灵活性。
en

The relative advantages and disadvantages of the cell-centred and the median-dual scheme are the subject of controversial debates. The main reason is the lack of fair comparisons of the two methodologies with respect to accuracy, computational time and memory for realistic configurations. Our intention here is to collect the most important arguments for and against each of the approaches regarding:

  • accuracy,
  • computational work,
  • memory requirements, and
  • flexibility.

这应有助于更深入地理解每种格式固有的问题,并有助于针对具体的应用选择最合适的格式。en

This should lead to a greater understanding of the problems inherent to each scheme and should be of help in selecting the most suitable scheme for the intended applications.

Accuracy 精度

在三角形/四面体网格上,单元中心格式得到的控制体数量(从而自由度)约为中位对偶格式的两倍/六倍[36]。在由四面体和棱柱构成的典型混合网格上,单元中心格式给出的未知量数目约为中位对偶格式的三倍。这表明在相同网格上,单元中心格式比单元顶点离散化更精确。然而,与中位对偶格式相比,单元中心格式的残差由少得多的通量累加而成(在四面体网格上约为三个对七个),这可能损害精度。因此,究竟哪种格式更优,并没有明确的证据。en

A cell-centred scheme on a triangular/tetrahedral grid leads to about twice/six times as many control volumes and hence degrees of freedom as a median-dual scheme [36]. On typical mixed grids, which consist of tetrahedra and prisms, a cell-centred scheme gives roughly three times more unknowns than a median-dual scheme. This suggests that cell-centred schemes are more accurate than cell-vertex discretisations on an identical grid. However, the residual of a cell-centred scheme results from a much smaller number of fluxes as compared to a median-dual scheme (three versus approximately seven on a tetrahedral grid), which may impair the accuracy. Thus, there is no clear evidence about which scheme might be superior.

中位对偶格式在拉伸的三角形和四面体网格上存在一个特有的问题。例如考虑图5.10,它显示了由直角三角形组成的网格剖分,这种剖分常用于黏性流动中的固体壁面附近。从图5.10a可以看到,面\(\Delta S_{ij}\)相对于边\(ij\)变得高度倾斜。然而,空间离散格式大多假设通量与面正交(尤其是黎曼求解器)。由此引入的误差对一阶格式尤为显著[38]。采用所谓的包含对偶(containment-dual)控制体[39]可以改善这一状况。如图5.11所示,包含对偶方法用最小外包圆/球的中心代替单元形心来定义面。这样得到的控制体与四边形网格上的相同(图5.10b)。注意,像\(ij'\)这样的对角边没有与之相关联的面面积。这需要额外的预处理工作量,但解的精度可以得到明显改善[40]。当然,另一种可能的做法是直接在(边界层内)采用四边形或六面体en

The median-dual scheme suffers from a particular problem on stretched triangular and tetrahedral grids. Consider, for example, Fig. 5.10, which shows a tessellation composed of right triangles, as it is often employed near solid walls for viscous flows. We can see in Fig. 5.10a that the face \(\Delta S_{ij}\) becomes highly skewed with respect to the edge \(ij\). However, spatial discretisation schemes mostly assume fluxes to be orthogonal to a face (especially Riemann solvers). Thus, an error is introduced which is particularly significant for a first-order scheme [38]. The situation can be improved using the so-called containment-dual control volume [39]. As depicted in Fig. 5.11, the containment-dual approach employs the centres of the minimum spanning circles/spheres instead of the cell centroids to define the faces. This leads to control volumes identical to those on quadrilateral grids (Fig. 5.10b). Notice that there is no face area associated with diagonal edges like \(ij'\). An additional effort is required for pre-processing, but the solution accuracy can be improved noticeably [40]. Of course, another possibility is to employ directly quadrilateral or hexahedral

图5.10:拉伸直角三角形剖分下中位对偶(a)与包含对偶(b)控制体的比较

图5.10:对拉伸直角三角形剖分,中位对偶(a)与包含对偶(b)控制体的比较。图例:阴影部分为控制体,\(i\)、\(j\)为节点,\(\Delta S_{ij}\)为与边\(ij\)相关联的(粗线所示)面;(b)中\(j'\)为包含对偶在最长边上引入的节点。

图5.11:锐角(a)与钝角(c)三角形情形下包含对偶(虚线)的一部分

图5.11:锐角(a)与钝角(c)三角形情形下包含对偶(虚线)的一部分[40]。包含圆(containment circle)是包含该三角形的最小圆;对钝角三角形,它的圆心位于最长边上。

(单元)。关于网格诱导误差的进一步讨论可参见文献[22]和[23]。en

cells within the boundary layers. Further discussion of grid-induced errors can be found in Ref. [22] and [23].

中位对偶格式固有的另一个问题,出现在物理域边界处的离散化。具体而言,在边界处只剩下大约半个控制体(参见图4.6)。围绕各面对通量积分,得到的残差位于控制体内部(inside)——理想情况下在其中心(centre);然而,残差却被关联到直接位于边界上的节点(node)。与单元中心格式相比,这种失配导致离散化误差增大,这在固体壁面上尤其不利。对偶控制体的定义还会在尖锐角点(如尾缘)处引起问题,表现为压力或密度中的非物理峰值。在周期性边界处(参见第8.8章)还会出现进一步的复杂情况:必须把来自控制体两部分的通量正确地相加。en

Another problem inherent to the median-dual scheme is the discretisation at boundaries of the physical domain. What happens is that there is only about one half of the control volume left at the boundary (cf. Fig. 4.6). The integration of fluxes around the faces results in a residual located inside - ideally at the centre - of the control volume. However, the residual is associated with the node, residing directly on the boundary. This mismatch leads to increased discretisation error in comparison to the cell-centred scheme, which is particularly undesirable on solid walls. The definition of the dual control volume causes also problems at sharp corners (like trailing edges), which show up as unphysical peaks in pressure or density. Further complications arise at periodic boundaries (see Chapter 8.8), where the fluxes from both parts of the control volume have to be summed up correctly.

控制体形心与残差存储节点之间的失配,对中位对偶格式还有进一步的影响:在非定常流动情形下,它表现为质量矩阵。这一点我们在3.2节开头已经讨论过。单元中心格式的优点是,可以在不牺牲解的精度的情况下从方程中消去质量矩阵;与此相反,中位对偶格式需要对质量矩阵作特殊处理[41]、[42]。en

The mismatch between the centroid of the control volume and the node where the residual is stored has also a further implication for the median-dual scheme. It arises as the mass matrix in the case of unsteady flows. We discussed this point already at the beginning of Section 3.2. The advantage of the cell-centred scheme is that the mass matrix can be eliminated from the equations, without compromising the solution accuracy. By contrast, the median-dual scheme requires a special treatment of the mass matrix [41], [42].

Computational Work 计算量

要判断两种格式所需的计算量,主要须考察通量的积分。从前面的讨论可知,单元中心格式对单元面作循环,而中位对偶格式对边作循环。由于两种格式在交界面上计算通量的方式相当类似,单元面数与边数之比就给出了计算量之比。因此,在四面体网格上,单元面数(若每两个单元只计一次)约为边数的两倍,因而在相同网格上,单元中心格式的计算代价约为中位对偶格式的两倍[36]。然而,在含棱柱单元的混合网格上,单元中心方法变得更有竞争力。在六面体网格上,面数等于边数,除边界处理外,两种方法的计算量相当。en

In order to judge the computational effort required for both schemes, we have to consider primarily the integration of the fluxes. We know from the previous discussion that the cell-centred scheme uses a loop over cell faces whereas the median-dual scheme loops over the edges. Since the evaluation of the fluxes at an interface is quite similar for both schemes, the ratio of the number of cell faces to the number of edges gives the ratio of the computational work. Thus, on a tetrahedral grid, where the number cell faces (if counted only once for every two cells) is approximately two times larger than the number of edges, the cell-centred scheme is computationally twice as much expensive as the median-dual scheme on an identical grid [36]. The cell-centred approach becomes however more competitive on mixed grids containing prismatic elements. Apart from boundary treatment, both methods are computationally equivalent on hexahedral grids, where the number of faces equals the number of edges.

Memory Requirements 内存需求

就内存需求而言,与中位对偶格式相比,单元中心格式在四面体网格上需要存储的流动变量约为其六倍,在通常的混合网格上约为其三倍。此外,如前所述,两种格式都需要为每个单元面或每条边分别存储两个整数和三个实数(指针与面向量)。另外,单元中心格式还必须在内存中为每个单元面保存两个指向面中点的向量——6个实数。相反,中位对偶格式只依靠节点坐标即可工作,所需数值要少得多。总而言之,平均来说,单元中心格式所需的计算机内存是中位对偶方法的两倍以上。en

Considering the memory requirements, the cell-centred scheme has to store about six times more flow variables on tetrahedral and about three times more variables on usual mixed grids as compared to the median-dual scheme. Furthermore, as we saw, both schemes require to store two integers and three reals (pointers and face vector) per cell face or edge, respectively. Additionally, the cell-centred scheme has to keep two vectors to the face-midpoint - 6 reals - per cell face in memory. On the contrary, the median-dual scheme can work with the node coordinates only, which are considerably fewer values. Thus in summary, the cell-centred scheme needs, on average, more than twice as much computer memory as the median-dual method.

Grid Generation/Adaptation 网格生成/自适应

单元中心格式的一个显著优势出现在非相容(non-conforming)单元界面的情形,例如图3.4中字母“F”处的界面。与中位对偶方法不同,在这种界面上计算通量不需要特殊而昂贵的处理。这使网格生成和网格自适应的灵活性得以提高。en

One significant advantage of the cell-centred scheme appears in the case of non-conforming cell interfaces, like those at the letter "F" in Fig. 3.4. In contrast to the median-dual methodology, no special and expensive procedure is required for the computation of the fluxes at the interface. This allows for an increased flexibility in the grid generation and also in the grid adaptation.