6.2 Implicit Time-Stepping Schemes 隐式时间推进格式[cfd-6-2]

在方程(6.2)中取\(\beta \ne 0\),可以得到各种隐式时间积分格式。实践发现,\(\omega = 0\)的隐式格式最适合求解定常流动问题(非定常流动见6.3节)。于是,方程(6.2)简化为en

Various implicit time integration schemes can be obtained by setting \(\beta \ne 0\) in Eq. (6.2). An implicit scheme with \(\omega = 0\) was found to be best suited for the solution of stationary flow problems (for unsteady flows see Section 6.3). Herewith, Eq. (6.2) simplifies to

\[\frac{\left(\Omega\bar{M}\right)_I}{\Delta t_I}\Delta\vec{W}_I^n = -\beta\vec{R}_I^{n+1} - \left(1-\beta\right)\vec{R}_I^n. \tag{6.26}\]

可以看出,隐式形式导出一组关于时刻\((t+\Delta t)\)未知流动变量的非线性方程。求解方程(6.26)需要在新时间层上求值残差,即\(\vec{R}^{n+1}\)。由于我们不知道\(\vec{W}^{n+1}\),这无法直接进行。不过,可以把方程(6.26)中的残差\(\vec{R}^{n+1}\)在当前时间层处线性化,即en

As we can see, the implicit formulation leads to a set of non-linear equations for the unknown flow variables at the time \((t+\Delta t)\). The solution of Eq. (6.26) requires the evaluation of the residual at the new time level, i.e., \(\vec{R}^{n+1}\). Since we do not know \(\vec{W}^{n+1}\), this cannot be done directly. However, we can linearise the residual \(\vec{R}^{n+1}\) in Eq. (6.26) about the current time level, i.e.,

\[\vec{R}_I^{n+1} \approx \vec{R}_I^n + \left(\frac{\partial\vec{R}}{\partial\vec{W}}\right)_I\Delta\vec{W}^n, \tag{6.27}\]

其中\(\partial\vec{R}/\partial\vec{W}\)一项称为通量雅可比(flux Jacobian)。应当指出,通量雅可比常常是由\(\vec{R}^n\)所表示的空间离散化的一个相当粗糙的近似导出的。例如,对高阶上风离散化,通常只基于一阶上风格式来构造通量雅可比。然而,为了获得最佳效率和稳健性,通量雅可比仍应反映空间离散化最重要的特征。en

where the term \(\partial\vec{R}/\partial\vec{W}\) is referred to as the flux Jacobian. We should mention that the flux Jacobian is often derived from a rather crude approximation to the spatial discretisation represented by \(\vec{R}^n\). For example, in the case of higher-order upwind discretisations, it is quite common to base the flux Jacobian solely on a first-order upwind scheme. However, for best efficiency and robustness, the flux Jacobian should still reflect the most important features of the spatial discretisation.

现在把方程(6.27)中\(\vec{R}^{n+1}\)的线性化代入方程(6.26),便得到如下隐式格式en

If we substitute now the linearisation in Eq. (6.27) for \(\vec{R}^{n+1}\) into Eq. (6.26), we obtain the following implicit scheme

\[\left[\frac{\left(\Omega\bar{M}\right)_I}{\Delta t_I} + \beta\left(\frac{\partial\vec{R}}{\partial\vec{W}}\right)_I\right]\Delta\vec{W}^n = -\vec{R}_I^n, \tag{6.28}\]

方程(6.28)左端方括号内的项称为隐式算子(implicit operator)或系统矩阵(system matrix)。相应地,方程(6.28)的右端称为显式算子(explicit operator)。决定解的空间精度的只是显式算子。en

The term in square brackets on the left-hand side of Eq. (6.28) is referred to as the implicit operator or the system matrix. Consequently, the right-hand side of Eq. (6.28) is called the explicit operator. It is only the explicit operator that determines the spatial accuracy of the solution.

隐式算子构成一个大型、稀疏、非对称的块矩阵,其维数等于单元总数(单元中心格式)或网格点总数(单元顶点格式)。下面我们将进一步讨论隐式算子在结构网格和非结构网格上的形式。如3.2节所述,质量矩阵\(\bar{M}\)可以用单位矩阵代替,而不影响定常解。方程(6.28)中的参数\(\beta\)一般取1,这样得到一阶精度的时间离散化。\(\beta = 1/2\)时可以得到二阶时间精度格式,但不推荐这样做,因为\(\beta = 1\)的格式稳健得多,而且对定常问题时间精度并不重要。en

The implicit operator constitutes a large, sparse, and non-symmetric block matrix with dimensions equal to the total number of cells (cell-centred scheme) or grid points (cell-vertex scheme). Below we will discuss further the form of the implicit operator for structured as well as for unstructured grids. As we already saw in Section 3.2, the mass matrix \(\bar{M}\) can be replaced by the identity matrix, without influencing the steady state solution. The parameter \(\beta\) in Eq. (6.28) is generally set to 1, which results in a 1st-order accurate temporal discretisation. A 2nd-order time accurate scheme is obtained for \(\beta = 1/2\). However, this is not recommended since the scheme with \(\beta = 1\) is much more robust, and the time accuracy is of no importance for steady problems.

当控制方程为刚性方程时,必须把源项纳入隐式算子。方程(6.27)中残差的线性化十分自然地做到了这一点,它给出的形式与方程(6.10)完全相同。如文献[12]所证明的,只要\(\partial\vec{Q}/\partial\vec{W}\)的特征值全为负或零,上述隐式格式(6.28)对任意时间步长都保持稳定。en

In the case of stiff governing equations, the source term has to be included in the implicit operator. This happens quite naturally with the linearisation of the residual in Eq. (6.27), which leads to a formulation identical to Eq. (6.10). As demonstrated in Ref. [12], the above implicit scheme (6.28) remains stable for any time step if the eigenvalues of \(\partial\vec{Q}/\partial\vec{W}\) are all negative or zero.

求解线性方程组(6.28)需要对隐式算子求逆,即对一个非常大的矩阵求逆。原则上这有两种做法。第一种是直接矩阵求逆,采用Gaussian消元或某种直接稀疏矩阵方法[24]、[25]。然而,由于内存需求过大、计算量极高,这一方法不适合实际问题[26]。en

The solution of the linear equation system (6.28) requires the inversion of the implicit operator, i.e., the inversion of a very large matrix. In principle, this can be done in two ways. The first one consists of a direct matrix inversion, using either the Gaussian elimination or some direct sparse matrix method [24], [25]. However, because of the excessive amount of memory and the very high computational effort, this approach is not suited for practical problems [26].

对隐式算子求逆的第二类方法是迭代方法。我们在3.2.2小节提到了使用最广的几种迭代方法。迭代方法大致可以分为两类。第一类是把隐式算子分解成若干部分的做法——这一过程称为因式分解(factorisation)。各因子的构造方式使其比原来的隐式算子更容易求逆。第二类是采用Krylov子空间方法求隐式算子之逆的格式。在这种情形下,通常令\(\Delta t \rightarrow \infty\),把隐式时间推进格式(6.28)化为牛顿法,这样的格式随即称为Newton-Krylov方法。en

The second possibility of inverting the implicit operator represent iterative methods. We mentioned the most widely used ones in Subsection 3.2.2. Iterative methods can be divided roughly into two groups. The first one consists of approaches which decompose the implicit operator into several parts - a process called factorisation. The factors are constructed in such a way that they can be more easily inverted than the original implicit operator. To the second group belong schemes, which employ a Krylov-subspace method for the inversion of the implicit operator. In this case, the implicit time-stepping scheme (6.28) is usually turned into Newton's method by setting \(\Delta t \rightarrow \infty\). The scheme is then named Newton-Krylov method.

下面我们先讨论隐式算子的矩阵结构,然后研究计算方程(6.28)中通量雅可比\(\partial\vec{R}/\partial\vec{W}\)的各种途径,最后详细介绍三种最常用的迭代方法。en

In the following, we shall discuss first the matrix structure of the implicit operator. Then, we shall investigate the possibilities of computing the flux Jacobian \(\partial\vec{R}/\partial\vec{W}\) in Eq. (6.28). Finally, we shall present the three most popular iterative methods in detail.

6.2.1 Matrix Form of the Implicit Operator 隐式算子的矩阵形式[cfd-6-2-1]

参照方程(6.27),可以把残差\(\vec{R}^{n+1}\)的线性化写成en

Referring to Eq. (6.27), we can write the linearisation of the residual \(\vec{R}^{n+1}\) in the form

\[\vec{R}^{n+1} \approx \vec{R}^n + \sum_{m=1}^{N_F}\left\{\frac{\partial}{\partial\vec{W}}\left[\left(\vec{F}_c - \vec{F}_v\right)_m\Delta S_m\right]\Delta\vec{W}^n\right\} - \frac{\partial(\Omega\vec{Q})}{\partial\vec{W}}\Delta\vec{W}^n \tag{6.29}\]

其中\(N_F\)为控制体\(\Omega\)的面数(参见方程(4.2)或(5.2))。于是,通量雅可比为en

with \(N_F\) being the number of faces of the control volume \(\Omega\) (cf. Eq. (4.2) or (5.2)). Thus, the flux Jacobian reads

\[\frac{\partial\vec{R}}{\partial\vec{W}} = \sum_{m=1}^{N_F}\frac{\partial\left(\vec{F}_c\right)_m}{\partial\vec{W}}\Delta S_m - \sum_{m=1}^{N_F}\frac{\partial\left(\vec{F}_v\right)_m}{\partial\vec{W}}\Delta S_m - \frac{\partial\left(\Omega\vec{Q}\right)}{\partial\vec{W}}. \tag{6.30}\]

需要强调的是,必须把通量雅可比理解为作用在更新量\(\Delta\vec{W}\)上的一个算子。如上所述,方程(6.30)中的对流通量和黏性通量不一定非要与显式算子中的通量完全相同。en

It should be stressed that the flux Jacobian has to be conceived as an operator which acts on the update \(\Delta\vec{W}\). As stated above, the convective and viscous fluxes in Eq. (6.30) do not necessarily have to be identical to the fluxes in the explicit operator.

由于结构网格和非结构网格上的隐式算子差别很大,我们将分别讨论这两种情形。en

Because of the significant differences between the implicit operators on structured and unstructured grids, we shall treat each case separately.

Implicit Operator on Structured Grids 结构网格上的隐式算子

为了导出方程(6.28)中系统矩阵的形式,考察图6.1所示的一维网格。进一步假设空间离散化采用带对偶控制体的单元顶点格式(4.2.3小节)和简单的通量平均(参见图4.8)。在没有黏性通量的情形下,残差为en

In order to derive the form of the system matrix in Eq. (6.28), let us consider the 1-D grid in Fig. 6.1. Let us further assume that the cell-vertex scheme with dual control volumes (Subsection 4.2.3) and a simple average of fluxes are used for the spatial discretisation (cf. Fig. 4.8). In the absence of viscous fluxes, the residual is given by

\[\vec{R}_i^n = \left(\vec{F}_c\right)_{i+1/2}\Delta S_{i+1/2} + \left(\vec{F}_c\right)_{i-1/2}\Delta S_{i-1/2} - \Omega_i\vec{Q}_i. \tag{6.31}\]

此外,方程(6.30)中对流通量在面\(m = i + 1/2\)处的导数可以表示为en

Furthermore, the derivative of the convective fluxes at the face \(m = i + 1/2\) in Eq. (6.30) can be expressed as follows

\[\begin{aligned}\frac{\partial\left(\vec{F}_c\right)_{i+1/2}}{\partial\vec{W}} &= \frac{\partial}{\partial\vec{W}}\left\{\frac{1}{2}\left[\vec{F}_c(\vec{W}_{i+1}^n) + \vec{F}_c(\vec{W}_i^n)\right]\right\} \\&= \frac{1}{2}\left[\left(\bar{A}_c\right)_{i+1} + \left(\bar{A}_c\right)_i\right],\end{aligned} \tag{6.32}\]

其中\(\bar{A}_c\)表示对流通量雅可比(A.9节)。于是,根据方程(6.29)、(6.31)和(6.32),\((t+\Delta t)\)处的残差近似为en

where \(\bar{A}_c\) denotes the convective flux Jacobian (Section A.9). Hence, according to Eqs. (6.29), (6.31), and (6.32), the residual at \((t+\Delta t)\) is approximated as

\[\begin{aligned}\vec{R}_i^{n+1} \approx \vec{R}_i^n &+ \frac{1}{2}\left[\left(\bar{A}_c\right)_{i+1}\Delta\vec{W}_{i+1}^n + \left(\bar{A}_c\right)_i\Delta\vec{W}_i^n\right]\Delta S_{i+1/2} \\&+ \frac{1}{2}\left[\left(\bar{A}_c\right)_{i-1}\Delta\vec{W}_{i-1}^n + \left(\bar{A}_c\right)_i\Delta\vec{W}_i^n\right]\Delta S_{i-1/2} \\&- \frac{\partial(\Omega_i\vec{Q}_i)}{\partial\vec{W}}.\end{aligned} \tag{6.33}\]

最后,对\(\beta = 1\)和集中质量矩阵,可以从方程(6.26)导出隐式格式en

Finally, for \(\beta = 1\) and a lumped mass matrix we can derive from Eq. (6.26) the implicit scheme

\[\left\{\frac{\Omega_i}{\Delta t_i}\bar{I} + \frac{1}{2}\left[\left(\bar{A}_c\right)_i\Delta S_{i+1/2} + \left(\bar{A}_c\right)_i\Delta S_{i-1/2}\right] - \frac{\partial(\Omega_i\vec{Q}_i)}{\partial\vec{W}} + \frac{1}{2}\left[\left(\bar{A}_c\right)_{i+1}\Delta S_{i+1/2}\right] + \frac{1}{2}\left[\left(\bar{A}_c\right)_{i-1}\Delta S_{i-1/2}\right]\right\}\Delta\vec{W}^n = -\vec{R}_i^n, \tag{6.34}\]

其中\(\bar{I}\)代表单位矩阵。应当注意,每个矩阵\(\bar{A}_c\)中的单位法向量都在与相应面积\(\Delta S\)相同的控制体一侧求值。可以看到,隐式算子涉及与空间离散化相同的三点模板(节点\(i-1\)、\(i\)和\(i+1\))。en

where \(\bar{I}\) stands for the identity matrix. It should be noted that the unit normal vector in each matrix \(\bar{A}_c\) is evaluated at the same side of the control volume as the associated area \(\Delta S\). As we can see, the implicit operator involves the same 3-point stencil (nodes \(i-1\), \(i\), and \(i+1\)) as the spatial discretisation.

图6.1:一维结构网格及相应的三点模板隐式算子矩阵

图6.1:一维结构网格及相应的三点模板隐式算子矩阵。图例:左上为模板(stencil)——节点\(L\)(\(i-1\))、\(D\)(\(i\))、\(U\)(\(i+1\));左下为网格(grid)——编号1至8的8个网格节点;右侧为隐式算子——\(8\times 8\)块三对角矩阵,非零块为\(L\)、\(D\)、\(U\),角落处为0。

图6.2:二维结构网格(左)及相应的五点模板隐式算子矩阵(右)

图6.2:二维结构网格(左)及相应的五点模板隐式算子矩阵(右)。图例:模板(stencil)由节点\(i,j\)及其四个邻居\(i-1,j\)、\(i+1,j\)、\(i,j-1\)、\(i,j+1\)组成;网格(grid)为\(8\times 4\)个节点,\(i\)方向编号1至8,\(j\)方向编号1至4;右侧矩阵中非零块矩阵以实心方块表示。

为了将系统矩阵可视化,把隐式算子中与中心节点\(i\)相关联的所有项记为\(\mathbf{D}\),即en

In order to visualise the system matrix, we denote all terms in the implicit operator associated with the central node \(i\) as \(\mathbf{D}\), i.e.,

\[\mathbf{D} \equiv \frac{\Omega_i}{\Delta t_i}\bar{I} + \frac{1}{2}\left[\left(\bar{A}_c\right)_i\Delta S_{i+1/2} + \left(\bar{A}_c\right)_i\Delta S_{i-1/2}\right] - \frac{\partial(\Omega_i\vec{Q}_i)}{\partial\vec{W}}, \tag{7}\]

把下游节点\((i+1)\)记为\(\mathbf{U}\),即en

with the downwind node \((i+1)\) as \(\mathbf{U}\), i.e.,

\[\mathbf{U} \equiv \frac{1}{2}\left(\bar{A}_c\right)_{i+1}\Delta S_{i+1/2}, \tag{8}\]

把上游节点\((i-1)\)记为\(\mathbf{L}\),即en

and with the upwind node \((i-1)\) as \(\mathbf{L}\), i.e.,

\[\mathbf{L} \equiv \frac{1}{2}\left(\bar{A}_c\right)_{i-1}\Delta S_{i-1/2}, \tag{9}\]

对图6.1中网格的全部8个节点写出方程(6.34),就得到图6.1右侧所示的\(8\times 8\)块三对角矩阵。一维情形下,每个块\(\mathbf{L}\)、\(\mathbf{D}\)和\(\mathbf{U}\)都是一个\(3\times 3\)矩阵(因为有三个守恒方程)。en

respectively. Writing down Eq. (6.34) for all eight nodes of the grid in Fig. 6.1, we obtain the \(8\times 8\) block-tridiagonal matrix displayed on the right side of Fig. 6.1. Each of the blocks \(\mathbf{L}\), \(\mathbf{D}\), and \(\mathbf{U}\) represents a \(3\times 3\) matrix in 1D (because of the three conservation equations).

同样的思想可以推广到多维。例如,若二维空间离散化涉及图6.2所示的五点模板,就会得到块五对角矩阵,如图6.2右侧所示。节点编号时让\(i\)指标比\(j\)指标变化得更快(对应FORTRAN中的\(mat(i,j)\))。应当注意,第二条次对角线与主对角线相距八个元素(即\(i\)方向的节点总数)。最后,如果空间离散化采用图4.9b的七点模板,三维情形的系统矩阵将变为块七对角矩阵。en

The same ideas carry over to multiple dimensions. For example, if the spatial discretisation in 2D would involve the 5-point stencil sketched in Fig. 6.2, we would obtain a block-pentadiagonal matrix. This is shown on the right side of Fig. 6.2. The nodes were ordered such that the \(i\)-index runs faster than the \(j\)-index (corresponds to \(mat(i,j)\) in FORTRAN). It should be noted that the second off-diagonal is at the distance of eight elements from the main diagonal (the total number of nodes in \(i\)-direction). Finally, the system matrix would become block-septadiagonal in 3D, if we would employ the 7-point stencil of Fig. 4.9b for the spatial discretisation.

总之,对结构网格,系统矩阵总是具有规则的、稀疏的带状形式。还应指出,方程(6.28)中的项en

In summary, we can state that the system matrix always possesses a regular, sparse and banded form for structured grids. It should be further mentioned that the term

\[\left(\Omega\bar{M}\right)_I/\Delta t_I \tag{6.35}\]

——它总是位于主对角线上——可能引起困难:当时间步长变大时,某些迭代矩阵求逆格式(如Gauss-Seidel)可能因隐式算子对角占优减弱而失效。en

in Eq. (6.28), which is always located on the main diagonal, can cause difficulties. Namely, if the time step becomes large, some iterative matrix inversion schemes (e.g., Gauss-Seidel) may fail due to reduced diagonal dominance of the implicit operator.

Implicit Operator on Unstructured Grids 非结构网格上的隐式算子

从结构网格过渡到非结构网格时,系统矩阵的外观完全改变。这一点可以借助图6.3所示的小型非结构网格来说明。设空间离散化由5.2.1小节的单元中心格式给出,该格式只使用最近邻单元的流动值(例如像一阶上风格式那样——见5.3.2和5.3.3小节)。于是,例如单元2的模板包括单元18、10和13。所得的系统矩阵显示在图6.3的右侧。显然,由于网格单元(中位对偶格式情形下为节点)一般按任意顺序编号,矩阵不会呈现出规则的模式。只有主对角线——它至少包含表达式(6.35),可能还包含源项的导数——总是存在。en

The appearance of the system matrix changes completely when we proceed from structured to unstructured grids. This can be demonstrated with the aid of a small unstructured grid sketched in Fig. 6.3. We want assume that the spatial discretisation is given by the cell-centred scheme presented in Subsection 5.2.1, which uses flow values only from the nearest neighbours (e.g., like a first-order upwind scheme - see Subsections 5.3.2 and 5.3.3). Thus, for example, the stencil for cell 2 includes the cells 18, 10, and 13. The resulting system matrix is displayed on the right side of Fig. 6.3. It is obvious that since the grid cells (nodes in the case of a median-dual scheme) are in general numbered in an arbitrary order, no regular pattern can be expected for the matrix. Only the main diagonal, which contains at least the expression (6.35) and possibly the derivative of the source term, is always present.

图6.3:二维非结构网格(左)及相应的最近邻模板隐式算子矩阵(右)

图6.3:二维非结构网格(左)及相应的最近邻模板隐式算子矩阵(右)。图例:左图三角形单元编号1至20;右侧矩阵中非零块矩阵以实心方块表示。

系统矩阵中非零元素的准随机分布是不可取的。它会减慢Gauss-Seidel等迭代求逆方法的收敛速度。此外,ILU(不完全下-上三角分解,Incomplete Lower-Upper)这类Krylov子空间方法的预条件技术也无法高效使用。因此,人们发展了通过对单元(节点)重新编号来大幅减小系统矩阵带宽的策略,即使非零元素聚集到主对角线附近。最著名的重新编号策略是逆Cuthill-McKee(Reverse-Cuthill-McKee,RCM)算法[27]、[28]。图6.4给出了把RCM算法应用于图6.3示例网格后得到的单元编号和系统矩阵。可以看到,矩阵的带宽显著减小,矩阵获得了更规则的结构。en

The quasi-random distribution of nonzero elements in the system matrix is undesirable. It slows down the convergence of iterative inversion methods like Gauss-Seidel. Furthermore, preconditioning techniques for Krylov-subspace methods like ILU (Incomplete Lower-Upper) factorisation scheme cannot be used efficiently. Therefore, strategies were developed where the cells (nodes) are renumbered such that the bandwidth of the system matrix is considerably reduced, i.e., the nonzero elements are clustered close to the main diagonal. The best-known renumbering strategy is the Reverse-Cuthill-McKee (RCM) algorithm [27], [28]. Figure 6.4 shows the resulting cell numbering and the system matrix when the RCM algorithm is applied to the example grid of Fig. 6.3. As we can see, the bandwidth of the matrix is significantly reduced and the matrix obtains a more regular structure.

图6.4:用逆Cuthill-McKee排序把图6.3隐式算子的带宽从18减至5

图6.4:用逆Cuthill-McKee(reverse-Cuthill-McKee)排序把图6.3隐式算子的带宽从18减至5。图例:左图为重新编号后的三角形单元网格(编号1至20);右侧矩阵中非零块矩阵以实心方块表示。

为了减少缓存未命中或允许数值格式向量化,还发展了其他一些重新编号策略。综述可参见例如文献[29]。en

Several other renumbering strategies were developed in order to minimise cache misses or to allow for vectorisation of the numerical scheme. An overview can be found, e.g., in Ref. [29].

6.2.2 Evaluation of the Flux Jacobian 通量雅可比的求值[cfd-6-2-2]

视底层空间离散化格式的类型而定,解析求出方程(6.28)中的通量雅可比\(\partial\vec{R}/\partial\vec{W}\)可能非常复杂,甚至不可能。为使概念更清晰,我们先对无黏流动导出通量雅可比,然后再讨论向Navier-Stokes方程的推广。en

Depending on the type of the underlying spatial discretisation scheme, an analytical evaluation of the flux Jacobian \(\partial\vec{R}/\partial\vec{W}\) in Eq. (6.28) may become very complex if not impossible. In order to make the concepts more clear, we shall derive the flux Jacobian for inviscid flows and then discuss the extension to the Navier-Stokes equations.

Central Scheme 中心格式

在中心空间离散化的情形下,通量雅可比最容易构造。如图6.1的例子所示,\(\partial\vec{R}/\partial\vec{W}\)由对流通量雅可比组成(参见方程(6.34)),它们可以解析导出(见A.9节)。人工黏性通常以简化形式纳入,即不含非线性压力传感器(方程(4.55))。这一点将在6.2.3小节再讨论。en

The flux Jacobian is most easily formulated in the case of the central spatial discretisation. As we already saw for the example in Fig. 6.1, \(\partial\vec{R}/\partial\vec{W}\) consists of the convective flux Jacobians (cf. Eq. (6.34)), which can be derived analytically (see Section A.9). Artificial viscosity is usually included in a simplified form, without the non-linear pressure sensor (Eq. (4.55)). We shall return to this point below in Subsection 6.2.3.

Flux-Vector Splitting Scheme 通量向量分裂格式

当以通量向量分裂格式(4.3.2小节)之一为基础来导出通量雅可比时,其求值变得更加复杂。为说明起见,考察Steger和Warming[30]的格式。已有的研究[31]表明,对隐式算子的各种上风离散化,Steger-Warming分裂比例如Van Leer的通量向量分裂格式(方程(4.60))更可取。en

The evaluation of the flux Jacobian becomes more involved when one of the flux-vector splitting schemes (Subsection 4.3.2) is used as the basis for its derivation. Let us, for illustration, consider the scheme due to Steger and Warming [30]. Previous investigations [31] revealed that the Steger-Warming splitting is preferable over, e.g., the Van Leer's flux-vector splitting scheme (Eq. (4.60)) for various upwind discretisations of the implicit operator.

Steger-Warming通量向量分裂格式的基本思想是把对流通量分成正、负两部分,即en

The basic idea of the Steger-Warming flux-vector splitting scheme is to divide the convective fluxes into a positive and a negative part, i.e.,

\[\vec{F}_c = \vec{F}_c^{+} + \vec{F}_c^{-} \tag{6.36}\]

其中通量定义为en

with the fluxes defined as

\[\vec{F}_c^{\pm} = \bar{A}_{SW}^{\pm}\vec{W} = \left(\bar{T}\bar{\Lambda}^{\pm}\bar{T}^{-1}\right)\vec{W}. \tag{6.37}\]

在方程(6.37)中,\(\bar{A}_{SW}^{\pm}\)表示正/负Steger-Warming通量分裂雅可比;\(\bar{T}\)表示右特征向量矩阵,\(\bar{T}^{-1}\)为左特征向量矩阵,\(\bar{\Lambda}^{\pm}\)代表正/负特征值构成的对角矩阵(参见A.11节)。特征值矩阵定义为[30]en

In Eq. (6.37), \(\bar{A}_{SW}^{\pm}\) denotes the positive/negative Steger-Warming flux-splitting Jacobian. Furthermore, \(\bar{T}\) represents the matrix of right eigenvectors, \(\bar{T}^{-1}\) the matrix of left eigenvectors, and \(\bar{\Lambda}^{\pm}\) stands for the diagonal matrix of positive/negative eigenvalues, respectively (cf. Section A.11). The eigenvalue matrices are defined as [30]

\[\bar{\Lambda}^{\pm} = \frac{1}{2}\left(\bar{\Lambda}_c \pm \left|\bar{\Lambda}_c\right|\right), \tag{6.38}\]

其中\(\bar{\Lambda}_c\)由方程(A.84)给出。利用方程(6.36)定义的分裂,对通量雅可比与方程(6.29)中更新量\(\Delta\vec{W}^n\)的乘积得到en

where \(\bar{\Lambda}_c\) is given by Eq. (A.84). Using the splitting defined in Eq. (6.36), we obtain for the product of the flux Jacobian with the update \(\Delta\vec{W}^n\) in Eq. (6.29)

\[\frac{\partial\vec{R}_I}{\partial\vec{W}}\Delta\vec{W}^n = \sum_{m=1}^{N_F}\left[\frac{\partial\left(\vec{F}_c^{+}\Delta S\right)_m}{\partial\vec{W}_{L,m}}\Delta\vec{W}_{L,m}^n + \frac{\partial\left(\vec{F}_c^{-}\Delta S\right)_m}{\partial\vec{W}_{R,m}}\Delta\vec{W}_{R,m}^n\right]. \tag{6.39}\]

在上面的方程(6.39)中,\(\Delta\vec{W}_{L,m}^n\)和\(\Delta\vec{W}_{R,m}^n\)分别表示面\(m\)处左状态和右状态的更新量。在结构网格上,左、右状态可以用MUSCL方法(方程(4.46))求值;在非结构网格上,可以采用5.3.3小节讨论的重构方法。然而,模板随精度提高而变宽,导致系统矩阵的带宽增大。因此,也为了降低数值复杂性,方程(6.39)中通常只采用一阶精度近似。作为一种折中,可以用更高精度重构左、右状态,但在求导数时保留一阶格式的模板[32]。en

In the above Eq. (6.39), \(\Delta\vec{W}_{L,m}^n\) and \(\Delta\vec{W}_{R,m}^n\) denote the updates of the left and right state at the face \(m\), respectively. On structured grids, the left and right state can be evaluated by the MUSCL approach (Eq. (4.46)). On unstructured grids, the reconstruction methods discussed in Subsection 5.3.3 can be applied. However, the stencil becomes wider with increasing accuracy, which leads to larger bandwidth of the system matrix. Therefore, and in order to reduce the numerical complexity, only first-order accurate approximation is usually employed in Eq. (6.39). As a compromise, we could reconstruct the left and right state with higher accuracy but retain the stencil of the first-order scheme for the evaluation of the derivatives [32].

为继续讨论方程(6.39)中导数\(\partial\vec{F}_c^{\pm}/\partial\vec{W}\)的求值,以面\(m\)处的正通量为例来考察en

To proceed with the discussion on the evaluation of the derivatives \(\partial\vec{F}_c^{\pm}/\partial\vec{W}\) in Eq. (6.39), let us consider, e.g., the positive flux at face \(m\)

\[\frac{\partial\left(\vec{F}_c^{+}\Delta S\right)_m}{\partial\vec{W}_{L,m}} = \frac{\partial}{\partial\vec{W}_{L,m}}\left[\left(\bar{A}_{SW}^{+}\vec{W}\right)_{L,m}\Delta S_m\right] \tag{5}\]

利用方程(6.37)和(6.38),它变为en

which becomes with Eqs. (6.37), (6.38)

\[\begin{aligned}\frac{\partial\left(\vec{F}_c^{+}\Delta S\right)_m}{\partial\vec{W}_{L,m}} = \frac{\Delta S_m}{2}\left[\left(\bar{A}_c\right)_{L,m} + \left|\left(\bar{A}_c\right)_{L,m}\right|\right] \\+ \frac{\Delta S_m}{2}\left[\frac{\partial\left(\bar{A}_c\right)_{L,m}}{\partial\vec{W}_{L,m}} + \frac{\partial\left|\left(\bar{A}_c\right)_{L,m}\right|}{\partial\vec{W}_{L,m}}\right]\vec{W}_{L,m}^n.\end{aligned} \tag{6.40}\]

对负通量也可以得到与方程(6.40)类似的表达式。可以看到,方程(6.40)的第一项由对流通量雅可比组成(见A.9节),因而没有困难;但第二项涉及矩阵元素的导数。虽然可以通过手工推导或使用符号代数软件解析地得到这些导数,但这会产生庞大而计算效率低下的代码[33]。另一种可能的做法是假定矩阵\(\bar{A}_c\)局部为常值,从而可以忽略方程(6.40)中的第二项。然而,视隐式格式的类型而定,这可能会严重限制CFL数[34]。en

An expression similar to Eq. (6.40) can also be found for the negative flux. As we can see, the first term in Eq. (6.40) consists of convective flux Jacobians (see Section A.9) and thus presents no difficulty. However, the second term involves derivatives of matrix elements. Although it is possible to obtain the derivatives analytically either by hand calculation or by using a symbolic algebra package, this will produce a large, computationally inefficient code [33]. Alternatively, it is possible to assume the matrix \(\bar{A}_c\) is locally constant so that the second term in Eq. (6.40) can be neglected. However, depending on the type of the implicit scheme, this may severely restrict the CFL number [34].

计算方程(6.39)中导数\(\partial\vec{F}_c^{\pm}/\partial\vec{W}\)的其他可行方法还有源代码的自动微分(例如使用ADIFOR[35])或有限差分法(参见例如[26]、[33])。这样,向量\(\vec{F}\)的第\(i\)个分量对因变量\(\vec{X}\)第\(j\)个分量的导数可以近似为en

Other approaches that we could use to compute the derivatives \(\partial\vec{F}_c^{\pm}/\partial\vec{W}\) in Eq. (6.39) would be the automatic differentiation of the source code (e.g., using ADIFOR [35]) or the finite-difference method (see, e.g., [26], [33]). Herewith, the derivative of the \(i\)-th component of a vector \(\vec{F}\) with respect to the \(j\)-th component of a dependent variable \(\vec{X}\) can be approximated as

\[\frac{\partial f_i}{\partial x_j} \approx \frac{f_i\left(\vec{X} + h_j\vec{e}^{\,j}\right) - f_i\left(\vec{X}\right)}{h_j}, \tag{6.41}\]

其中\(\vec{e}^{\,j}\)表示第\(j\)个标准基向量。Dennis和Schnabel[36]建议步长\(h_j\)取如下形式en

where \(\vec{e}^{\,j}\) denotes the \(j\)-th standard basis vector. Dennis and Schnabel [36] suggested a stepsize \(h_j\) of the form

\[h_j = \sqrt{\epsilon}\,\max\left\{\left|x_j\right|, \text{typ}\,x_j\right\}\,\text{sign}(x_j) \tag{6.42}\]

其中\(\epsilon\)为机器精度,\(\text{typ}\,x_j\)为\(x_j\)的典型大小。关于雅可比矩阵的高效数值求值,还可参阅[37]和[38]中的提示。en

with \(\epsilon\) being the machine accuracy and \(\text{typ}\,x_j\) a typical size of \(x_j\). The reader is also referred to [37] and [38] for hints on efficient numerical evaluation of Jacobian matrices.

Flux-Difference Splitting Scheme 通量差分分裂格式

对Roe的通量差分分裂格式(4.3.3小节,方程(4.91)),通量雅可比与方程(6.29)中更新量的乘积可以写为en

In the case of the flux-difference splitting scheme due to Roe (Subsection 4.3.3, Eq. (4.91)), we can write the product of the flux Jacobian with the update in Eq. (6.29) as

\[\begin{aligned}\frac{\partial\vec{R}_I}{\partial\vec{W}}\Delta\vec{W}^n = \sum_{m=1}^{N_F}\frac{\Delta S_m}{2}\Big\{ &\left(\bar{A}_c\right)_{L,m}\Delta\vec{W}_{L,m}^n + \left(\bar{A}_c\right)_{R,m}\Delta\vec{W}_{R,m}^n \\&- \frac{\partial}{\partial\vec{W}_{L,m}}\left[\left|\bar{A}_{Roe}\right|_m\left(\vec{W}_{R,m}^n - \vec{W}_{L,m}^n\right)\right]\Delta\vec{W}_{L,m}^n \\&- \frac{\partial}{\partial\vec{W}_{R,m}}\left[\left|\bar{A}_{Roe}\right|_m\left(\vec{W}_{R,m}^n - \vec{W}_{L,m}^n\right)\right]\Delta\vec{W}_{R,m}^n\Big\}.\end{aligned} \tag{6.43}\]

与通量向量分裂类似,表达式(6.43)既包含对流通量雅可比,也包含Roe矩阵\(\bar{A}_{Roe}\)的导数。这些导数已在[34]中给出。由于相应的公式非常复杂(另见文献[33]),更好的做法是像上文讨论的那样,用数值方法求值\(\partial\vec{F}_c/\partial\vec{W}\)项。en

Similar to flux-vector splitting, the expression (6.43) contains convective flux Jacobians as well as derivatives of the Roe matrix \(\bar{A}_{Roe}\). The derivatives were presented in [34]. Since the corresponding formulae are very complex (see also Ref. [33]), it is a better idea to evaluate the term \(\partial\vec{F}_c/\partial\vec{W}\) numerically, as discussed above.

不过,我们也可以假设Roe矩阵局部为常数[39],从而简化式(6.43):en

However, we can also simplify Eq. (6.43) by assuming locally constant Roe matrices [39]

\[\frac{\partial\vec{R}_I}{\partial\vec{W}}\Delta\vec{W}^n \approx \sum_{m=1}^{N_F}\frac{\Delta S_m}{2}\Big\{ \left(\bar{A}_c\right)_{L,m}\Delta\vec{W}_{L,m}^n + \left(\bar{A}_c\right)_{R,m}\Delta\vec{W}_{R,m}^n - \left|\bar{A}_{Roe}\right|_m\left(\Delta\vec{W}_{R,m}^n - \Delta\vec{W}_{L,m}^n\right)\Big\}. \tag{6.44}\]

与Steger-Warming通量向量分裂格式不同,上述近似线性化(6.44)对隐式格式性能的降低非常有限[34]。en

In contrast to the Steger-Warming flux-vector splitting scheme, the above approximate linearisation (6.44) degrades the performance of the implicit scheme only slightly [34].

Viscous Flows 黏性流动

对于Navier-Stokes方程,还必须在隐式算子中计入黏性通量。导数\(\partial\vec{F}_v/\partial\vec{W}\),即式(6.30)中的黏性通量雅可比,一般不容易直接得到。额外的复杂性来自黏性通量向量本身包含流动变量的导数这一事实。因此,要么用有限差分(式(6.41))求黏性通量雅可比,要么采用简化的形式。en

For the Navier-Stokes equations, we have to account also for the viscous fluxes in the implicit operator. The derivative \(\partial\vec{F}_v/\partial\vec{W}\), i.e., the viscous flux Jacobian in Eq. (6.30) is in general not straightforward to obtain. Additional complexity arises due to the fact that the viscous flux vector contains derivatives of flow variables. For this reason, we have either to evaluate the viscous flux Jacobian by finite differences (Eq. (6.41)), or we have to use a simplified formulation.

在Navier-Stokes方程的TSL近似下(参见2.4.3小节与附录A.6节),通过假设动力黏度与热传导系数局部为常数,可以解析地求出黏性通量雅可比。于是,根据附录A.10中的讨论,式(6.29)中与黏性通量相关的项变为en

In the case of the TSL approximation of the Navier-Stokes equations (cf. Subsection 2.4.3 and Section A.6), it is possible to find the viscous flux Jacobian analytically by assuming locally constant dynamic viscosity and thermal conductivity coefficients. Then, according to the discussion in Appendix A.10, the term related to the viscous fluxes in Eq. (6.29) becomes

\[\frac{\partial(\vec{F}_v\Delta S)_m}{\partial\vec{W}}\Delta\vec{W}^n \approx \left[\left(\bar{A}^{*}_v\right)_{R,m}\Delta\vec{W}_{R,m}^n - \left(\bar{A}^{*}_v\right)_{L,m}\Delta\vec{W}_{L,m}^n\right]\Delta S_m. \tag{6.45}\]

在上式(6.45)中,\(\bar{A}^{*}_v\)表示由式(A.71)或式(A.75)给出的黏性通量雅可比,但不含空间算子\(\partial_y(\cdot)\)(参见式(A.74)与(A.79))。除动力黏度取算术平均外,这些雅可比对其余所有变量要么用左状态、要么用右状态求值。应当指出,假如左右状态以一阶精度计算,式(6.45)在隐式算子中给出的是二阶中心差分近似。en

In above Eq. (6.45), \(\bar{A}^{*}_v\) stands for the viscous flux Jacobian given by Eq. (A.71) or Eq. (A.75) but without the spatial operators \(\partial_y(\cdot)\) (cf. Eq. (A.74) and (A.79)). The Jacobians are evaluated using either the left or the right state for all variables except for the dynamic viscosity, which is determined from an arithmetic average. It should be mentioned that Eq. (6.45) leads to a second-order central difference approximation in the implicit operator, supposed the left and right state are computed with first-order accuracy.