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).