CMS-Flow Numerical Methods:General Transport Equation: Difference between revisions

From CIRPwiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 372: Line 372:
The ramp function is applied to the model forcing conditions, including the wave forcing <math>\tau_i^w</math> , surface wind <math>\tau_i^s</math> , sediment concentration capacity <math>C_{tk*}</math> , and significant wave height <math>H_s</math>  , by direct multiplication of these parameters by the ramp function at each time step during the ramp period. Boundary conditions in CMS are specified without consideration of this ramp period; therefore, the boundary conditions are also slowly transitioned from the initial condition by direct multiplication of the boundary conditions by the ramp function at each time step during the ramp period.
The ramp function is applied to the model forcing conditions, including the wave forcing <math>\tau_i^w</math> , surface wind <math>\tau_i^s</math> , sediment concentration capacity <math>C_{tk*}</math> , and significant wave height <math>H_s</math>  , by direct multiplication of these parameters by the ramp function at each time step during the ramp period. Boundary conditions in CMS are specified without consideration of this ramp period; therefore, the boundary conditions are also slowly transitioned from the initial condition by direct multiplication of the boundary conditions by the ramp function at each time step during the ramp period.


'''Hydrodynamics
Momentum and Continuity'''
The governing equations are solved in a segregated manner in which each governing equation is linearized and solved separately in a sequential manner within an iteration loop in order to obtain a converged solution. Coupling between the velocity (momentum) and water level (continuity) is achieved with the SIMPLEC algorithm (van Doormal and Raithby 1984). The main difficulty in solving the momentum equations is that the water level is not known a priori and must be calculated as part of the solution. The solution algorithm procedure is described below. First, an initial pressure <math>p^* = \rho g \overline{n}^*</math>  is estimated based on the previous time step value. Then, the momentum equations are solved for the corresponding velocity
::<math>
\frac {\partial (hV_i^*)}{\partial t} + \frac {\partial (hV_j^* V_i^*)} {\partial x_j} = \frac {\partial}{\partial x_j} \left (v_t h \frac{\partial V_i^*}{\partial x_j}    \right) - \frac{h}{\rho} \frac{\partial p^*}{\partial x_i} + S_i^*
</math>(3-27)
where <math>S_i^*</math>  includes all the remaining terms. The inter-cell velocities are calculated with a Rhie and Chow (1983) type interpolation method
::<math>
V_f^* = (H_\perp^*)_f - \left(\frac{\Delta A_P}{a_P} \right)_f \left(\frac{h}{\rho}\bigtriangledown_\perp p^*    \right)_f
</math>(3-28)
where <math>(H_\perp^*)_f = V_\perp^* + \frac{\Delta A_p}{a_p}\frac{h}{\rho}\bigtriangledown_\perp p^*</math> and <math> \left(\frac{h}{\rho}\bigtriangledown_\perp p^*    \right)_f</math>  denotes the linear interpolation operator. This method avoids the checkerboard oscillations associated with the collocated grid. It is noted that this approach is slightly different from Lai (2010) and others and was found to be significantly more stable.
Next, the velocity <math>V^'</math>  and pressure corrections <math>p^'</math>  are defined such that both the momentum and continuity equations are satisfied
::<math>
V_i^{n+1} = V_i^* + V_i^' , p^{n+1} = p^* + p^'
</math>(3-29a,b)
Subtracting the initial velocity equation from the momentum equation leads to velocity correction equation
::<math>
\frac {\partial(hV_i^')}{\partial t} + \frac{\partial(hV_i^'V_j^')}{\partial x_j} = \frac{\partial}{\partial x_j} \left(v_t h \frac{\partial V_i^'}{\partial x_j}  \right) - \frac{h}{\rho} \frac{\partial p^'}{\partial x_i}
</math>(3-30)
This equation can be written in the discretized form as
::<math>
a_p V_{i,P}^' = \sum a_N V_{i,N}^' - \frac{h}{\rho} \bigtriangledown_i p_P^' \Delta A_P
</math>(3-31)
In the SIMPLEC algorithm, the velocity correction is assumed to vary smoothly so that <math>\sum a_N V_{i,N}^'</math>  may be approximated as <math>V_{i,P}^' \sum a_N</math> , which leads to the velocity correction equation
::<math>
V_i^' = -G\bigtriangledown_i p^'
</math>(3-32)
where
<math>G = (h \Delta A_p / \rho) / \left (a_p - \sum a_N  \right)</math> . Using <math>\partial h / \partial t = \partial p /(\rho g \partial t)</math> 
and substituting  <math>V_i^{n+1} = V_i^* + V_i^'</math> in the continuity equation yields the semi-discrete water level correction equation
::<math>
\frac {(1+0.5\theta)(p^* +p^')- (1 + \theta)p^n + 0.5 \theta p^{n-1}} {\rho g \Delta t} = \frac{\partial}{\partial x_j} \left(hG \frac{\partial p^'}{\partial x_j}  \right) - \frac{\partial (hV_j^*)}{\partial x_j}
</math>(3-33)
Note that at convergence, <math>p^' = 0</math> and the Equation 3-28 reduces to the continuity equation. Once the pressure correction equation is solved, the cell-centered water levels and current velocities are corrected. The cell face velocities are also corrected as <math>V_f^{n+1} = V_f^* + V_f^'</math>  , in which the velocity correction is given by <math>V_f^' = -G_f(\bigtriangledown_\perp p^')_f</math> .
''Summary of the SIMPLEC Algorithm:''
1. Guess the water level and pressure field <math>p^*</math>
2. Solve the momentum equations (give Equation numbers here) to obtain <math>V_i^*</math>
3. Use the Rhie and Chow (1983) momentum to determine the velocities and fluxes at cell faces
4. Solve the pressure equation (give Equation number here) to obtain <math>p^'</math>
5. Use the correction equations to adjust the velocities and water levels
6. Treat the corrected water level and pressure field as a new guess, and repeat this procedure from Step 2 until convergence
'''Wetting and Drying'''
During numerical simulations of the surface water flows with sloped beaches, sand bars, and islands, the land-water interface changes with time.  This means that it is possible for nodes at the land-water interface to be wet or dry throughout a given simulation.  In CMS, a threshold water depth is used to judge drying and wetting. If the depth at the cell center is larger than the threshold value (i.e. a small value such as 0.02 m for field cases), then the node is considered to be wet. Similarly, if the depth at the cell center is smaller than the threshold value, then the node is considered to be dry. For the implicit solver, all of the wet and dry cells are included in the matrix solver. Dry cells are assigned with a zero velocity. Cell faces are classified as either open (if the two cells neighboring cells are wet) or closed (i.e. cell faces are not classified as wet or dry).
'''Sediment Transport
Transport Equations'''
The sediment transport equations are discretized using the methods de-scribed in the previous section entitled General Transport Equation and are not repeated here.
'''Mixing Layer'''
The mixing layer or active layer thickness calculation is slightly modified to avoid excessively small layers and for cases of strong deposition as
::<math>
\delta_1 = min \left[max(\delta_{1,min}, 2d_{50},\Delta /2),\delta_{1,max} \right]
</math>(3-34)
where <math>\Delta</math>  is the bed form height and <math>\delta_{1,min}</math>  and <math>\delta_{1,max}</math>  are the user speci-fied the minimum and maximum mixing layer thicknesses, respectively.
'''Bed Material Sorting''
The bed material sorting equation (Equation 2-53) is discretized as
::<math>
\delta_1^{n+1} p_{1k}^{n+1} = \Delta z_{bk} + \delta_1^n p_{1k}^n + \Delta z_2 p_k^{*n}
</math>(3-35)
where <math>\Delta z_2 = \delta_1^{n+1} -\delta_1^n - \Delta z_1</math>  is the change in the top elevation of the second bed layer and <math>p_k^{*n} = p_{1k}^n</math>  for <math>\Delta z_2 \geq 0</math>  and <math>p_k^{*n} = p_{2k}^n</math>  for <math>\Delta z_2 < 0 </math> . The bed material gradation in the second layer is calculated from the following discretized form of Equation 2-54
::<math>
\delta_2^{n+1}p_{2k}^{n+1} = \delta_2^n p_{2k}^n - \Delta z_2 p_k^{*n}
</math>(3-36)
In order to avoid sediment layers from becoming extremely thin or thick, a layer merging and splitting algorithm is implemented between layers 2 and 3. Here, the subscript s corresponds to the second layer. To illustrate the bed layering process, Figure 3.6 shows an example of the temporal evolution of 7 bed layers during erosional and depositional regimes.
Figure 3.6. Example bed layer evolution. Colors indicate layer number.
'''Avalanching'''
When the slope of a non-cohesive bed,<math>\phi_b</math>  , is larger than the angle of repose, <math>\phi_R</math> , the bed material will slide (avalanche) to form a new slope ap-proximately equal to the angle of repose. The process of avalanching is simulated by enforcing <math>|\phi_b | \leq \phi_R</math> while maintaining mass continuity between adjacent cells. The following equation for bed change due to ava-lanching is obtained by combining the equation for angle of repose and the continuity equation between two adjacent cells:
::<math>
\Delta z_{b,p}^a = -\alpha_a \sum_N \frac{\Delta A_N | \delta_N |} {\Delta A_P + \Delta A_N}(tan \phi_b - sgn \phi_b tan \phi_R))H(|\phi_b| - \phi_R)
</math>(3-37)
where <math>\delta_N </math>  is the cell center distance between cells ''P''  and ''N'' , <math>\Delta</math>  is the cell area, <math>\alpha_a</math>  is an under-relaxation factor (approximately 0.25-0.5), and H(X)  is the Heaviside step-function representing the activation of avalanching and equal to 1 for <math>X \geq 0</math> and 0 for X < 0. The sign function, ''sgn X''  , is equal to 1 for <math>X \geq 0</math> and -1 for <math>X < 0</math> and accounts for the fact that the bed slope may have a negative or positive sign. Equation 3-32 is applied by sweeping through all computational cells to calculate <math>\Delta z_b^a</math>  and then modifying the bathymetry as <math>z_b^{m+1} = z_b^m + \Delta z_b^a</math> . Because avalanching between two cells may induce additional avalanching at neighboring cells, the above sweeping process is repeated until avalanching no longer occurs.
The under-relaxation factor, <math>\alpha_a</math>  , is used to stabilize the avalanching pro-cess and to avoid overshooting since the equation is derived considering only two adjacent cells but is summed over all (avalanching) neighboring cells. Equation 3-32 above may be applied to any grid geometry type (i.e. triangles, rectangles, etc.) and for situations in which neighboring cells are joined at corners without sharing a cell face.
'''Hard bottom'''
The sediment transport and bed change equations assume a loose bottom in which the bed material is available for entrainment. However, hard bottoms may be encountered in practical engineering applications where bed materials are non-erodible, such as bare rocks, carbonate reefs, and concrete coastal structures. Hard-bottom cells in CMS are handled by modifying the equilibrium concentration as <math>C_{t*}^' = min(C_{t*}, C_t)</math>  in both the sedment transport and bed change equations. The bed-slope term in the bed change equation is also modified so that only deposition (no erosion) may occur at hard-bottom cells.
Implicit Semi-Coupling Procedure
For a semi-coupled sediment transport model, the sediment calculations are decoupled from the hydrodynamics but the sediment transport, bed change, and bed material sorting equations are coupled at the timestep level and thus solved simultaneously.  A modified form of the iteration procedure of Wu (2004) is implemented in CMS. The equations are ob-tained by substituting <math>C_{t*k}^{n+1} = p_{1k}^{n+1}C_{tk}^{n+1}</math>  into the bed change and sorting equations and then substituting the sorting equation into the bed change equation.
The solution procedure of sediment transport in CMS is as follows:
::1. Calculate bed roughness’s and bed shear stresses
::2. Estimate the potential sediment concentration capacity <math>C_{tk}^{*n+1}</math> 
::3. Guess the new bed composition as <math>p_{bk}^{n+1} = p_{bk}^n</math>
::4. Calculate the fractional concentration capacity <math>C_{t*k}^{n+1} = p_{bk}^{n+1}C_{tk}^{*n+1}</math>
::5. Solve transport equations for each sediment size class
::6. Estimate the mixing layer thickness.
::7. Calculate the total and fractional bed changes
::8. Determine the bed sorting in the mixing layer
::9. Update the bed elevation
::10. Repeat Step 4 and iterate until convergence
::11. Calculate the bed gradation in the bed layers below the mixing layer
::12. Calculate avalanching
::13. Correct the sediment concentration due to flow depth change <math>C_{tk}^{n+1} = hC_{tk}^{n+1} / h^{n+1}</math>
'''Surface Roller'''
The surface roller transport equation is solved in CMS-Wave using a finite difference method. The source terms are calculated at the grid cell centers. The advective or transport term is approximated using either the first-order or second-order upwind finite difference scheme. The first order upwind scheme is given by
::<math>
\frac{\partial(S_{sr}c_j)}{\partial x} \bigg|_{i,j} =
\left\{
\begin{align}
&\frac {(S_{sr}c_j)_{i,j} - (S_{sr}c_j)_{i,j-1}} {\delta x_{i,j-1}} , \text{for }  c_{i,j} > 0 \\
&\frac {(S_{sr}c_j)_{i,j+1} - (S_{sr}c_j)_{i,j}} {\delta x_{i,j}}, \text{for }  c_{i,j} < 0
\end{align}
\right.
</math>(3-38)
where <math>S_{sr} = 2E_{sr}</math>  and ''i'' and ''j'' indicate the position along either the rows or columns, and <math>\delta x_{i,j}</math>  is the cell-center distance between adjacent cells in the ''j<sup>th</sup>'' direction and at position i. The second-order upwind scheme is given by
::<math>
\frac{\partial(S_{sr}c_j)}{\partial x_j}\bigg|_{i,j} =
\left\{
\begin{align}
&\frac {3(S_{sr}c_j)_{i,j}-4(S_{sr}c_j)_{i,j-1} + (S_{sr}c_j)_{i,j-2}} {\delta x_{i,j} + \delta x_{i,j-1}}, \text{for }c_{i,j} > 0 \\
&\frac{-3(S_{sr}c_j)_{i,j} + 4(S_{sr}c_j)_{i,j+1} - (S_{sr}c_j)_{i,j+2}}  {\delta x_{i,j} + \delta x_{i,j+1}}, \text{for } c_{i,j} < 0
\end{align}
\right.
</math>(3-39)
The surface roller calculation is achieved by setting the initial roller energy and time-stepping until the steady-state solution is reached. For simplicity, an explicit Euler scheme is used as follows
::<math>
(S_{sr})^{n+1} = (S_{sr})^n + \Delta t_{sr} \left(-D_r + f_e D_{br} - \frac{\partial (S_{sr}c_j)} {\partial x}\right)^n
</math>(3-40)
where <math>\Delta_{sr}</math>  is the surface roller time step and is determined as <math>\Delta t_{sr} = \text{0.5 max}(\Delta x_j / c)\text{ where }\Delta x_j</math>  is the cell size in the <math>j^{th}</math> direction. The steady-state solution is typically reached after ~40-80 time steps and takes about 1-2 seconds to run on a desktop personal computer.
= General Transport Equation =
All of the governing equations may be written in general form
{{Equation|
<math>
\underbrace{\frac{\partial (h\phi )}{\partial t}}_{\text{Temporal Term}}+\underbrace{\nabla \cdot (h\ bf{U}\phi )}_{\text{Advection Term}}=\underbrace{\nabla \cdot \left( \Gamma h\nabla \phi  \right)}_{\text{Diffusion Term}}+\underbrace{S}_{\text{Source Term}}
</math>
|8}}
where <math>\phi</math> is a general scalar, <math>t</math> is time, <math>h</math> is the total water depth, <math>bf{U}</math> is the depth averaged current velocity, <math> \Gamma </math> is the diffusion coefficient for <math> \phi </math>, <math> \nabla =({{\nabla }_{1}},{{\nabla }_{2}}) </math> is the gradient operator, and <math> S </math> includes all other terms. Note that in the case of the continuity and momentum equations <math> \phi </math> is equal to 1 and <math> U_i </math> respectively.


== Spatial Discretization ==
== Spatial Discretization ==

Latest revision as of 20:21, 31 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

(3-1)

where is a general scalar, t is time, h is the total water depth, is the transport velocity, is the diffusion coefficient for , and includes all remaining terms. Note that in the case of the continuity and momentum equations, is equal to 1 and , 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:


(3-2)
(3-3)
(3-4)

where

= outward unit vector normal to cell face f
= outward cell face velocity
h_f = linearly interpolated total water depth at the cell face f
is the outward normal gradient of 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, , 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

(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

(3-6)

where is a weighting factor between 0 and 1. For , the scheme reduces to the first-order backward Euler scheme, and with , 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 is given by

(3-7)

where is a linear interpolation factor, is the gradient operator in the direction parallel to face f, and 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, and . Note that for neighboring cells without any refinement, is equal to zero and the above equation is consistent with non-refined cell faces. The linear interpolation factor is defined as

(3-8)

where is the coordinate of f perpendicular to the face and 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:

(3-9)

where the subscripts D and C indicate the first downstream and first upstream nodes and is the Peclet number at the cell face in which .

Exponential Scheme

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

(3-10)

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

(3-11)

where the subscripts D, C and indicate the first downstream and first and second upstream cells, respectively. The normalized variable, , is determined based on the formulation of Jasak et al. (1999)

(3-12)

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

(3-13)

where the subscripts P and N refer to two neighboring cells, is the distance between cells P and N, normal to the cell face (see Figure 3.2), and 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

(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 within a cell, a linear reconstruction of the variable is used within that cell. This can be expressed as

(3-15)

The reconstruction is conservative in the sense that . If the reconstruction satisfies the local maximum principle

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

Variable
Converged
Diverged
Reduce Time Step
Current velocity,
m/s
If Rm < 1x10-7
or | Rm-Rm-2| < 1x10-7
If RM > 1.0x10-2
or |Ui| > 10
If RM > 1.0x10-3
Pressure-
correction, m2/s2
If RM < 1x10-8
or |RM - RM-2| < 1x10-8
If RM > 1.0x10-3
or |p| >50
If RM>1.0x10-4
Total-load
concentration, kg/m
If RM<1x10-8
or |Rm-Rm-2|<1x10-8
If Rm>1.0x10-3
or Ctk<0
None
Salinity, ppt If Rm<1x10-6 If S < 0 None

For the implicit model, the time steps for the hydrodynamics, sediment and salinity transport are the same in order to avoid mass conservation problems and for simplicity. If any of the time step reduction criteria are met, then the time step is reduced by half and a minimum number of 3 time steps are calculated at the newly reduced time step. If the last time step converged properly, then the time step is increased. The maximum time step allowed is equal to the user-specified initial time step.

Ramp Period

For most coastal applications, the model is initialized from a “cold start”, which means that the water level and current velocities are initially set to zero. The ramp period allows the model to slowly transition from the ini-tial condition without “shocking” the system. In CMS, the ramp function is defined as

(3-26)

where t is the simulation time and is the ramp duration. The ramp function provides a smooth function for transitioning from the initial condition and is plotted in Figure 3.5.

Figure 3.5. Ramp function used in CMS

The ramp function is applied to the model forcing conditions, including the wave forcing , surface wind , sediment concentration capacity , and significant wave height , by direct multiplication of these parameters by the ramp function at each time step during the ramp period. Boundary conditions in CMS are specified without consideration of this ramp period; therefore, the boundary conditions are also slowly transitioned from the initial condition by direct multiplication of the boundary conditions by the ramp function at each time step during the ramp period.


Spatial Discretization

Temporal Discretization

The temporal term of the momentum equations is discretized using a first order implicit Euler scheme

 

(9)

where is the cell area, and is the hydrodynamic time step.

Cell-face interpolation operator

The general formula for estimating the cell-face value of is given by

 

(12)

where is a linear interpolation factor given by and is the gradient operator in the direction parallel to face f. By definition . Note that for neighboring cells without any refinement and are zero and thus the above equation is consistent with non-refined cell faces.

Advection Schemes

The advection scheme obtained using the divergence theorem as where is the outward unit normal on cell face f, is the cell face length and is the total water depth linearly interpolated to the cell face. Here the overbar indicates a cell face interpolation operator described in the following section. For Cartesian grids the cell face unit vector is always aligned with one of the Cartesian coordinates which simplifies the calculation. Defining the cell face normal velocity as the above equation simplifies to

 

(10)

where is the outward unit normal on cell face f, is the cell face length and is the total water depth linearly interpolated to the cell face. Here the overbar indicates a cell face interpolation operator described in the following section. For Cartesian grids the cell face unit vector is always aligned with one of the Cartesian coordinates which simplifies the calculation. Defining the cell face normal velocity as the above equation simplifies to

 

(11)

where , , with being the basis vector. is equal to 1 for West and South faces and equal to -1 for North and East cell faces. Lastly, is the advective value of on cell face f, and is calculated using either the Hybrid, Exponential, HLPA (Zhu 1991) schemes. The cell face velocities are calculated using the momentum interpolation method of Rhie and Chow (1983) described in the subsequent section. The advection value is calculated as , where the superscripts and indicate low and high order approximations and the superscripts and indicate either explicit and implicit treatment. The explicit term is solved directly while the implicit term is implemented through a deferred correction in which the terms are approximated using the values from the previous iteration step.


Diffusion term

The diffusion term is discretized in general form using the divergence theorem

 

(13)

The discritization of the cell-face gradient is described in the next section. On a Cartesian grid the above expression may be further simplified as

 

(14)

where is gradient in the direction perpendicular to the cell face and .