5.1 Geometrical Quantities of a Control Volume 控制体的几何量[cfd-5-1]

在开始讨论作用于对流通量和黏性通量的离散化方法之前,重要的是先考虑控制体\(\Omega_I\)各几何量的计算——即它的体积、单位法向量\(\vec{n}_m\)(定义为指向外侧)、面\(m\)的面积\(\Delta S_m\),以及元素的形心。法向量与面面积也合称为控制体的度量(metrics)。下面我们分别讨论二维和三维情形。en

Before we start to discuss the discretisation methodologies applied to the convective and viscous fluxes, it is important to consider the evaluation of geometrical quantities of the control volume \(\Omega_I\) - its volume, the unit normal vector \(\vec{n}_m\) (defined as outward facing) and the area \(\Delta S_m\) of a face \(m\), as well as the centroid of an element. The normal vector and the face area are also denoted as the metrics of the control volume. In the following, we shall consider the 2-D and the 3-D case separately.

5.1.1 Two-Dimensional Case 二维情形[cfd-5-1-1]

一般而言,我们把平面内的流动看作三维问题的一种特殊情形,其中解关于某一坐标方向(例如\(z\)方向)对称。由于对称性,也为了得到体积、压力等量的正确物理单位,我们把所有网格单元和控制体的深度设为常数\(b\)。于是,在二维情形,控制体的体积等于其面积与深度\(b\)的乘积。由于深度\(b\)是任意的,为方便起见可取\(b = 1\)。在下面的讨论中,我们只考虑三角形和四边形元素。尽管中位对偶格式的控制体形状可能相当复杂,但它总可以分解为三角形和/或四边形。en

Generally, we think of the flow in a plane as being a special case of a 3-D problem, where the solution is symmetric with respect to one coordinate direction (e.g., to the \(z\)-direction). Because of the symmetry and in order to obtain correct physical units for volume, pressure, etc., we set the depth of all grid cells and control volumes equal to a constant value \(b\). The volume of a control volume results then in 2D from the product of its area with the depth \(b\). Since the depth \(b\) is arbitrary, we may set \(b = 1\) for convenience. In the following discussion, we restrict ourselves to triangular and quadrilateral elements. Even though the control volume of a median-dual scheme can have a rather complex shape, it can always be decomposed into triangles and/or quadrilaterals.

Triangular element 三角形元素

一般三角形的面积可以用高斯(Gauss)公式最方便且精确地计算。于是,采用图5.3a所示的节点编号,体积由下式给出en

The area of a general triangle can be most conveniently and exactly calculated by the formula of Gauss. Thus, using a node numbering in accordance with Fig. 5.3a, the volume results from

\[\Omega = \frac{b}{2}\left[\,(x_1 - x_2)(y_1 + y_2) + (x_2 - x_3)(y_2 + y_3) + (x_3 - x_1)(y_3 + y_1)\,\right]. \tag{5.4}\]

节点必须按逆时针方向编号,才能得到正的体积值。en

The nodes have to be numbered in the anti-clockwise direction in order to obtain a positive value for the volume.

Quadrilateral element 四边形元素

一般四边形的面积可以用高斯公式精确计算,经过一些代数运算后得到表达式en

The area of a general quadrilateral can be exactly calculated by Gauss' formula, which leads, after some algebra, to the expression

\[\Omega = \frac{b}{2}\left[(x_1 - x_3)(y_2 - y_4) + (x_4 - x_2)(y_1 - y_3)\right], \tag{5.5}\]

其中节点按图5.3b沿逆时针方向编号。上式中,我们假定控制体位于\(x-y\)平面内,\(z\)坐标为对称轴。en

where the nodes are numbered according to Fig. 5.3b in the anti-clockwise direction. In the above, we assumed that the control volume is located in the \(x-y\)-plane and that the \(z\)-coordinate represents the symmetry axis.

图5.3:(a)三角形元素与(b)四边形元素的节点编号及面向量

图5.3:节点编号与面向量:(a)三角形元素;(b)四边形元素。C表示元素的(几何)中心。

在二维情形,控制体的各条边均为直线,因此单位法向量沿边保持不变。当我们按照方程(5.2)的近似对通量进行积分时,需要计算面的面积\(\Delta S\)与相应单位法向量\(\vec{n}\)的乘积,即面向量(face vector)\(\vec{S}\)。参照图5.3,例如边2-3处的外指面向量由下式给出en

The edges of a control volume are given by straight lines in 2D and therefore the unit normal vector is constant along them. When we integrate the fluxes according to the approximation of Eq. (5.2), we have to evaluate the product of the area of a face \(\Delta S\) and the corresponding unit normal vector \(\vec{n}\) which is the face vector \(\vec{S}\). Considering Fig. 5.3, the outward pointing face vector, e.g., at the side 2-3 is given by

\[\vec{S}_{23} = \vec{n}_{23}\,\Delta S_{23} = b\begin{bmatrix} y_3 - y_2 \\ x_2 - x_3 \end{bmatrix}. \tag{5.6}\]

由于对称性,面向量(以及单位法向量)的\(z\)分量为零,因此在方程(5.6)中将其省略。单位法向量可由方程(5.6)并借助下式得到en

Because of the symmetry, the \(z\)-component of the face vectors (and of the unit normal vector) is zero. It is therefore omitted in Eq. (5.6). The unit normal vector can be obtained from Eq. (5.6) with

\[\Delta S = |\,\vec{S}\,| = \sqrt{S_x^2 + S_y^2}, \tag{5.7}\]

其中\(S_x\)、\(S_y\)为面向量的笛卡尔分量。en

where \(S_x\), \(S_y\) denote the Cartesian components of the face vector.

Element Centre 单元中心

图5.3a中三角形的中心定义为en

The centre of the triangle from Fig. 5.3a is defined as

\[\vec{r}_c = \frac{1}{3}\left(\vec{r}_1 + \vec{r}_2 + \vec{r}_3\right) \tag{5.8}\]

其中\(\vec{r}_{1/2/3}\)表示各节点的笛卡尔坐标。四边形元素的中心可用文献[34]中给出的公式计算。为此,把四边形分解为共享两个点的两个三角形。按图5.3b的节点编号,并取1和3为公共节点,该关系式为en

with \(\vec{r}_{1/2/3}\) representing the Cartesian coordinates of the nodes. The centre of a quadrilateral element can be computed by the formula given in Ref. [34]. For this purpose, the quadrilateral is decomposed into two triangles which share two points. With the node numbering according to Fig. 5.3b, and 1 and 3 being the common nodes, the relation reads

\[\vec{r}_c = \frac{\Omega_{123}\,\vec{r}_{c,123} + \Omega_{134}\,\vec{r}_{c,134}}{\Omega_{123} + \Omega_{134}}. \tag{5.9}\]

两个三角形\(\Omega_{123}\)和\(\Omega_{134}\)的体积用方程(5.4)计算,它们的形心\(\vec{r}_c\)由方程(5.8)得到。en

The volumes of the two triangles \(\Omega_{123}\) and \(\Omega_{134}\) are evaluated using Eq. (5.4), and their centroids \(\vec{r}_c\) are obtained from Eq. (5.8).

5.1.2 Three-Dimensional Case 三维情形[cfd-5-1-2]

与前面的二维情形不同,在三维情形,对具有四边形面的元素或控制体计算面向量和体积会遇到一些问题。主要原因在于,控制体四边形面的四个顶点一般不一定位于同一平面内。此时,法向量在这样的面上不再是常数(见图4.2)。为克服这一困难,可以把每个四边形面分解成两个甚至更多的三角形。然而,对光滑网格上的二阶格式而言,精度上的收益几乎察觉不到。这种额外的代价只有对三阶及更高阶空间离散化才是值得的——实际上也是必需的。因此,在下面的讨论中,我们将对四边形面采用一种基于平均法向量的简化处理方法。en

As opposed to the previous 2-D case, the computation of face vectors and volumes poses in 3D some problems for elements or control volumes with quadrilateral faces. The main reason for this is that, in general, the four vertices of a quadrilateral face of a control volume may not lie in a plane. Then, the normal vector is no longer constant on such face (see Fig. 4.2). In order to overcome this difficulty, we could decompose each quadrilateral face into two or even more triangles. However, the gain in accuracy is hardly noticeable for a second-order scheme on a smooth grid. The additional effort can only be justified - and in fact it becomes necessary - for a third- and higher order spatial discretisations. Therefore, we shall apply a simplified treatment of the quadrilateral faces in the following considerations, which is based on an averaged normal vector.

Triangular face 三角形面

对于三角形面,面向量\(\vec{S}\)可以用高斯公式精确计算。按图5.4a定义节点,对三角形1-2-3的边差分得到en

The face vector \(\vec{S}\) can be exactly computed for a triangular face using Gauss' formula. Defining the nodes according to Fig. 5.4a, we obtain for the edge differences of the triangle 1-2-3

\[\begin{aligned} \Delta xy_A &= (x_1 - x_2)(y_1 + y_2), &\quad \Delta yz_A &= (y_1 - y_2)(z_1 + z_2),\\ \Delta xy_B &= (x_2 - x_3)(y_2 + y_3), &\quad \Delta yz_B &= (y_2 - y_3)(z_2 + z_3),\\ \Delta xy_C &= (x_3 - x_1)(y_3 + y_1), &\quad \Delta yz_C &= (y_3 - y_1)(z_3 + z_1),\\ \Delta zx_A &= (z_1 - z_2)(x_1 + x_2),\\ \Delta zx_B &= (z_2 - z_3)(x_2 + x_3),\\ \Delta zx_C &= (z_3 - z_1)(x_3 + x_1). \end{aligned} \tag{5.10}\]

于是,外指面向量\(\vec{S} = \vec{n}\Delta S\)由下式得到en

The outward pointing face vector \(\vec{S} = \vec{n}\Delta S\) results then from

\[\vec{S} = \frac{1}{2}\begin{bmatrix} \Delta yz_A + \Delta yz_B + \Delta yz_C \\ \Delta zx_A + \Delta zx_B + \Delta zx_C \\ \Delta xy_A + \Delta xy_B + \Delta xy_C \end{bmatrix}. \tag{5.11}\]

图5.4:(a)四面体元素与(b)六面体元素的节点编号及面向量

图5.4:节点编号与面向量:(a)四面体元素;(b)六面体元素。图例:(a)中节点1—4为四面体的顶点,\(\vec{S}\)为面向量;(b)中节点1—8为六面体的顶点,\(\vec{S}\)为面5-6-7-8上的外指面向量。

Quadrilateral face 四边形面

四边形面(诸如图5.4b所示的面)的平均面向量\(\vec{S}\),最方便是采用与二维情形计算四边形面积相同的高斯公式来计算。于是,对于图5.4b中由节点5、6、7和8给出的面,首先定义如下差分en

The averaged face vector \(\vec{S}\) of a quadrilateral face, like that rendered in Fig. 5.4b, is most conveniently computed using the same Gauss' formula as employed in 2-D for the area of a quadrilateral. Thus, for the face given by the nodes 5, 6, 7 and 8 in Fig. 5.4b, we first define the differences

\[\begin{aligned} \Delta x_A &= x_8 - x_6, &\quad \Delta x_B &= x_7 - x_5,\\ \Delta y_A &= y_8 - y_6, &\quad \Delta y_B &= y_7 - y_5,\\ \Delta z_A &= z_8 - z_6, &\quad \Delta z_B &= z_7 - z_5. \end{aligned} \tag{5.12}\]

然后,由下述关系式得到外指面向量\(\vec{S} = \vec{n}\Delta S\)en

Then, we obtain the outward pointing face vector \(\vec{S} = \vec{n}\Delta S\) from the relation

\[\vec{S} = \frac{1}{2}\begin{bmatrix} \Delta z_A\,\Delta y_B - \Delta y_A\,\Delta z_B \\ \Delta x_A\,\Delta z_B - \Delta z_A\,\Delta x_B \\ \Delta y_A\,\Delta x_B - \Delta x_A\,\Delta y_B \end{bmatrix}. \tag{5.13}\]

当面接近平行四边形,即面的四个顶点全部位于同一平面内时,这一近似变为精确的。en

The approximation becomes exact when the face approaches a parallelogram, i.e., when the vertices of the face lie all in one plane.

两种情形下的单位法向量都由\(\vec{n} = \vec{S}/\Delta S\)得到,其中en

The unit normal vector is obtained in both cases from \(\vec{n} = \vec{S}/\Delta S\) with

\[\Delta S = \sqrt{S_x^2 + S_y^2 + S_z^2}, \tag{5.14}\]

其中\(S_x\)、\(S_y\)和\(S_z\)分别表示由方程(5.11)或方程(5.13)给出的面向量的笛卡尔分量。en

where \(S_x\), \(S_y\) and \(S_z\) denote the Cartesian components of the face vector given by Eq. (5.11) or Eq. (5.13), respectively.

Volume 体积

正如在三维结构网格有限体积格式的情形中已经指出的,体积的一种非常方便的计算方法基于散度定理(divergence theorem)[35]。4.1.2小节的讨论最终给出表达式en

As we already stated in the case of 3-D structured finite volume schemes, a very convenient approach for the computation of volumes is based on the divergence theorem [35]. The discussion in Subsection 4.1.2 led finally to the expression

\[\Omega = \frac{1}{3}\sum_{m=1}^{N_F}\left(\vec{r}_c\cdot\vec{S}\right)_m \tag{5.15}\]

此即体积的表达式,其中\(N_F\)表示控制体的面数,\((\vec{r}_c)_m\)为控制体第\(m\)个面的中心,\(\vec{S}_m\)为第\(m\)个面(外指)的面向量。公式(5.15)可直接应用于非结构网格。对于所有面均为三角形、或四边形面均为平面的体积,该公式是精确的。en

for the volume, where \(N_F\) denotes the number of the faces of the control volume, \((\vec{r}_c)_m\) the centre of the face \(m\) of the control volume, and \(\vec{S}_m\) the face vector (outward directed) of the face \(m\), respectively. The formula (5.15) is directly applicable on unstructured grids. It is exact for a volume with triangular faces, or a volume with planar quadrilateral faces.

Cell Centroid 单元形心

前面提到的中位对偶型控制体需要知道网格单元的形心。一般体积的形心定义为en

The previously mentioned median-dual type of control volume requires the knowledge of the centroid of the grid cell. The centroid of a general volume is defined as

\[\vec{r}_c = \frac{1}{\Omega}\int_{\Omega}\vec{r}\,d\Omega\,. \tag{5.16}\]

根据文献[34]中的推导,方程(5.16)的关系可以离散化为en

According to the derivation in Ref. [34], the relation in Eq. (5.16) can be discretised as

\[\vec{r}_c = \frac{3\sum\limits_{m=1}^{N_F}\left(\vec{r}_c\cdot\vec{n}\right)_m\left(\vec{r}_c\right)_m\Delta S_m}{4\sum\limits_{m=1}^{N_F}\left(\vec{r}_c\cdot\vec{n}\right)_m\Delta S_m}, \tag{5.17}\]

其中面\(m\)的中心,即\((\vec{r}_c)_m\),对三角形面由方程(5.8)得到,对四边形面由方程(5.9)得到。可以注意到,方程(5.17)中的分母与方程(5.15)中的\(\Omega/3\)相同。en

where the centre of a face \(m\), i.e., \((\vec{r}_c)_m\) is obtained from Eq. (5.8) for a triangular face, or from Eq. (5.9) for a quadrilateral face. As we can note, the denominator in Eq. (5.17) is identical to \(\Omega/3\) from Eq. (5.15).