5.2.1 Cell-Centred Scheme 单元中心格式[cfd-5-2-1]
如果控制体与网格单元完全相同ï¼且流动变量布置在各单元的形心处(如图5.6所示)ï¼我们就称之为单元中心格式。在计算离散化流动方程(5.2)时ï¼需要在控制体各面的中点处提供对流通量和黏性通量ï¼这对光滑网格上的二阶精度离散化已经足够(四边形面采用平均法向量)。通量可以用以下三种方式之一来近似:
- 通量平均(average of fluxes):由单元面左右两侧网格单元形心处之值分别计算通量ï¼再取平均ï¼但使用同一单位法向量(一般只用于对流通量);
- 变量平均(average of variables):采用单元面左右两侧相邻网格单元形心处变量的平均;
- 由周围单元之值分别在单元面两侧重构(reconstructed)流动量ï¼再由此计算通量(只用于对流通量)。
en
We speak of a cell-centred scheme if the control volumes are identical with the grid cells and if the flow variables are associated with their centroids, as it is sketched in Fig. 5.6. When we evaluate the discretised flow equations (5.2), we have to supply the convective and the viscous fluxes at the midpoints of the faces of the control volume, which is sufficient for a second-order accurate discretisation on smooth grids (averaged normal vector is employed for quadrilateral faces). The fluxes can be approximated in one of three ways:
- by the average of fluxes computed from values at the centroids of the grid cells to the left and to the right of the cell face, but using the same unit normal vector (generally applied only to the convective fluxes);
- by using an average of variables associated with the centroids of the grid cells adjacent to the left and to the right side of the cell face;
- by computing the fluxes from flow quantities reconstructed separately on both sides of the cell face from values in the surrounding cells (employed only for the convective fluxes).

图5.6:单元中心格式的控制体(二维)。图例:网格节点用圆点表示ï¼单元中心用方块(C)表示;\(C_0\)、\(C_1\)、\(C_2\)、\(C_3\)为相邻单元的形心,\(M_{01}\)为面01的中点,\(\vec{n}_{01}\)为面01的单位法向量,\(\Omega\)为控制体(阴影部分)。
于是ï¼以图5.6中具有单位法向量\(\vec{n}_{01}\)的单元面为例ï¼第一种方法——通量平均——在二维情形下为en
Thus, considering for example the cell face with the unit normal vector \(\vec{n}_{01}\) in Fig. 5.6, the first approach - average of fluxes - reads in two dimensions
第二种方法——变量平均——可以表述为en
The second approach - average of variables - can be formulated as follows
其中在具有单位法向量\(\vec{n}_{01}\)的面上的守恒变量/因变量ï¼定义为两个相邻单元处数值的算术平均ï¼即en
where the conservative/dependent variables at the face with the unit normal vector \(\vec{n}_{01}\) are defined as the arithmetic average of values at the two adjacent cells. Thus,
第三种方法首先把流动量(通常为速度分量、压力、密度和总焓)分别插值到单元面的两侧。重构得到的量——称为左状态(left)和右状态(right state)(参见5.3.3小节)——一般并不相同。随后ï¼利用适当的非线性函数ï¼由左、右状态之差计算通过单元面的通量ï¼即en
The third methodology starts with an interpolation of flow quantities (usually velocity components, pressure, density and total enthalpy) separately to both sides of the cell face. The reconstructed quantities - termed the left and the right state (see Subsection 5.3.3) - differ in general. The fluxes through the cell face are then evaluated from the difference of the left and right state using an appropriate non-linear function. Hence,
其中en
where
它们表示重构得到的(左、右)状态。en
represent the reconstructed states.
正如本节开头所指出的ï¼描述元素的基本数据结构必须以适当的方式加以扩展ï¼以支持相应的离散化方法。从上面的讨论可以清楚地看出ï¼数值运算主要是利用元素(控制体)的面以及相邻单元中心处的值来进行的。因此ï¼很自然地应在空间离散化中采用基于面(face-based)的数据结构。这种数据结构对网格中每个具体的面(见图5.6)存储:
- 指向共享该面的两个单元的指针——借此可以访问与这两个单元(\(C_0\)、\(C_1\))相关联的流动变量;
- 面向量(\(\vec{S}_{01} = \vec{n}_{01}\Delta S_{01}\))——必须一致地指向外侧或内侧;
- 从各单元形心指向面中点\(M_{01}\)的两个向量ï¼即(\(C_0-M_{01}\))、(\(C_1-M_{01}\))——把流动变量精确插值到面上时需要。对纯四面体网格无需此项ï¼此时可用简单的外插公式[26]、[2](参见方程(5.44))。
en
As we already stated in the introduction to this section, the basic data structure which describes the elements has to be extended in an appropriate way to support the discretisation methodology. It is obvious from the previous discussion that numerical operations are carried out using mainly the faces of the elements (control volumes) together with values at the centres of the adjacent cells. It is therefore quite natural to employ a face-based data structure for the spatial discretisation. Such data structure stores for each particular face in the grid (see Fig. 5.6):
- pointers to the two cells which share the respective face - this allows us to access the flow variables associated with the two cells (\(C_0\), \(C_1\));
- the face vector (\(\vec{S}_{01} = \vec{n}_{01}\Delta S_{01}\)) - must point consistently either outwards or inwards;
- two vectors from the centroid each cell to the midpoint of the face \(M_{01}\), i.e., (\(C_0-M_{01}\)), (\(C_1-M_{01}\)) - required for an accurate interpolation of flow variables to the face. This is not necessary for purely tetrahedral grids, where a simple extrapolation formula can be used [26], [2] (cf. Eq. (5.44)).
DO face = 1, nfaces
I = pointer_to_left_cell( face )
J = pointer_to_right_cell( face )
(F dS)_IJ = F(W_IJ, n_IJ) dS_IJ (approx.)
R_I = R_I + (F dS)_IJ
R_J = R_J - (F dS)_IJ
ENDDO
循环结束后ï¼再加上源项\(\vec{Q}_I\Omega_I\)ï¼就得到所有单元内的最终残差(\(\vec{R}\))。效率较低的替代做法是对元素作循环ï¼因为这样面向量必须存储两次ï¼且通量要计算两次(边界除外)。此外ï¼由于我们使用完全相同的面向量\(\vec{S}_{IJ}\)来计算流入体积\(\Omega_I\)和\(\Omega_J\)的部分通量ï¼控制方程的守恒性质自动得以保持。en
After the loop is completed and the source term \(\vec{Q}_I\Omega_I\) is added, we obtain the final residuals (\(\vec{R}\)) in all cells. A less efficient approach would be to loop over elements because the face vectors would have to be stored twice and the fluxes would be computed twice (with the exception of the boundaries). Furthermore, because we use exactly the same face vector \(\vec{S}_{IJ}\) in order to to evaluate the partial fluxes into the volumes \(\Omega_I\) and \(\Omega_J\), the conservation properties of the governing equations are automatically retained.