8.1 Concept of Dummy Cells 虚单元的概念[cfd-8-1]

在继续讨论边界条件之前,我们应当提一下虚单元(dummy cells)或虚点(dummy points)的概念。这一做法在结构网格上非常流行,不过虚单元在非结构网格上也有一些优点。虚单元是物理域之外附加的网格单元层或点层。图8.1以二维结构网格为例对此作了示意。可以看到,整个计算域被两层虚单元(用虚线表示)包围。虚单元(点)通常不像域内网格那样生成(网格块之间的交界面除外):它们只是虚拟的单元,尽管体积、面向量等几何量也与之相关联。en

Before we proceed with the discussion of the boundary conditions, we should mention the concept of dummy cells or dummy points. This approach is very popular on structured grids. However, dummy cells offer some advantages also on unstructured grids. The dummy cells are additional layers of grid cells or points outside the physical domain. This is sketched in Fig. 8.1 for the case of a 2-D structured grid. As we can see, the whole computational domain is surrounded by two layers of dummy cells (denoted by dashed line). The dummy cells (points) are usually not generated as the grid inside the domain (except on interfaces between grid blocks). Rather, the cells are only virtual, although geometrical quantities like volumes or face vectors are associated with them.

虚单元的目的是简化边界上通量、梯度、耗散等的计算。其实现方式是把空间离散格式的模板(stencil)延伸到物理边界之外。如图8.1所示,在边界处可以采用与物理域内部相同的离散格式。这样,对所有“物理”网格点都能以同样的方式求解控制方程。这使离散格式易于实现。此外,结构网格的所有网格点可以在单个循环中遍历,这在向量计算机上具有显著优势。当然,前提是虚单元(点)中要存有守恒变量以及几何量的适当取值。显然,虚单元层的数目必须使模板位于物理域之外的部分被完全覆盖。虚单元(点)中的守恒变量由边界条件确定,几何量通常取自边界处相应的控制体。在多个网格块之间的边界情形(如图3.4),所有流动变量和几何量都从相邻块传递过来。en

The purpose of the dummy cells is to simplify the computation of the fluxes, gradients, dissipation, etc. along the boundaries. This is achieved by the possibility to extend the stencil of the spatial discretisation scheme beyond the physical boundaries. As we can see in Fig. 8.1, the same discretisation scheme can be employed at the boundaries as inside the physical domain. Thus, we can solve the governing equations in the same way for all "physical" grid points. This makes the discretisation schemes much easier to implement. Furthermore, all grid points of a structured grid can be accessed in a single loop, which is of significant advantage particularly on vector computers. The condition is of course that the dummy cells (points) contain appropriate values of the conservative variables as well as of the geometrical quantities. Clearly, the number of dummy cell layers must be such that the part of the stencil outside the physical domain is completely covered. The conservative variables in the dummy cells (points) are obtained from boundary conditions. The geometrical quantities are usually taken from the corresponding control volume at the boundary. In the case of boundaries between multiple grid blocks (like in Fig. 3.4), all flow variables and the geometry are transferred from the neighbouring block.

图8.1:二维计算域周围的两层虚单元

图8.1:二维计算域(粗线)周围的两层虚单元(虚线)。实心圆点表示二阶单元顶点(对偶)格式的标准模板,实心矩形勾画出二阶单元中心格式的模板(见4.3节)。

图8.1中灰色阴影的虚单元(及其相应点)带来一个难题:如果没有相邻的网格块,如何设置它们的取值并不十分明确。标准十字型离散模板并不需要它们的值。然而,这些单元(点)对梯度的计算(黏性通量——见4.4节)或多重网格中的转移算子(9.4节)十分重要。最简单的解决办法是由相邻的“规则”虚单元取平均,如图8.1中箭头所示。但这对于壁面或对称边界并不奏效。在这些情形下,更好的做法是把物理边界延伸到虚单元层中(参见CD-ROM上的结构化二维代码)。en

The grey-shaded dummy cells (and the associated points) in Fig. 8.1 represent a certain problem, since it is not quite clear how to set their values if there is no adjacent grid block. Their values are not required by the standard cross-type discretisation stencil. However, the cells (points) are important for the computation of gradients (viscous fluxes - see Section 4.4), or for the transfer operators within multigrid (Section 9.4). The simplest way to solve the problem is to average the values from the adjacent "regular" dummy cells, as indicated in Fig. 8.1 by arrows. However, this does not work satisfactorily for wall or symmetry boundaries. In these cases, it is better to extend the physical boundary into the dummy cell layers (see the structured 2-D code on the CD-ROM).