3-Numerical Methods: Difference between revisions

From CIRPwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 310: Line 310:
\|r\|_2 = \sqrt {\sum_{cells P}r_P^2}
\|r\|_2 = \sqrt {\sum_{cells P}r_P^2}
</math>(3-24)
</math>(3-24)
Since this value depends on the total number of cells, the final statistic (referred to as the residual) that is used for estimating the model convergence is obtained by dividing the norm by the number of cells
::<math>
R^m = \frac{\|r\|_2} {\sqrt{N_c}}
</math>(3-25)
<math>R^m</math>  is referred to as the “normalized residual error” and the superscript refers to the iteration number.  <math>R^m</math>is calculated for each variable that is solved at each iteration step of the solution process. Each equation has default maximum tolerances for determining if the solution has converged, diverged, or stalled. The maximum number of iterations that is imposed is set equal to M. A minimum of 5 iterations are required for the hydrodynamic equations, and a minimum of M/2 iterations are required for the sediment transport equations. Table 3-1 lists the default criteria to determine whether the iterative solution procedure has converged, diverged, or requires a reduced time step.
Table 3-1. Default criteria to determine whether the iterative solution procedure has converged, diverged, or requires a reduced time step.
<table border>
<tr>
<td>Variable</td><td>Converged</td><td>Diverged</td><td>Reduce Time Step</td></tr>
<tr><td>Current velocity, m/s</td><td>If R<sup>m</sup> < 1x10<sup>-7</sup> or | R<sup>m</sup>-R<sup>m-2</sup>| < 1x10<sup>-7</sup></td></tr>
<tr><td>Pressure-correction, m<sup>2</sup>/s<sup>2</sup></td></tr>
<tr><td>Total-load concentration, kg/m<sup>3</sup></td></tr>
<tr><td>Salinity, ppt</td></tr>
</table>

Revision as of 20:13, 29 July 2014

3 Numerical Methods

Overview

CMS-Flow has both implicit and explicit solution schemes. The explicit solver is designed for dynamic problems with extensive wetting and drying that require small computational time steps, while the implicit solver is intended for simulating tidal- and wave-induced circulation at tidal inlets, navigation channels, and adjacent beaches. A detailed description of the numerical formulation of the explicit solver of CMS-Flow can be found in Buttolph et al. (2006) and is not repeated here. The sections below specifically refer to the implicit solver of CMS-Flow.

The implicit solver uses the SIMPLEC algorithm (Van Doormal and Raithby 1984) on a non-staggered grid to handle the coupling of water level and velocity. Primary variables u-, v-velocity, and water level are stored on the same set of grid points, and fluxes at cell faces are determined using a Rhie and Chow (1983) type momentum interpolation method (Wu et al. 2011). The explicit solver uses a staggered grid with velocities at the cell faces and the water levels and water depths at the cell centers (Buttolph et al. 2006a). CMS-Flow also calculates salinity, sediment transport, and morphology change.

CMS-Flow Computational Grid

The implicit version of CMS-Flow uses a generic Cartesian grid which can be regular, nonuniform, or locally refined by splitting a cell into four subcells. Three requirements are necessary for the input grid:

1. Cells must have a rectangular shape. Irregularly shaped cells are not allowed.
2. Cells may have a total of four to six neighboring cells (faces).
3. Only two neighboring cells are allowed in the same direction (i.e. North, South, East, West).

Mesh refinement can be achieved either by locally decreasing the grid spacing (nonuniform Cartesian grid) as shown in the left panel of Figure 3.1 or by subdividing or splitting a cell into multiple cells as shown in the right panel of Figure 3.1. The refined mesh can be further refined and split in multiple levels, as needed. This mesh is referred to here as a telescoping mesh.

Figure 3.1. Examples of a Cartesian grids allowed in CMS: Stretched Cartesian (left) and telescoping grid (right)

One important aspect of incompressible flow models is the location of primary variables: velocity and pressure (water level). On a staggered grid, the pressure (water level) is located at the center of cells and the u- and v-velocities are located along the faces of cells (Harlow and Welsh 1965; Patankar 1980). On a non-staggered grid, all of the primary variables are located at the center of cells. A staggered grid can more easily eliminate the checkerboard oscillations when compared to a non-staggered grid; however, a non-staggered grid involves a simpler source code and can minimize the number of coefficients that must be computed and stored during a simulation because many of the terms in the equations are approximately equal. In particular, a staggered grid is more complicated when handling the interface between coarse and fine cells where five- or six-face control volumes are used. Therefore, a non-staggered (collocated) grid approach is adopted for CMS-Flow, with a Rhie and Chow (1983) momentum interpolation technique used to eliminate the checkerboard oscillations. Figure 3.1 shows the location of primary variables and the 5- and 7-point stencils (computational molecule) used in the calculations for CMS-Flow.

The data structure for a grid can be approached in three ways: 1) block-structured, 2) hierarchical tree, and 3) unstructured. The block-structured approach divides the domain into multiple blocks and each block is treated as structured. A special treatment is applied between blocks to ensure mass and momentum balance using this approach. The hierarchical tree approach is memory intensive and requires parent-child relationships and a tree traverse to determine mesh connectivity. For the unstructured approach, all cells are numbered in a one-dimensional sequence and tables are used to determine the connectivity of neighboring cells. Among these three approaches, the unstructured approach is the most simple and is therefore applied in CMS-Flow.

Computational cells are numbered in an unstructured manner via a 1-D index array. Inactive cells (permanently dry) are not included in the 1-D index array to save memory and computational time. All active computa-tional nodes are numbered sequentially. For convenience with handling boundary conditions, each boundary cell has a neighboring ghost cell outside of the computational domain. Each ghost cell corresponds to a boundary face of the boundary cell. The ghost cells are stored at the end of the 1-D index array.

General Transport Equation

In order to avoid redundant derivations of discretized equations, discretization of a general transport equation is outlined and described below. All of the governing equations are some form of this transport equation; therefore, the same discretization may be applied to all of the governing equations. The general transport equation is given by

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \underbrace { \frac {\partial(h\phi)} {\partial t} }_{\text {Temporal Term}} + \underbrace {\frac{\partial(hV_j \phi)} {\partial x_j} }_{\text{Advection Term}} = \underbrace { \frac{\partial}{\partial x_j} \left(\Gamma h \frac{\partial \phi}{\partial x_j} \right) }_{\text{Diffusion Term}} + \underbrace{S_\phi}_{\text{Source Term}} } (3-1)

where Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi} is a general scalar, t is time, h is the total water depth, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle V_j} is the transport velocity, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \Gamma} is the diffusion coefficient for Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi} , and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle S_\phi} includes all remaining terms. Note that in the case of the continuity and momentum equations, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi} is equal to 1 and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle U_j} , respectively.

Spatial Discretization

A control-volume technique is used in which the governing equations are integrated over a control volume to obtain an algebraic equation that can be solved numerically. Integration of Equation (3-1) over a control volume yields:


Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \int_A \frac {\partial(h\phi)}{\partial t} dA + \int_A \frac {\partial}{\partial x_j}\left(hV_j \phi - \Gamma h\frac{\partial \phi}{\partial x_j} \right)dA = \int_A S_\phi dA } (3-2)
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \frac {\partial (h_P \phi_P)} {\partial t} \Delta A_P + \int_L h[(\hat{n_i}V_i)\phi - \Gamma(\hat{n_i}\bigtriangledown_i \phi)]dL = S_\phi \Delta A_p } (3-3)
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \frac {\partial (h_P \phi_P)} {\partial t} \Delta A_P + \sum_f h_f \left [U_f \phi_f - \Gamma_f(\bigtriangledown_\perp \phi)_f \right]\Delta l_f = S_\phi \Delta A_p } (3-4)

where

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \hat{n_i} = (\hat{n_1} , \hat{n_2})} = outward unit vector normal to cell face f
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle V_f = (\hat{n_i}V_i)_f} = outward cell face velocity
h_f = linearly interpolated total water depth at the cell face f
Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle (\bigtriangledown_\perp \phi)_f = (\hat{n_i}\bigtriangledown_i \phi)_f} is the outward normal gradient of Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi} at cell face f

The above equations, the Green-Gauss Theorem has been used to convert the area integral to a boundary integral. The symbol () indicates the cell face linear interpolation operator. The cell face velocity,Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle V_f} , is calculated using a momentum interpolation method similar to that of Rhie and Chow (1983) and is described in a subsequent section.

Temporal Discretization

The general transport equation is rewritten as

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \int \frac {\partial (h\phi)} {\partial t} dt = \int F dt } (3-5)

where includes all the remaining terms, such as …. For stability and efficiency, a fully implicit time-stepping scheme is used in the form

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \frac {(1 + 0.50\theta)h^{n+1}\phi^{n+1} - (1+\theta)h^n \phi^n + 0.5\theta h^{n-1}\phi^{n-1}} {\Delta t} = F^{n+1} } (3-6)

where Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \theta} is a weighting factor between 0 and 1. For Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \theta = 0} , the scheme reduces to the first-order backward Euler scheme, and with Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \theta = 1} , the scheme reduces to the second-order backward scheme (Ferziger and Peric 1997). The superscripts indicate the time step levels, with n+1 being the current timestep and n being the previous timestep.

Cell-face interpolation operator

The general formula for estimating the cell-face interpolation operator (?) value of Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi_f} is given by

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi_f = f_\perp \phi_N + (1-f_\perp)\phi_P + f_\perp(r_\Box \bigtriangledown_\Box \phi)_N + (1-f_\perp) (r_\Box \bigtriangledown_\Box \phi)_P } (3-7)

where Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle f_\perp} is a linear interpolation factor, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \bigtriangledown_\Box} is the gradient operator in the direction parallel to face f, and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle r_\Box} is the distance from the cell center to the ghost point O parallel to the cell face f (see Figure 3.2).

Figure 3.2. Schematic showing two types of refined cells.

By definition,Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \Box = 2\mid \hat{n_1}\mid + 1\mid \hat{n_2}\mid } and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \perp = 1\mid \hat{n_1}\mid + 2\mid \hat{n_2}\mid} . Note that for neighboring cells without any refinement, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle r_\Box} is equal to zero and the above equation is consistent with non-refined cell faces. The linear interpolation factor is defined as

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle f_\perp = \frac {x_{\perp ,f} - x_{\perp,P}} {x_{\perp N} - x_{\perp ,P}} = \frac {\Delta x_{\perp ,P}} {\Delta x_{\perp , P} + \Delta x_{\perp , N}} } (3-8)

where is the coordinate of f perpendicular to the face and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \Delta x_\perp} is the cell dimension perpendicular to the face f.

Advection Schemes

Hybrid Scheme

The hybrid scheme is a composed of a first-order upwind scheme and a second-order central difference scheme. When the Peclet number, , is larger than 2, the first-order upwind scheme is used; otherwise, the second-order central difference scheme is used:

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi_f = \left\{ \begin{align} &(\phi_D + \phi_c)/ 2 &for \mid P_f \mid < 2 \\ &\phi_c &for \mid P_f \mid > 2 \end{align} \right. } (3-9)

where the subscripts D and C indicate the first downstream and first upstream nodes and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle P_f = U_f \mid \delta_\perp \mid / \bar{\Gamma_f}} is the Peclet number at the cell face in which Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \mid \delta_\perp \mid = \mid x_{\perp ,N} - x_{\perp ,P}} .

Exponential Scheme

The exponential scheme interpolates the face value using an exact solution to the 1-D steady advection-diffusion equation:

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \frac {\phi_f - \phi_0}{\phi_L - \phi_0} = \frac {exp(P_f x_f /\mid \delta_\perp \mid)-1} {exp(P_f)-1} } (3-10)

where Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi_0 = \phi \mid_{x=0},\phi_L = \phi\mid_{x=L}} . The exponential scheme has automatic upwinding and is stable, but is usually less than second order.

Hybrid Linear/Parabolic Scheme

The Hybrid Linear/Parabolic Approximation scheme of Zhu (1991) may be written as

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi_f = \left\{ \begin{align} &\phi_c + (\phi_d - \phi_c)\hat{\phi_c} &for 0 \leq \hat{\phi_c} \leq 1 \\ &\phi_c &otherwise \end{align} \right. } (3-11)

where the subscripts D, C and indicate the first downstream and first and second upstream cells, respectively. The normalized variable, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \hat{\phi_c}} , is determined based on the formulation of Jasak et al. (1999)

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \hat{\phi_c} = \frac {\phi_C - \phi_U} {\phi_D - \phi_U} = 1 - \frac {\phi_D - \phi_C} {2(\bigtriangledown_\perp \phi)_C \delta_{\perp,C} } } (3-12)

where Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \sigma_{\perp, C} = x_{\perp,D} - x_{\perp,C}} . The Hybrid Linear/Parabolic Approximation scheme is second order.

Cell-face gradient operator

A linearly exact second-order approximation for the normal gradient at cell face f is calculated using the auxiliary node concept of Ferziger and Peric (1997)

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle (\bigtriangledown_\perp \phi)_f = \frac {\phi_N - \phi_P + (r_\Box \bigtriangledown_Box \phi)_N - (r_\Box \bigtriangledown_\Box \phi)_p} {\mid \sigma_\perp \mid} } (3-13)

where the subscripts P and N refer to two neighboring cells, Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \mid \sigma_\perp \mid = \mid x_{\perp,N} - x_{\perp,P} \mid} is the distance between cells P and N, normal to the cell face (see Figure 3.2), and Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \bigtriangledown_\Box} is the gradient operator in the direction par-allel to face f. Ham et al. (2002) compared the auxiliary node formulation to the fully-unstructured discretization proposed by Zwart et al. (1998) for the viscous terms and found that the auxiliary node formulation is significantly more stable.

Cell-centered gradient operator

The cell-centered gradient operator is calculated using the Green-Gauss Theorem as

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \int_A \bigtriangledown_i \phi dA = \sum_f \hat{n_i} \phi_f \Delta l_f} (3-14)

Equation 3-14 above is second order and conservative for regular and nonuniform grids.

Reconstruction, Monotonicity, and Slope Limiters

Given a conservative average value Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \bar{\phi}} within a cell, a linear reconstruction of the variable is used within that cell. This can be expressed as

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \phi = \hat{\phi} + \overrightarrow{r}\cdot \bigtriangledown_\phi } (3-15)

The reconstruction is conservative in the sense that Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \int_\omega \phi dA} . If the reconstruction satisfies the local maximum principle

Failed to parse (SVG with PNG fallback (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle min(\phi - \bar{\phi},0) \leq \overrightarrow{r}\cdot \bigtriangledown_\phi \leq max(\phi - \hat{\phi},0) } (3-16)

then no new extrema are created within the cell and the solution is monotonic. Figure x shows two examples of linear reconstruction with and without slope limiters to ensure monotonicity.

then no new extrema are created within the cell and the solution is monotonic. Figure x shows two examples of linear reconstruction with and without slope limiters to ensure monotonicity.

Figure 3.3. Schematics showing examples of non-limited (a) and limited (b) linear reconstructions.

For non-telescoping grids, the slope limiter is calculated as

where r is the ratio between two consecutive slopes

(3-18)

Here the second-order van Leer (1979) limiter is used because of its smoothness. Figure X shows a comparison of three different common limiters. The slope limiter is applied in each direction separately.

Figure 3.4. Comparison of three different slope limiters.

For joint cells, the standard slope limiters described above are difficult to implement because of the difficulty in defining forward and backward differences. Therefore for joint cells, a variation of the Limited Central Difference (LCD) slope limiting procedure of Hubbard (1999)

where . In the procedure outlined by Hubbard (1999), a scalar limiter is then calculated as . For telescoping grids a directional limiter can be calculated as , which is less dissipative. Look at this again

Source/sink term

The source/sink term is linearized as (Patankar 1980)

(3-20)

where is the cell area, and is approximated as the cell-average source/sink term. The coefficient is required to be non-positive for stability.

Assembly of Algebraic Equations

Assembly refers to the process of combining terms to create a linear sys-tem of algebraic equations. The algebraic equation for each cell is obtained by first combining or assembling all of the terms. Then, the continuity equation is multiplied by and is subtracted from the transport equation. The resulting discretized equation for cell P is


(3-21)

where the subscript N refers to the neighboring cell sharing cell face, and are linear coefficients for and . The last term, , con-tains all the remaining terms (such as…name the specific terms here). Applying a similar equation for all of the internal cells of a grid results in a system of algebraic equations. This set of equations are referred to as the discretized governing equations.

Implicit Relaxation

Under-relaxation stabilizes the convergence of the outer non-linear iteration loop by introducing a relaxation parameter in the discretized equations (Patankar 1980) as


(3-22)

where is an under-relaxation parameter and is the value of from the previous iteration. An effect of under-relaxation is to make the coefficient matrix more diagonally dominant.

Iterative Solvers

The selection of an iterative solver is one key issue concerning the overall per-formance of the model. CMS has three iteration solvers available and they are described in more detail below: 1) GMRES variation, 2) BiCGStab, and 3) Gauss-Seidel. The default iterative solver for CMS is a variation of the GMRES (\underline{G}eneralized \underline{M}inimum \underline{RES}idual) method (Saad 1993) and is used to solve the algebraic equations. The original GMRES method (Saad and Schultz 1986) utilizes the Arnoldi process to reduce the coefficient matrix to the Hessenburg form and minimizes the norm of the residual vector over a Krylov subspace at each iterative step. The variation of the GMRES method recommended by Saad (1993) allows changes in preconditioning at every iteration step. An Incomplete LU Factorization (ILUT; Saad, 1994) is used as the preconditioner to speed-up convergence. The GMRES solver is applicable to symmetric and non-symmetric matrices and leads to the smallest residual for a fixed number of iterations. However, the memory requirements and computational costs become increasingly expensive for larger systems.

The BiCGStab (BiConjugate Gradient Stabilized) iterative solver is also a Krylov subspace solver and is applicable to symmetric and non-symmetrix matrices (Saad 1996). BiCGStab also uses ILUT as a preconditioner (Saad 1994). The BiCGStab method can be viewed as a combination of the standard Biconjugate Gradient solver where each iterative step is followed by a restarted GMRES iterative step. One advantage of the BiCGStab iterative solver is that the memory requirements are constant for each iteration and there are less computational costs when compared to the GMRES method (for GMRES restart numbers larger than 4).

The simplest iterative solver implemented in CMS is the point-implict Gauss-Seidel solver. This method may be applied in CMS with or without Succesive-Over-Relaxation to speed-up convergence (Patankar 1980). Even though the Gauss-Seidel method requires more iterations for convergence, the overall efficiency may be higher than the GMRES and BiCGStab because each itera-tion is computationally inexpensive and the code is parallelized. However, the GMRES and BiCGStab methods are more robust and perform better for large time steps.

Convergence and Time-Stepping

During the iterative solution process, error is calculated and used to de-termine if a solution has converged, diverged, or stalled at an error below a set tolerance threshold. Anestimate of the error in solving the general algebraic equation is given by

(3-23)

Statistics (such as…) can be defined based on normalized errors. For ex-ample, the -norm is given by

(3-24)

Since this value depends on the total number of cells, the final statistic (referred to as the residual) that is used for estimating the model convergence is obtained by dividing the norm by the number of cells

(3-25)

is referred to as the “normalized residual error” and the superscript refers to the iteration number. is calculated for each variable that is solved at each iteration step of the solution process. Each equation has default maximum tolerances for determining if the solution has converged, diverged, or stalled. The maximum number of iterations that is imposed is set equal to M. A minimum of 5 iterations are required for the hydrodynamic equations, and a minimum of M/2 iterations are required for the sediment transport equations. Table 3-1 lists the default criteria to determine whether the iterative solution procedure has converged, diverged, or requires a reduced time step.

Table 3-1. Default criteria to determine whether the iterative solution procedure has converged, diverged, or requires a reduced time step.

VariableConvergedDivergedReduce Time Step
Current velocity, m/sIf Rm < 1x10-7 or | Rm-Rm-2| < 1x10-7
Pressure-correction, m2/s2
Total-load concentration, kg/m3
Salinity, ppt