3-Numerical Methods: Difference between revisions
No edit summary |
No edit summary |
||
(62 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=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. | 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. | The implicit solver uses the SIMPLEC (<u>S</u>emi-<u>I</u>mplicit <u>M</u>ethod for <u>P</u>ressure <u>L</u>inked <u>E</u>quations <u>C</u>onsistent) 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. The governing equations for hydrodynamics and sediment and salinity transport have similar forms which can be written as a general transport (advection-diffusion) equation. In order to avoid redundant derivations of discretized equations, the discretization of the general transport equation is described in this chapter, and the same discretization may be applied to all of the transport equations. Then, the specific solution procedures for hydrodynamics, sediment transport, and bed change are introduced. | ||
==Computational Grid== | |||
The explicit time scheme in CMS-Flow supports uniform and non-uniformly spaced Cartesian grids while the implicit version of CMS-Flow supports generic Cartesian grids which can be uniform, non-uniform, or telescoping. The telescoping locally refines the mesh by splitting a cell into subcells. The only requirement imposed by the numerical methods is that the cells must have a rectangular shape. Additional requirements are imposed by the user interface which limits the variety of types of Cartesian grids to help simplify the grid generation and avoid grid quality issues. The following requirements are applied: | |||
# Cells can only be subdivided into four subcells. | |||
# Only two neighboring cells are allowed in the same direction (i.e., north, south, east, and west). | |||
# Cells may have a maximum of six neighbors. | |||
# Refinement levels must be spaced by at least one cell apart (i.e., cells that share the same corner must be one refinement level apart). | |||
Examples of violations of the above four requirements are shown in sequential order in Figure 3-1 from ''a'' to ''d''. Limiting the number of neighboring cells to six avoids excessive cell refinement and limits the band width of the coefficient matrix for the linearlized system of equations solved by the implicit solution scheme. The last two requirements avoid having excessive cell refinement which can cause numerical instabilities. The first requirement simplifies the grid generation process but may be relaxed in future versions. The last requirement is enforced for grid quality purposes and a more smoothly varying grid resolution. | |||
<center>'''Figure 3.1. Examples of Invalid Cartesian computational grids''' | |||
[[File:fig_3_1_a.bmp]] [[File:fig_3_1_b.bmp]] | |||
[[File:fig_3_1_c.bmp]] [[File:fig_3_1_d.bmp]] | |||
</center> | |||
The CMS-Flow grids generated in the SMS interface can be classified as uniform, non-uniform Cartesian grids, regular telescoping, and stretched telescoping grids (Figure 3-2). | |||
<center>'''Figure 3-2. Types of Cartesian grids supported by the SMS interface and CMS-Flow.''' | |||
[[File:fig_3_2_a.bmp]] [[File:fig_3_2_b.bmp]] | |||
[[File:fig_3_2_c.bmp]] [[File:fig_3_2_d.bmp]] | |||
</center> | |||
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-3 shows the location of primary variables and the 5- and 7-point stencils (computational molecule). | |||
Figure 3. | <center>'''Figure 3-3. Computational stencils and control volumes for two types of Cartesian grids: non-uniform Cartesian (left) and telescoping grid (right).''' | ||
[[File:fig_3_1_a.png]][[File:fig_3_1_b.png]]</center> | |||
Computational cells are numbered in an unstructured manner via a | 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. The block structured approach requires a special treatment 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 1D 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 1D index array. Inactive cells (permanently dry) are not included in the 1D index array to save memory and computational time. All active computational cells are numbered sequentially. It is noted that using an unstructured data approach does not limit the model from using matrix solvers designed for structured grids. For convenience with handling boundary conditions, each boundary cell has a neighboring ghost cell outside of the computational domain. | ||
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 | 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 | ||
Line 35: | Line 49: | ||
{{Equation| | {{Equation| | ||
<math> | <math> | ||
\underbrace { | \underbrace { \frac {\partial}{\partial t}\left(\frac{h\phi}{\beta}\right) | ||
}_{\text {Temporal Term}} | }_{\text {Temporal Term}} | ||
+ \underbrace {\frac{\partial(hV_j \phi)} {\partial x_j} }_{\text{Advection Term}} | + \underbrace {\frac{\partial(hV_j \phi)} {\partial x_j} }_{\text{Advection Term}} | ||
Line 43: | Line 57: | ||
+ \underbrace{S_\phi}_{\text{Source Term}} | + \underbrace{S_\phi}_{\text{Source Term}} | ||
</math> | </math> | ||
| | |1}} | ||
where: | |||
::<math>\phi</math> = general scalar | |||
::''h'' = total water depth [m] | |||
::<math>\beta</math> = correction factor [-] | |||
::<math>V_j</math> = total flux velocity [m/s] | |||
::<math>\Gamma</math> = diffusion coefficient for <math>\phi</math> [<math>m^2 /s</math>] | |||
::S = source/sink term which includes all remaining terms. | |||
Note that in the case of the continuity and momentum equations, <math>\phi</math> is equal to 1 and <math>V_i</math>respectively. In the case of sediment and salinity transport, <math>\phi</math> is equal to <math>C_{tk}</math> and <math>C_{sal}</math>, respectively. The correction factor (''β'') is equal to the total-load correction factor and equal to 1 for all other equations. | |||
==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 ( | 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 (1) over a control volume (shaded areas in Figure 3-3) yields the following: | ||
{{Equation| | {{Equation| | ||
<math> | <math> | ||
\int_A \frac {\partial(h\phi | \int_A \frac {\partial}{\partial t}\left(\frac {h\phi}{\beta} \right) 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 dA | ||
</math> | </math> | ||
| | |2}} | ||
{{Equation| | {{Equation| | ||
<math> | |||
\frac {\partial (h_P \phi_P | \frac {\partial}{\partial t}\left(\frac{h_P \phi_P}{\beta_P} \right) \Delta A_P + \oint_L h[(\hat{n_i}V_i)\phi - \Gamma(\hat{n_i}\bigtriangledown_i \phi)]dL = S_P \Delta A_p | ||
</math> | </math> | ||
| | |3}} | ||
{{Equation| | |||
\frac {\partial (h_P \phi_P | <math> | ||
\sum_f h_f \left [ | \frac {\partial}{\partial t}\left(\frac{h_P \phi_P}{\beta_P} \right) \Delta A_P + | ||
</math> | \sum_f h_f \left [V_f \phi_f - \Gamma_f(\bigtriangledown_\perp \phi)_f \right]\Delta l_f = S_P \Delta A_p | ||
</math> | |||
|4}} | |||
where | where | ||
::<math>\hat{n_i} = (\hat{n_1} , \hat{n_2})</math> = outward unit vector normal to cell face ''f'' | ::<math>\hat{n_i} = (\hat{n_1} , \hat{n_2})</math> = outward unit vector normal to cell face ''f''[-] | ||
::<math>V_f = (\hat{n_i}V_i)_f</math> = outward cell face velocity | ::<math>V_f = (\hat{n_i}V_i)_f</math> = outward cell face velocity [m/s] | ||
:: | :::<math>\phi_P</math> = value of <math>\phi</math> at the cell centroid | ||
::<math> | :::''<math>h_P</math>'' = total water depth at the cell face centroid [m] | ||
:::<math>h_f</math> = interpolated total water depth at cell face f [m] | |||
'' | :::<math>(\bigtriangledown_\perp \phi)_f</math> = outward normal gradient of <math>\phi</math> at cell face ''f'' <math> (\bigtriangledown_{perp} \phi)_f = (\hat{n_i}\bigtriangledown_i \phi)_f</math> | ||
:::<math>\Gamma_f</math> = interpolated diffusion coefficient for <math>\phi</math> | |||
::<math> | :::<math>\Delta A_P</math> = area of cell P [m/s] | ||
\ | |||
</math> | |||
:::<math>\Delta l_f</math> = length of cell face f [m] | |||
::<math> | :::<math>S_P</math> = source/sink term. | ||
</math> | |||
In the above equations, the Gauss Divergence Theorem has been used to convert the area integral to a boundary integral. In addition, the area ingegrals have been evaluated assuming variable vary linearly within cells. The cell face velocity,<math>(V_f)</math> , is calculated using a momentum interpolation method similar to that of Rhie and Chow (1983) and is described in ''Hydrodynamics'' of the present Chapter. | |||
==Temporal Discretization== | |||
The general | The general transport equation is rewritten as | ||
{{Equation|<math> | |||
\ | \frac {\partial}{\partial t} \left(\frac{h\phi}{\beta} \right)= \hat{G}</math>|5}} | ||
where <math>\hat{G}</math> includes all the remaining terms. For stability and efficiency, a fully implicit time-stepping scheme is used in the form | |||
</math> | |||
{{Equation|<math> | |||
\frac{1}{\Delta t}\left[(1 + 0.5\hat{\theta)}\frac{h^{n+1}\phi^{n+1}}{\beta^{n+1}} - (1+\hat{\theta}) \frac{h^n \phi^n}{\beta^n} + 0.5\hat{\theta}\frac{h^{n-1}\phi^{n-1}}{\beta^{n-1}} \right] = \hat{G^{n+1}} | |||
</math>|6}} | |||
where <math>\hat{\theta}</math> is a weighting factor between 0 and 1. For <math>\hat{\theta} = 0</math>, the scheme reduces to the first-order backward Euler scheme, and with <math>\hat{\theta} = 1</math>, 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 next time-step and ''n'' being the previous timestep. | |||
==Cell-face interpolation== | |||
The general formula for estimating the cell-face value <math>(\phi_f )</math> is given by | |||
{{Equation|<math> | |||
\phi_f = f_\perp \phi_N + (1-f_\perp)\phi_P + f_\perp (r_\| \bigtriangledown_\| \phi)_N + (1-f_\perp)(r_\| \bigtriangledown_\| \phi)_P | |||
</math>|7}} | |||
''' | where <math>f_\perp</math> is a linear interpolation factor, <math>\bigtriangledown_\|</math> is the gradient operator in the direction parallel to face ''f'', and <math>r_\|</math> is the distance from the cell center to the ghost point (O) parallel to the cell face (''f'') (see Figure 3-4). | ||
<center>'''Figure 3-4. Schematic showing interface interpolation: (a) coarse to fine and (b) fine to coarse.''' | |||
[[File:fig_4.bmp]]</center> | |||
The subscripts <math>\|</math> and <math>\perp</math> indicate the components parallel and normal to the cell face. By definition,<math>\| = 2|\hat{n_1}| + 1|\hat{n_2}| \text{ and }\perp = 1|\hat{n_1}| + 2|\hat{n_2}|</math> . Note that for neighboring cells without any refinement, <math>r_\|</math> is equal to zero and the above equation is consistent with non-refined cell faces. The linear interpolation factor is defined as | |||
\ | |||
\ | |||
</math> | {{Equation| | ||
<math>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}}</math> | |||
|8}} | |||
where | where <math>x_{\perp ,f}</math> is the coordinate of ''f'' perpendicular to the face and <math>\Delta x_\perp</math> is the cell dimension perpendicular to the face ''f''. | ||
==Cell-face Gradient== | |||
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): | |||
{{Equation|<math> | |||
\frac {\ | (\bigtriangledown_{\perp}\phi)_f = \frac{\phi_N - \phi_P}{|\delta_{\perp}|} + \frac{(r_\|\bigtriangledown_\|\phi)_N - (r_\|\bigtriangledown_\|\phi)_P} {|\delta_{\perp}|} | ||
</math> | </math>|9}} | ||
where <math>\ | where the subscripts ''P'' and ''N'' refer to two neighboring cells, <math>|\delta_{\perp}| = |x_{\perp,N} - x_{\perp,P}| </math> is the distance between cells P and N, normal to the cell face (Figure 3-4), and <math>\bigtriangledown_\|</math> is the gradient operator in the direction parallel 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== | |||
The | The cell-centered gradient operator is calculated using the Gauss’ Divergence Theorem as | ||
{{Equation|<math> | |||
\ | \int_A \bigtriangledown_i \phi dA = \sum_f \hat{n_i}\phi_f \Delta l_f</math>|10}} | ||
\ | |||
\ | |||
</math> | |||
The equation above is second order and conservative for regular and non-uniform grids. | |||
==Reconstruction, Monotonicity, and Slope Limiters== | |||
Variables are linearly reconstructed within the cells as | |||
{{Equation|<math> | |||
\phi = \phi_P + \overrightarrow{r}\cdot \bigtriangledown \phi_P | |||
</math>|11}} | |||
where <math>\phi_P</math> is the cell-average value specified at the cell centroid, <math>\overrightarrow{r}</math> is the distance vector from the cell centroid to any location within the cell, and <math>\bigtriangledown \phi_P</math> is the cell-centered gradient. The reconstruction is second order and conservative in the sense that <math>\phi_P \Delta A_P = \int_A \phi dA</math>. The linear reconstruction is used when interpolating cell-face values (Equation 7) and calculating cell-face gradients (Equation 13). If the reconstruction satisfies the local maximum principle | |||
{{Equation|<math> | |||
(\ | min(\phi - \phi_P,0) \leq \overrightarrow{r}\cdot \bigtriangledown \phi_P \leq max(\phi - \phi_P,0) | ||
</math>|12}} | |||
then no new extrema are created within the cell, and the solution is monotonic. Figure 3-5 shows two examples of linear reconstruction with and without slope limiters to ensure monotonicity. | |||
<center>'''Figure 3-5. Schematics showing examples of (a) non-limited and (b) limited linear reconstructions.''' | |||
< | |||
[[File:fig_5.bmp]] | |||
</center> | |||
For non-telescoping grids, the slope limiter is calculated as | |||
{{Equation|<math> | |||
\Phi(R) = \left\{\begin{align} | |||
&\frac {4R} {(R+1)^2}\quad van Leer (1979) \\ | |||
&\frac {2R} {(R^2 +1)}\quad van Albada 1979 \\ | |||
&min \left(1, \frac{4}{R+1}, \frac {4R} {R+1} \right) \quad MUSCL (van Leer 1979) | |||
\end{align}\right. | |||
</math>|13}} | |||
where R is the ratio between two consecutive slopes | |||
{{Equation|<math> | |||
\ | R = \frac {(\phi_{i+1}-\phi_i)(x_i - x_{i-1} ) } {(x_{i+1}-x_i)(\phi_i -\phi_{i-1})}</math>|14}} | ||
Here, the second-order van Leer (1979) limiter is used because of its smoothness. Figure 3-6 shows a comparison of three different common limiters. The slope limiter is applied in each direction separately. | |||
<center>[[file:fig_3_6.bmp]]</center> | |||
For unstructured grids the slope limiters described above are difficult to implement because of the difficulty in defining forward and backward differences. For telescoping grids the following Limited Central Difference (LCD) slope limiting procedure of Hubbard (1999) is applied: | |||
{{Equation|<math>\Phi_f = | |||
\phi | \left\{\begin{align} | ||
</math> | &\frac {max(\phi_N - \phi_P , 0)} | ||
{(\overrightarrow{r}\cdot \bigtriangledown \phi)_P} | |||
&for\ (\overrightarrow{r}\cdot \bigtriangledown \phi)_P > max(\phi_N - \phi_P,0) \\ | |||
&\frac{min(\phi_N - \phi_P , 0)} | |||
{(\overrightarrow{r}\cdot \bigtriangledown \phi)_P} | |||
&for\ (\overrightarrow{r}\cdot \bigtriangledown \phi)_P < min(\phi_N - \phi_P,0) \\ | |||
&1&otherwise\\ | |||
\end{align}\right.</math>|15}} | |||
where <math>\overrightarrow{r}_{p} = \overrightarrow{x}_f - \overrightarrow{x}_p</math>. In the procedure outlined by Hubbard (1999), a scalar limiter is then calculated as <math>\Phi = min(\Phi_f)</math>. Here, a directional limiter is applied as <math>\phi_{i} = \min\limits_{\textit{f} \in \textit{f} \perp i} (\phi_f) </math>, which is less dissipative. Finally, the cell-centered gradient is limited as | |||
{{Equation|<math>\bigtriangledown_i \phi_P = \Phi_i \bigtriangledown_i^* \phi_P</math>|16}} | |||
</math> | where <math>\bigtriangledown_i^* \phi_P</math> is the unlimited gradient. | ||
==Advection Schemes== | |||
===Hybrid Scheme=== | |||
The hybrid scheme is composed of a first-order upwind scheme and a second-order central difference scheme. The cell-face advective value is given by | |||
{{Equation|<math>\phi_f = | |||
\left\{\begin{align} | |||
&(\phi_D + \phi_C) / 2 | |||
&for\ |P_f| > 2 \\ | |||
&\phi_c | |||
&for\ |P_f| >2 | |||
\end{align}\right. </math>|17}} | |||
where the subscripts ''D'' and ''C'' indicate the downstream and upstream values, and <math>P_f = V_f|\delta_{\perp}| / \Gamma_f</math> is the Peclet number at the cell face in which ,<math>|\delta_{\perp}| = |x_{\perp,N} - x_{\perp,P}|</math>. In the hybrid scheme, when the Peclet number is larger than 2, the first-order upwind value is used; otherwise, the second-order central difference value is used. | |||
===Exponential Scheme=== | |||
The exponential scheme interpolates the face value using an exact solution to the 1D steady advection-diffusion equation: | |||
\ | {{Equation|<math>\frac{\phi_f - \phi_p}{\phi_N - \phi_P} = \frac{exp(P_f f_{\perp})-1}{\exp(P_f)-1} | ||
\ | </math>|18}} | ||
</math> | |||
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 (HLPA) scheme of Zhu (1991) may be written as | |||
{{Equation|<math>\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.</math>|19}} | |||
where the subscripts ''D'', ''C'', and ''U'' indicate the first downstream and first and second upstream cells, respectively. The normalized variable <math>(\hat{\phi_C}</math>) is determined based on the formulation of Jasak et al. (1999) | |||
{{Equation|<math>\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}}</math>|20}} | |||
\ | |||
{\ | |||
{\ | |||
</math> | |||
where <math>\ | where <math>\delta_{\perp,C} = x_{\perp,D} - x_{\perp,C}</math>. The HLPA scheme is second order. Choi et al. (1995) found that the HLPA scheme has similar accuracy to the third-order SMARTER (<u>S</u>harp and <u>M</u>onotonic <u>A</u>lgorithm for <u>R</u>ealistic <u>T</u>ransport <u>E</u>fficiently <u>R</u>evised) and LPPA (<u>L</u>inear and <u>P</u>iecewise-<u>P</u>arabolic <u>A</u>pproximation) schemes but is simpler and more efficient (Shin and Choi 1992; Choi et al. 1995). | ||
==Source/Sink Term== | |||
The source/sink term is linearized as (Patankar 1980) | The source/sink term is linearized as (Patankar 1980) | ||
{{Equation|<math>S_P = S_P^C + S_P^P \phi_P</math>|21}} | |||
</math> | |||
The coefficient <math>S_P^P</math> 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 <math>\phi_p^{n+1}</math> and is subtracted from the transport equation. The resulting discretized equation for cell ''P'' is | 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 <math>\phi_p^{n+1}</math> and is subtracted from the transport equation. The resulting discretized equation for cell ''P'' is | ||
{{Equation|<math>a_P \phi_P^{n+1} = \sum_N a_N \phi_N^{n+1} + b | |||
a_P \phi_P^{n+1} = \sum_N a_N \phi_N^{n+1} + | </math>|22}} | ||
</math>( | |||
where the subscript ''N'' refers to the neighboring cell sharing cell face, <math>a_P</math> and <math>a_N</math> are linear coefficients for <math>\phi_P^{n+1}</math> and <math>\phi_N^{n+1}</math> . The last term, ''(b)'', contains all the remaining terms. 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== | |||
''' | The right-hand side of the algebraic system of equations ''(b)'' generally contains deferred corrections and source terms which must be computed iteratively. This iteration loop is referred to as the outer loop, and the loop within the linear iterative solver (see Section ''Iterative Solvers'') is referred to as the inner loop. Under-relaxation is often applied to stabilize the convergence of the outer iteration loop. Under-relaxation may be applied as <math>\phi^{m+1} = a_\phi \phi^{n+1} + (1 - a_\phi)\phi^m</math> in which <math>a_\phi</math> is an under-relaxation parameter <math>(0 < a_\phi \leq 1)</math>. The superscript m indicates the previous iteration, and superscript ''m+1'' indicates the new relaxed value. A better approach is used here to introduce the under-relaxation directly in the algebraic system of equations (Majumdar 1988; Ferziger and Peric 1997) as | ||
{{Equation|<math> | |||
\frac {a_P}{\alpha_\phi}\phi_P^{n+1} = \sum_N a_N \phi_N^{n+1} + b + \frac {1-\alpha_\phi} {\alpha_\phi} a_P \phi_P^m | |||
</math>|23}} | |||
This is referred to implicit under-relaxation and has the effect of making the coefficient matrix more diagonally dominant, thus improving convergence. | |||
==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 (<u>G</u>eneralized <u>M</u>inimum <u>RES</u>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 used here allows changes in preconditing at every iteration step Saad (1993). The Incomplete Lower Upper 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 (<u>BiC</u>onjugate Gradient <u>Stab</u>ilized) 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 less than four iterations). | |||
The | The SIP (<u>S</u>trongly <u>I</u>mplicit <u>P</u>rocedure) iterative solver uses an Incomplete Lower Upper decomposition, which approximates the exact Lower Upper decomposition (Stone 1968). The method is specifically designed for algebraic systems of equations derived from partial differential equations. The implementation here is for a 5-point stencil and, therefore, only applies to nontelescoping grids. | ||
The | The ICCG (<u>I</u>ncomplete <u>C</u>holesky preconditioned <u>C</u>onjugate <u>G</u>radient) iterative solver is applicable to symmetric matrices such as the pressure correction equation (Ferziger and Peric 2002). The implementation here is also for a 5-point stencil and, therefore, can only be applied to nontelescoping grids | ||
The simplest iterative | The simplest iterative solvers implemented here are the point-implicit Gauss-Seidel solvers with or without Successive-Over-Relaxation. The Succesive-Over-Relaxation may speed up convergence but can also lead to model divergence (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 iteration is computa-tionally inexpensive, and the code is efficiently parallelized. However, based on experience and testing, the GMRES and BiCGStab methods are usually more robust and perform better for large time-steps. | ||
==Convergence and Time-Stepping== | |||
During the iterative solution process, error is calculated and used to | During the iterative solution process, error is calculated and used to determine if a solution has converged, diverged, or stalled at an error below a set tolerance threshold. An estimate of the error in solving the general algebraic equation is given by | ||
{{Equation|<math> | |||
r_p = \frac {1}{a_p} \left(\sum_N a_N \phi_N^{n+1} - a_P \phi_P^{n+1} + | r_p = \frac {1}{a_p} \left(\sum_N a_N \phi_N^{n+1} - a_P \phi_P^{n+1} + b \right) | ||
</math> | </math>|24}} | ||
The <math>l^2</math>-norm of the residual errors is given by | |||
{{Equation|<math>\|r\|_2 = \sqrt {\sum_{cells P}r_P^2}</math>|25}} | |||
\|r\|_2 = \sqrt {\sum_{cells P}r_P^2} | |||
</math> | |||
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 | 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 <math>l^2</math> norm by the square root of the number of cells: | ||
{{Equation|<math>R^m = \frac{\|r\|_2} {\sqrt{N_c}}</math>|26}} | |||
R^m = \frac{\|r\|_2} {\sqrt{N_c}} | |||
</math> | |||
<math>R^m</math> is referred to as the | where <math>N_C</math> is the number of computational cells. Simply stated <math>R^m</math> is referred to as the ''normalized residual error'' and the superscript refers to the iteration number. Also <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, requires a reduced time step or has diverged. | ||
Table 3-1. 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> | <table border> | ||
<tr> | <tr><td><center>'''Variable'''</center></td> | ||
<td><center>Variable</center></td><td><center>Converged</center></td><td><center> | <td><center>'''Converged'''</center></td> | ||
<td><center>'''Reduce Time-Step'''</center></td> | |||
<td><center>'''Diverged'''</center></td></tr> | |||
<tr> | <tr><td>Current velocity,m/s</td> | ||
<td>Current velocity, | <td>If R<sup>m</sup> < 1x10<sup>-7</sup></td> | ||
<td>If R<sup>m</sup> < 1x10<sup>-7</sup> | |||
<td>If R<sup>M</sup> > 1.0x10<sup>-3</sup></td> | <td>If R<sup>M</sup> > 1.0x10<sup>-3</sup></td> | ||
<td>If R<sup>M</sup> > 1.0x10<sup>-2</sup><br>or |U<sub>i</sub>| > 10.0</td> | |||
</tr> | </tr> | ||
<tr> | <tr><td>Pressure-<br>correction, m<sup>2</sup>/s<sup>2</sup></td> | ||
<td>Pressure-<br>correction, m<sup>2</sup>/s<sup>2</sup></td> | <td>If R<sup>M</sup> < 1x10<sup>-8</sup></td> | ||
<td>If R<sup>M</sup> < 1x10<sup>-8</sup>< | <td>If R<sup>M</sup> > 1.0x10<sup>-4</sup></td> | ||
<td>If R<sup>M</sup> > 1.0x10<sup>-3</sup><br>or | | <td>If R<sup>M</sup>>1.0x10<sup>-3</sup><br>or |P| > 50.0</td> | ||
</tr> | </tr> | ||
<tr> | <tr><td>Total-load<br> concentration, kg/m<sup>3</sup></td> | ||
<td>Total-load<br> concentration, kg/m<sup></sup></td> | <td>If R<sup>M</sup>< 1x10<sup>-8</sup></td> | ||
<td>If R<sup>M</sup><1x10<sup>-8</sup> | <td>None</td><td>If R<sup>M</sup> > 1.0x10<sup>-3</sup><br>or Ctk < 0</td> | ||
<td>If R<sup> | |||
</tr> | </tr> | ||
<tr><td>Salinity, ppt</td><td>If R<sup>m</sup>< 1x10<sup>-6</sup></td> | |||
<td>None</td><td>If Csal < 0</td></tr> | |||
</table> | </table> | ||
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 | 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 two 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 Function== | |||
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. When the model is initialized with anything other than zeros, this is referred to as a ''hot start''. The ramp period allows the model to slowly transition from the specified initial conditions without shocking the system. The ramp function is defined here as | |||
< | {{Equation|<math> | ||
f_{Ramp} = \frac{1}{2} - \frac{1}{2} cos \left[\pi\ min \left(\frac{t}{t_{Ramp}},1 \right) \right] | |||
</math>|27}} | |||
where ''t'' is the simulation time and <math>t_{Ramp}</math> is the ramp duration. The ramp function provides a smooth function for transitioning from the initial condition and is plotted in Figure 3 | where ''t'' is the simulation time and <math>t_{Ramp}</math> is the ramp duration. The ramp function provides a smooth function for transitioning from the initial condition and is plotted in Figure 3-7. | ||
[[File:fig_3_5.png]] | [[File:fig_3_5.png]] | ||
Figure 3. | '''Figure 3.7. Ramp function used in CMS''' | ||
The ramp function is applied to the model forcing conditions, including the wave forcing | 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 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 period is usually on the order of a few hours to a few days and should not be confused with the spin-up period. The spin-up period is the time it takes for the effects of the initial condition to disappear and can be much longer than the ramp period. | ||
=Hydrodynamics= | |||
==Coupling of Velocity and Water Level – SIMPLEC Algorithm== | |||
The governing equations are solved in a segregated manner in which each governing equation is | The governing equations are solved in a segregated manner in which each governing equation is 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: | ||
{{Equation|<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^* | \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>|28}} | ||
</math> | |||
where <math>S_i^*</math> includes all the remaining terms. The | where <math>S_i^*</math> includes all the remaining terms. The cell face velocities are calculated with a Rhie and Chow (1983) type interpolation method | ||
{{Equation|<math> | |||
V_f^* = (H_\perp^*)_f - \left(\frac{\Delta A_P}{a_P} \right)_f \left(\frac{h}{\rho}\bigtriangledown_\perp p^* | V_f^* = \overbrace{(H_\perp^*)_f} - a_V \overbrace{\left(\frac{\Delta A_P}{a_P} \right)_f} \left(\frac{h}{\rho}\bigtriangledown_\perp p^* \right)_f</math>|29}} | ||
</math> | |||
where <math> | where <math>H_{\perp}^* = V_{\perp}^* + \alpha_v \frac{\Delta A_p}{a_p}\frac{h}{\rho}\bigtriangledown_{\perp} p^*, \alpha_v</math>, is the implicit relaxation coefficient (set to 0.8 by default), and <math>\overbrace{(\quad)_f}</math> denotes linear interpolation (see ''Implicit Relaxation'' of the present Chapter). This method avoids the checkerboard oscillations associated with the collocated grid. It is noted that this approach is slightly different from that originally proposed by Rhie and Chow(1983) and is used by several authors such as Lai (2010). The current approach 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 | Next, the velocity ''<math>(V^')</math>'' and pressure corrections ''<math>(p^')</math>'' are defined such that both the momentum and continuity equations are satisfied: | ||
{{Equation|<math>V_i^{n+1} = V_i^* + V_i^' , p^{n+1} = p^* + p^'</math>|30a,b}} | |||
V_i^{n+1} = V_i^* + V_i^' , p^{n+1} = p^* + p^' | |||
</math> | |||
In the SIMPLEC algorithm, the velocity correction is related to the pressure correction by | |||
{{Equation|<math>V_i^' = -G\bigtriangledown_i p' | |||
</math>|31}} | |||
</math> | |||
where <math> G = \frac{a_v \frac{h}{\rho} \frac{\Delta A_p}{a_p}} | |||
{1 - \frac{a_v}{a_p} \sum a_N}</math> | |||
</math> | |||
Using <math>\partial h / \partial t = (\partial p / \partial t) /(\rho g)</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 | |||
V_i^ | |||
</math> | |||
{{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>|32}} | |||
<math> | Note that at convergence, <math>p^' \rightarrow 0,\ p^{n+1} = p^*,\ V_i^{n+1} = V_i^*</math> and the above equation 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:=== | |||
#Guess the water level and pressure field <math>(p^*)</math> | |||
#Solve the momentum equations (Equation 28) to obtain <math>V_i^*</math> | |||
</math> | #Use the Rhie and Chow (1983) momentum to determine the velocities and fluxes at cell faces (Equaton 29) | ||
#Solve the pressure equation (Equation 34) to obtain <math>p^'</math> | |||
#Use the correction equations to adjust the velocities and water levels | |||
#Treat the corrected water level and pressure field as a new guess, and repeat this procedure from Step 2 until convergence is achieved. | |||
==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. | |||
=Salinity Transport= | |||
==Transport Equations== | |||
The sediment transport equations are discretized using the methods described in the previous section entitled ''General Transport Equation'' and are not repeated here. | |||
==Laplace Equation== | |||
The option is provided to estimate the initial salinity based on the solution of a 2DH Laplace equation with given boundary conditions and scattered salinity values. The Laplace equation is discretized similarly to the transport equation as | |||
{{Equation|<math> | |||
\sum_f (\bigtriangledown_{\perp}C_{sal})_f \Delta l_f = 0 | |||
</math>|33}} | |||
where | |||
<math>(\bigtriangledown_{perp}C_{sal})_f </math> = outward normal gradient of <math>\phi</math> at cell face ''(f)'' | |||
'' | <math>\quad\quad \Delta l_f = </math> length of cell face ''(f)'' [m]. | ||
=Sediment Transport and Morphology Change= | |||
The so-called semi-coupled sediment transport model proposed by Wu (2004) is adopted here, in which the sediment calculations are decoupled from the hydrodynamic calculations, but the sediment transport, bed change, and bed material sorting equations are simultaneously solved in a coupled form at each time-step. | |||
==Transport Equations== | |||
'' | The sediment transport equations are discretized using the methods described in the previous section entitled ''General Transport Equation'' and are not repeated here. | ||
==Bed Change Equations== | |||
The fractional bed change equation is discretized as | |||
{{Equation|<math> | |||
\Delta z_{bk} = \frac{f_{morph}\Delta t} {\rho_s(1 - p_m^')} | |||
\left[ \alpha_t \omega_{sk} (C_{tk}^{n+1} - C_{tk*}^{n+1}) + S_{bk}^{n+1} \right]</math>|34}} | |||
\ | |||
</math> | |||
where: | |||
<math>f_{morph}</math> = morphologic acceleration factor | |||
<math>S_{bk}^{n+1} = \frac{\partial}{\partial x_j} \left(D_s q_{bk} \frac{\partial z_b}{\partial x_j} \right) = \frac{D_s}{\Delta A} \sum_f (q_{bk})_f (\bigtriangledown_{\perp}z_b)_f \Delta l_f</math> | |||
<math>D_s</math> = bed slope coefficient [-] | |||
<math>(q_{bk})_f</math> = magnitude of the fraction bed load at the cell face f calculated from previous iteration [kg/m/s] | |||
<math>(\bigtriangledown_{\perp}z_b)_f </math> = bed slope calculated at the cell face. | |||
The purpose of the morphologic acceleration factor <math>(f_{morph})</math> is to speed up the bed change so that the simulation time <math>(t_{sim})</math> represents approximately the change that would occur in <math>t_{morph} = f_{morph}t_{sim}</math>. This factor should be used with caution and only for idealized cases or time periods which are periodic (mainly tidal). If time-varying winds or waves are important processes for driving sediment transport, then it is recommended to use reduced or representative wind and wave conditions. Since the CMS runs relatively fast, it is generally recommended not to use the morphologic acceleration factor when validating the sediment transport model using hindcast measurements. The morphologic acceleration factor is useful, however, when simulating idealized cases or analyzing project alternatives. | |||
</math>( | |||
==Bed Material Sorting== | |||
The | The bed material sorting equation (Equation 53) is discretized as | ||
{{Equation|<math> | |||
p_{1k}^{n+1} = \frac{\Delta z_{bk} + \delta_1^n p_{1k}^n - \Delta z_2 p_k^{*n}} {\delta_1^{n+1}} | |||
</math>|35}} | |||
where <math>\Delta z_2 = \Delta z_b - \delta_1^{n+1} + \delta_1^n</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 mixing layer or active layer thickness calculation is slightly modified to avoid excessively small layers as | |||
{{Equation|<math> | |||
\delta_1 = min \left[max(\delta_{1,min}, 2d_{50},\Delta /2),\delta_{1,max} \right]</math>|36}} | |||
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. | |||
The | The thickness of the second layer is calculated as <math>\delta_2^{n+1} = \delta_2^n + \Delta z_2</math>. The bed material gradation in the second layer is calculated from the following discretized form of Equation 54: | ||
{{Equation|<math> | |||
\frac{\ | p_{2k}^{n+1} = \frac{\delta_2^n p_{2k}^n + \Delta z_2 p_k^{*n}} {\delta_2^{n+1}} | ||
</math>|37}} | |||
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 2 corresponds to the second layer. To illustrate the bed layering process, Figure 3-8 shows an example of the temporal evolution of seven bed layers during erosional and depositional regimes. | |||
It is noted that in order to maintain a constant number of bed layers, the bottom two layers are merged if the second layer is split or a new layer is created at the bottom using the bed composition and thickness of the bottom layer. | |||
==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 approximately equal to the angle of repose. | |||
\ | |||
<center>[[file:fig_3_8.bmp]]</center> | |||
</ | |||
The | 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: | ||
{{Equation|<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>|38}} | |||
</math> | |||
where <math>\ | 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 (38) 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 38 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. | |||
==Coupling of Sediment Transport, Bed Change, and Sorting Equations== | |||
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. | |||
==Summary of Sediment Transport Semi-Coupling Procedure:=== | |||
#Calculate bed roughness’s and bed shear stresses | |||
#Calculate the mixing layer thickness <math>\delta_1^{n+1}</math> | |||
#Calculate the potential sediment concentration capacity <math>C_{tk}^{*n+1}</math> | |||
#Guess the new bed composition as <math>p_{1k}^{n+1} = p_{1k}^n</math> | |||
#Calculate the fractional concentration capacity <math>C_{t*k}^{n+1} = p_{1k}^{n+1}C_{tk}^{*n+1}</math> | |||
#Solve transport equations for each sediment size class for <math>C_{tk}^{n+1}</math> | |||
#Calculate the total and fractional bed changes | |||
#Determine the bed sorting in the mixing layer; Repeat Step 5 and iterate until convergence. | |||
#Update the bed elevation as <math>z_b^{n+1} = z_b^n + \Delta z_b</math> | |||
#Calculate the bed gradation in the bed layers below the mixing layer | |||
#Calculate avalanching | |||
#Correct the sediment concentration due to flow depth change | |||
When using the explicit time-stepping scheme, the sediment transport and morphology change are solved at a time-step which may be equal to or multiples of the hydrodynamic time-step for efficiency. However, when using the implicit time-stepping scheme, the time-step is relatively big and on the order of 10 min. Because the time-step is so big, it is not necessary to use different time-steps for hydrodynamics and sediment transport. In addition, using the same time-step for hydrodynamics and sediment transport provides a better mass balance. For these reasons, the sediment transport time-step is always set to the hydrodynamic time-step in the implicit time-stepping scheme. | |||
===Coupling Procedure of CMS-Flow and CMS-Wave=== | |||
CMS-Flow and CMS-Wave can be run separately or coupled together using a process called ''steering'' (Figure 3-9). The variables passed from CMS-Wave to CMS-Flow are the significant wave height, peak wave period, wave direction, wave breaking dissipation, and radiation stress gradients. CMS-Wave uses the updated bathymetry (if sediment transport is turned on), water levels, and current velocities from CMS-Flow. | |||
: | <center>[[File:fig_3_9.bmp]]</center> | ||
The time interval at which CMS-Wave is run is called the steering interval. Currently, the steering interval is constant and the input spectra in CMS-Wave must be at constant intervals without any gaps. A schematic showing the steering process is shown in Figure 3-10 in which the simulations time is plotted as a function of the computational time. | |||
<center>[[File:fig_3_10.bmp]]</center> | |||
''' | For CMS versions prior to version 4.0, the steering process is controlled in the SMS interface with communication files because the CMS-Wave and CMS-Flow models are separate executables. For CMS v4.0 and above, both CMS-Flow and CMS-Wave are contained within a single executable (known as the ''inline executable'') and the steering process is controlled by an interval steering module. Two main advantages of the inline executable and inline steering module are: 1) the model runs faster because there is no need to use communication files or reinitialize the models (memory allocation, variable initialization, etc.); and 2) the inline executable makes the improvement and maintenance of the steering module easier for the developers and also makes the code portable for other operating systems. The inline steering process is summarized as follows: | ||
CMS | #CMS-Wave is run for the first two timesteps and the wave infor-mation is passed to CMS-Flow (Figure 3-10). If specified, the surface roller model is run on the wave grid and the roller contributions to the radiation stresses are added to the wave radiation stresses. | ||
#The wave height, period, dissipation, radiation stress gradients, and wave unit vectors are interpolated spatially from the CMS-Wave grid to the CMS-Flow grid. | |||
#CMS-Flow is run until the next steering interval and wave variables are linearly interpolated throughout time during the specified steering interval. At each flow timestep, variables such as wave length and bottom orbital velocities are updated using the current water depths and current velocities. | |||
#Water levels, current velocities, and bed elevations are estimated for the next wave timestep and are interpolated from the CMS-Flow grid to the CMS-Wave grid. | |||
#CMS-Wave is then run again for the following timestep. | |||
#Step 2-5 are repeated until the end of the simulation. | |||
==Spatial Interpolation and Extrapolation== | |||
CMS allows the user to use the same or different grids for CMS-Flow and CMS-Wave. If the same grid is used, then no spatial interpolation is carried out. If different grids are used, then spatial interpolation is necessary in order to transfer information from one model grid to another model grid. The interpolation of wave variables from the CMS-Wave grid to the CMS-Flow grid is done using a combination of bilinear and linear triangular interpolation methods. Bilinear interpolation is applied at non-jointed cells (i.e., cells with four neighbors) and trianular interpolation at jointed cells (cells with more than four neighbors). If the extents of the CMS-Wave and CMS-Flow grids are different (e.g. if the CMS-Flow grid is smaller), then the extrapolation of variables is necessary in order to avoid boundary problems with the models. The spatial extrapolations for different variables are given by | |||
{{Equation|<math>(\bar{\eta_p})^m_{wave} = (\bar{\eta}_N)^m_{flow}</math>|39}} | |||
(\bar{\ | |||
</math> | |||
{{Equation|<math>(U_{i,P})^m_{wave} = f_{ext}(U_{i,N})^m_{flow}</math>|40}} | |||
{{Equation|<math>(z_{b,P})^m_{wave} = (z_{b,P})^{m-1}_{wave} + f_{ext}(\Delta z_{b,N})^m_{flow}</math>|41}} | |||
( | |||
( | |||
</math> | |||
{{Equation|<math>(H_{s,P})^n_{flow} = f_{ext}(H_{s,N})^n_{wave}</math>|42}} | |||
{{Equation|<math> | |||
( | (T_{p,P})^n_{flow} = (T_{p,N})^n_{wave} | ||
</math> | </math>|43}} | ||
{{Equation|<math> | |||
(\overrightarrow{w}_P)^n_{flow} = (\overrightarrow{w}_N)^n_{wave} </math>|44}} | |||
where <math>\bar{\eta}</math> is the mean water surface elevation, <math>U_i</math> is depth-averaged current velocities, <math>z_b</math> is the bed elevation, <math>H_s</math> is the significant wave height, <math>T_p</math> is peak wave period, and <math>\overrightarrow{w}</math> is the wave unit vector. The superscripts ''m'' and ''n'' indicate the CMS-Wave and CMS-Flow time-steps, respectively. The subscripts ''wave'' and ''flow'' indicate variables on CMS-Wave and CMS-Flow grids respectively. The subscripts ''P'' and ''N'' indicate variables at the extrapolated and nearest neighbor cells. The extrapolation function ''(f<sub>ext</sub>)'' is given by | |||
\ | |||
</ | |||
{{Equation|<math> | |||
f_{ext} = \frac{1}{2} + \frac{1}{2}cos \left[\pi\ min \left(\frac{r_N}{r_{ext}},1 \right) \right] | |||
</math>|45}} | |||
''' | Here, <math>r_N</math> is the distance from cell ''P'' to ''N'', and <math>r_{ext}</math> is the extrapolation distance. The extrapolation distance is assigned to each computational grid and can be either automatically calculated by CMS or specified by the user. The mean water surface elevation, peak wave period, and wave unit vectors are extrapolated using a nearest neighbor. This approach is more physically accurate than extrapolating only to a certain distance. For example, water levels are controlled mainly by tides along the coast, and the spatial variation is usually much smaller than the tidal range. Extrapolating bed elevations from a boundary can lead to sharp changes in bathymetry in the wave model and instability problems in both the wave and flow models. A better approach is to extrapolate the bed change. It is noted that this is only for extrapolation. For internal cells the actual bed elevations are interpolated from the flow grid to the wave grid. Finally, careful attention is needed in determining the nearest neighbor so that variables are not extrapolated over inactive portions of the grid (e.g., interpolating values in a bay using values from the open ocean). | ||
==Temporal Interpolation and Prediction== | |||
Because CMS-Wave requires the water surface elevation at times that are ahead of the hydrodynamic model, the water surface elevation and currents must be predicted for the CMS-Wave timestep. If the steering is relatively small (<30 min), then the values from the last time step may be used without significant error as | |||
{{Equation|<math>(U_i)^m_{flow} = (U_i)^n_{flow} </math>|46}} | |||
{{Equation|<math>(\bar{\eta})^m_{flow} = (\bar{\eta})^n_{flow} | |||
</math>|47}} | |||
{{Equation|<math>(z_b)^m_{flow} = (z_b)^n_{flow} | |||
</math>|48}} | |||
where superscripts ''m'' and ''n'' indicate the CMS-Wave and CMS-Flow time steps, respectively. The subscript ''flow'' indicates the variables on the CMS-Flow grid. For many coastal engineering applications, it is desirable and common to use relatively large steering intervals of 2 to 3 hours. For large steering intervals, the change in water depth has the largest influence on the nearshore wave heights. Therefore, when using large steering intervals, it is desirable to make better predictions of water levels and not use the previous time-step water levels. In cases where the relative surface gradients at any time are much smaller than the mean tidal elevation, a better approximation of water level may be obtained by decomposing the water level into | |||
{{Equation|<math> | |||
(\bar{\eta})^m_{flow} = (\bar{\eta}_m)^m_{flow} + (\bar{\eta}_v)^m_{flow}</math>|49}} | |||
where <math>\bar{\eta}_m</math> is the mean water level and <math>\bar{\eta}_v</math> is a variation around the mean due to due to tidal, wave, and wind generated surface gradients. <math>\bar{\eta}</math> can be | where <math>\bar{\eta}_m</math> is the mean water level and <math>\bar{\eta}_v</math> is a variation around the mean due to due to tidal, wave, and wind generated surface gradients. The symbol <math>\bar{\eta}_m</math> can be approximated from water level boundary conditions and is generally much larger. The water level variation <math>\bar{\eta}_v</math> may be neglected or approximated as | ||
{{Equation|<math>(\bar{\eta}_v)^m_{flow} \approx (\bar{\eta}_v)^n_{flow} = (\bar{\eta})^n_{flow} - (\bar{\eta}_m)^n_{flow}</math>|50}} | |||
(\bar{\eta}_v)^m_{flow} \approx (\bar{\eta}_v)^n_{flow} = (\bar{\eta})^n_{flow} - (\bar{\eta}_m)^n_{flow} | |||
</math> | |||
For most coastal inlet applications, | For most coastal inlet applications, the above equation is a better representation of the water surface elevation and is used as the default in CMS. After spatially interpolating the wave height, period, dissipation, and forcing onto the CMS-Flow grid, the variables are linearly interpolated in time. The wavelength, bottom orbital velocities, and mean wave-current bottom friction are then updated including current-wave interactions at each time-step. | ||
[[Summary]] | [[Summary]] |
Latest revision as of 16:09, 11 August 2014
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 (Semi-Implicit Method for Pressure Linked Equations Consistent) 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. The governing equations for hydrodynamics and sediment and salinity transport have similar forms which can be written as a general transport (advection-diffusion) equation. In order to avoid redundant derivations of discretized equations, the discretization of the general transport equation is described in this chapter, and the same discretization may be applied to all of the transport equations. Then, the specific solution procedures for hydrodynamics, sediment transport, and bed change are introduced.
Computational Grid
The explicit time scheme in CMS-Flow supports uniform and non-uniformly spaced Cartesian grids while the implicit version of CMS-Flow supports generic Cartesian grids which can be uniform, non-uniform, or telescoping. The telescoping locally refines the mesh by splitting a cell into subcells. The only requirement imposed by the numerical methods is that the cells must have a rectangular shape. Additional requirements are imposed by the user interface which limits the variety of types of Cartesian grids to help simplify the grid generation and avoid grid quality issues. The following requirements are applied:
- Cells can only be subdivided into four subcells.
- Only two neighboring cells are allowed in the same direction (i.e., north, south, east, and west).
- Cells may have a maximum of six neighbors.
- Refinement levels must be spaced by at least one cell apart (i.e., cells that share the same corner must be one refinement level apart).
Examples of violations of the above four requirements are shown in sequential order in Figure 3-1 from a to d. Limiting the number of neighboring cells to six avoids excessive cell refinement and limits the band width of the coefficient matrix for the linearlized system of equations solved by the implicit solution scheme. The last two requirements avoid having excessive cell refinement which can cause numerical instabilities. The first requirement simplifies the grid generation process but may be relaxed in future versions. The last requirement is enforced for grid quality purposes and a more smoothly varying grid resolution.
The CMS-Flow grids generated in the SMS interface can be classified as uniform, non-uniform Cartesian grids, regular telescoping, and stretched telescoping grids (Figure 3-2).
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-3 shows the location of primary variables and the 5- and 7-point stencils (computational molecule).
![Fig 3 1 a.png](/images/7/70/Fig_3_1_a.png)
![Fig 3 1 b.png](/images/5/56/Fig_3_1_b.png)
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. The block structured approach requires a special treatment 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 1D 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 1D index array. Inactive cells (permanently dry) are not included in the 1D index array to save memory and computational time. All active computational cells are numbered sequentially. It is noted that using an unstructured data approach does not limit the model from using matrix solvers designed for structured grids. For convenience with handling boundary conditions, each boundary cell has a neighboring ghost cell outside of the computational domain.
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
|
(1) |
where:
- = general scalar
- h = total water depth [m]
- = correction factor [-]
- = total flux velocity [m/s]
- = diffusion coefficient for []
- S = source/sink term which includes all remaining terms.
Note that in the case of the continuity and momentum equations, is equal to 1 and respectively. In the case of sediment and salinity transport, is equal to and , respectively. The correction factor (β) is equal to the total-load correction factor and equal to 1 for all other equations.
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 (1) over a control volume (shaded areas in Figure 3-3) yields the following:
|
(2) |
|
(3) |
|
(4) |
where
- = outward unit vector normal to cell face f[-]
- = outward cell face velocity [m/s]
- = value of at the cell centroid
- = total water depth at the cell face centroid [m]
- = interpolated total water depth at cell face f [m]
- = outward normal gradient of at cell face f
- = interpolated diffusion coefficient for
- = area of cell P [m/s]
- = length of cell face f [m]
- = source/sink term.
In the above equations, the Gauss Divergence Theorem has been used to convert the area integral to a boundary integral. In addition, the area ingegrals have been evaluated assuming variable vary linearly within cells. The cell face velocity, , is calculated using a momentum interpolation method similar to that of Rhie and Chow (1983) and is described in Hydrodynamics of the present Chapter.
Temporal Discretization
The general transport equation is rewritten as
(5) |
where includes all the remaining terms. For stability and efficiency, a fully implicit time-stepping scheme is used in the form
(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 next time-step and n being the previous timestep.
Cell-face interpolation
The general formula for estimating the cell-face value is given by
(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-4).
![Fig 4.bmp](/images/thumb/8/88/Fig_4.bmp/1095px-Fig_4.bmp.png)
The subscripts and indicate the components parallel and normal to the cell face. By definition, . 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
|
(8) |
where is the coordinate of f perpendicular to the face and is the cell dimension perpendicular to the face f.
Cell-face Gradient
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):
(9) |
where the subscripts P and N refer to two neighboring cells, is the distance between cells P and N, normal to the cell face (Figure 3-4), and is the gradient operator in the direction parallel 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
The cell-centered gradient operator is calculated using the Gauss’ Divergence Theorem as
(10) |
The equation above is second order and conservative for regular and non-uniform grids.
Reconstruction, Monotonicity, and Slope Limiters
Variables are linearly reconstructed within the cells as
(11) |
where is the cell-average value specified at the cell centroid, is the distance vector from the cell centroid to any location within the cell, and is the cell-centered gradient. The reconstruction is second order and conservative in the sense that . The linear reconstruction is used when interpolating cell-face values (Equation 7) and calculating cell-face gradients (Equation 13). If the reconstruction satisfies the local maximum principle
(12) |
then no new extrema are created within the cell, and the solution is monotonic. Figure 3-5 shows two examples of linear reconstruction with and without slope limiters to ensure monotonicity.
For non-telescoping grids, the slope limiter is calculated as
(13) |
where R is the ratio between two consecutive slopes
(14) |
Here, the second-order van Leer (1979) limiter is used because of its smoothness. Figure 3-6 shows a comparison of three different common limiters. The slope limiter is applied in each direction separately.
![Fig 3 6.bmp](/images/thumb/c/c6/Fig_3_6.bmp/433px-Fig_3_6.bmp.png)
For unstructured grids the slope limiters described above are difficult to implement because of the difficulty in defining forward and backward differences. For telescoping grids the following Limited Central Difference (LCD) slope limiting procedure of Hubbard (1999) is applied:
(15) |
where . In the procedure outlined by Hubbard (1999), a scalar limiter is then calculated as . Here, a directional limiter is applied as , which is less dissipative. Finally, the cell-centered gradient is limited as
(16) |
where is the unlimited gradient.
Advection Schemes
Hybrid Scheme
The hybrid scheme is composed of a first-order upwind scheme and a second-order central difference scheme. The cell-face advective value is given by
(17) |
where the subscripts D and C indicate the downstream and upstream values, and is the Peclet number at the cell face in which ,. In the hybrid scheme, when the Peclet number is larger than 2, the first-order upwind value is used; otherwise, the second-order central difference value is used.
Exponential Scheme
The exponential scheme interpolates the face value using an exact solution to the 1D steady advection-diffusion equation:
(18) |
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 (HLPA) scheme of Zhu (1991) may be written as
(19) |
where the subscripts D, C, and U 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)
(20) |
where . The HLPA scheme is second order. Choi et al. (1995) found that the HLPA scheme has similar accuracy to the third-order SMARTER (Sharp and Monotonic Algorithm for Realistic Transport Efficiently Revised) and LPPA (Linear and Piecewise-Parabolic Approximation) schemes but is simpler and more efficient (Shin and Choi 1992; Choi et al. 1995).
Source/Sink Term
The source/sink term is linearized as (Patankar 1980)
(21) |
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
(22) |
where the subscript N refers to the neighboring cell sharing cell face, and are linear coefficients for and . The last term, (b), contains all the remaining terms. 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
The right-hand side of the algebraic system of equations (b) generally contains deferred corrections and source terms which must be computed iteratively. This iteration loop is referred to as the outer loop, and the loop within the linear iterative solver (see Section Iterative Solvers) is referred to as the inner loop. Under-relaxation is often applied to stabilize the convergence of the outer iteration loop. Under-relaxation may be applied as in which is an under-relaxation parameter . The superscript m indicates the previous iteration, and superscript m+1 indicates the new relaxed value. A better approach is used here to introduce the under-relaxation directly in the algebraic system of equations (Majumdar 1988; Ferziger and Peric 1997) as
(23) |
This is referred to implicit under-relaxation and has the effect of making the coefficient matrix more diagonally dominant, thus improving convergence.
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 (Generalized Minimum RESidual) 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 used here allows changes in preconditing at every iteration step Saad (1993). The Incomplete Lower Upper 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 less than four iterations).
The SIP (Strongly Implicit Procedure) iterative solver uses an Incomplete Lower Upper decomposition, which approximates the exact Lower Upper decomposition (Stone 1968). The method is specifically designed for algebraic systems of equations derived from partial differential equations. The implementation here is for a 5-point stencil and, therefore, only applies to nontelescoping grids.
The ICCG (Incomplete Cholesky preconditioned Conjugate Gradient) iterative solver is applicable to symmetric matrices such as the pressure correction equation (Ferziger and Peric 2002). The implementation here is also for a 5-point stencil and, therefore, can only be applied to nontelescoping grids
The simplest iterative solvers implemented here are the point-implicit Gauss-Seidel solvers with or without Successive-Over-Relaxation. The Succesive-Over-Relaxation may speed up convergence but can also lead to model divergence (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 iteration is computa-tionally inexpensive, and the code is efficiently parallelized. However, based on experience and testing, the GMRES and BiCGStab methods are usually more robust and perform better for large time-steps.
Convergence and Time-Stepping
During the iterative solution process, error is calculated and used to determine if a solution has converged, diverged, or stalled at an error below a set tolerance threshold. An estimate of the error in solving the general algebraic equation is given by
(24) |
The -norm of the residual errors is given by
(25) |
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 square root of the number of cells:
(26) |
where is the number of computational cells. Simply stated is referred to as the normalized residual error and the superscript refers to the iteration number. Also 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, requires a reduced time step or has diverged.
Table 3-1. Default criteria to determine whether the iterative solution procedure has converged, diverged, or requires a reduced time step.
Current velocity,m/s | If Rm < 1x10-7 | If RM > 1.0x10-3 | If RM > 1.0x10-2 or |Ui| > 10.0 |
Pressure- correction, m2/s2 |
If RM < 1x10-8 | If RM > 1.0x10-4 | If RM>1.0x10-3 or |P| > 50.0 |
Total-load concentration, kg/m3 |
If RM< 1x10-8 | None | If RM > 1.0x10-3 or Ctk < 0 |
Salinity, ppt | If Rm< 1x10-6 | None | If Csal < 0 |
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 two 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 Function
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. When the model is initialized with anything other than zeros, this is referred to as a hot start. The ramp period allows the model to slowly transition from the specified initial conditions without shocking the system. The ramp function is defined here as
(27) |
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-7.
Figure 3.7. 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 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 period is usually on the order of a few hours to a few days and should not be confused with the spin-up period. The spin-up period is the time it takes for the effects of the initial condition to disappear and can be much longer than the ramp period.
Hydrodynamics
Coupling of Velocity and Water Level – SIMPLEC Algorithm
The governing equations are solved in a segregated manner in which each governing equation is 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 is estimated based on the previous time-step value. Then, the momentum equations are solved for the corresponding velocity:
(28) |
where includes all the remaining terms. The cell face velocities are calculated with a Rhie and Chow (1983) type interpolation method
(29) |
where , is the implicit relaxation coefficient (set to 0.8 by default), and denotes linear interpolation (see Implicit Relaxation of the present Chapter). This method avoids the checkerboard oscillations associated with the collocated grid. It is noted that this approach is slightly different from that originally proposed by Rhie and Chow(1983) and is used by several authors such as Lai (2010). The current approach was found to be significantly more stable.
Next, the velocity and pressure corrections are defined such that both the momentum and continuity equations are satisfied:
(30a,b) |
In the SIMPLEC algorithm, the velocity correction is related to the pressure correction by
(31) |
where
Using and substituting in the continuity equation yields the semi-discrete water level correction equation
(32) |
Note that at convergence, and the above equation 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 , in which the velocity correction is given by .
Summary of the SIMPLEC Algorithm:
- Guess the water level and pressure field
- Solve the momentum equations (Equation 28) to obtain
- Use the Rhie and Chow (1983) momentum to determine the velocities and fluxes at cell faces (Equaton 29)
- Solve the pressure equation (Equation 34) to obtain
- Use the correction equations to adjust the velocities and water levels
- Treat the corrected water level and pressure field as a new guess, and repeat this procedure from Step 2 until convergence is achieved.
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.
Salinity Transport
Transport Equations
The sediment transport equations are discretized using the methods described in the previous section entitled General Transport Equation and are not repeated here.
Laplace Equation
The option is provided to estimate the initial salinity based on the solution of a 2DH Laplace equation with given boundary conditions and scattered salinity values. The Laplace equation is discretized similarly to the transport equation as
(33) |
where
= outward normal gradient of at cell face (f)
length of cell face (f) [m].
Sediment Transport and Morphology Change
The so-called semi-coupled sediment transport model proposed by Wu (2004) is adopted here, in which the sediment calculations are decoupled from the hydrodynamic calculations, but the sediment transport, bed change, and bed material sorting equations are simultaneously solved in a coupled form at each time-step.
Transport Equations
The sediment transport equations are discretized using the methods described in the previous section entitled General Transport Equation and are not repeated here.
Bed Change Equations
The fractional bed change equation is discretized as
(34) |
where:
= morphologic acceleration factor
= bed slope coefficient [-]
= magnitude of the fraction bed load at the cell face f calculated from previous iteration [kg/m/s]
= bed slope calculated at the cell face.
The purpose of the morphologic acceleration factor is to speed up the bed change so that the simulation time represents approximately the change that would occur in . This factor should be used with caution and only for idealized cases or time periods which are periodic (mainly tidal). If time-varying winds or waves are important processes for driving sediment transport, then it is recommended to use reduced or representative wind and wave conditions. Since the CMS runs relatively fast, it is generally recommended not to use the morphologic acceleration factor when validating the sediment transport model using hindcast measurements. The morphologic acceleration factor is useful, however, when simulating idealized cases or analyzing project alternatives.
Bed Material Sorting
The bed material sorting equation (Equation 53) is discretized as
(35) |
where is the change in the top elevation of the second bed layer, and for and for . The mixing layer or active layer thickness calculation is slightly modified to avoid excessively small layers as
(36) |
where is the bed form height and and are the user speci-fied the minimum and maximum mixing layer thicknesses, respectively.
The thickness of the second layer is calculated as . The bed material gradation in the second layer is calculated from the following discretized form of Equation 54:
(37) |
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 2 corresponds to the second layer. To illustrate the bed layering process, Figure 3-8 shows an example of the temporal evolution of seven bed layers during erosional and depositional regimes.
It is noted that in order to maintain a constant number of bed layers, the bottom two layers are merged if the second layer is split or a new layer is created at the bottom using the bed composition and thickness of the bottom layer.
Avalanching
When the slope of a non-cohesive bed, , is larger than the angle of repose, , the bed material will slide (avalanche) to form a new slope approximately equal to the angle of repose.
![Fig 3 8.bmp](/images/thumb/a/a4/Fig_3_8.bmp/530px-Fig_3_8.bmp.png)
The process of avalanching is simulated by enforcing 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:
(38) |
where is the cell center distance between cells P and N , is the cell area, 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 and 0 for X < 0. The sign function, (sgn X) , is equal to 1 for and -1 for and accounts for the fact that the bed slope may have a negative or positive sign. Equation (38) is applied by sweeping through all computational cells to calculate and then modifying the bathymetry as . 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, , 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 38 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 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.
Coupling of Sediment Transport, Bed Change, and Sorting Equations
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 into the bed change and sorting equations and then substituting the sorting equation into the bed change equation.
Summary of Sediment Transport Semi-Coupling Procedure:=
- Calculate bed roughness’s and bed shear stresses
- Calculate the mixing layer thickness
- Calculate the potential sediment concentration capacity
- Guess the new bed composition as
- Calculate the fractional concentration capacity
- Solve transport equations for each sediment size class for
- Calculate the total and fractional bed changes
- Determine the bed sorting in the mixing layer; Repeat Step 5 and iterate until convergence.
- Update the bed elevation as
- Calculate the bed gradation in the bed layers below the mixing layer
- Calculate avalanching
- Correct the sediment concentration due to flow depth change
When using the explicit time-stepping scheme, the sediment transport and morphology change are solved at a time-step which may be equal to or multiples of the hydrodynamic time-step for efficiency. However, when using the implicit time-stepping scheme, the time-step is relatively big and on the order of 10 min. Because the time-step is so big, it is not necessary to use different time-steps for hydrodynamics and sediment transport. In addition, using the same time-step for hydrodynamics and sediment transport provides a better mass balance. For these reasons, the sediment transport time-step is always set to the hydrodynamic time-step in the implicit time-stepping scheme.
Coupling Procedure of CMS-Flow and CMS-Wave
CMS-Flow and CMS-Wave can be run separately or coupled together using a process called steering (Figure 3-9). The variables passed from CMS-Wave to CMS-Flow are the significant wave height, peak wave period, wave direction, wave breaking dissipation, and radiation stress gradients. CMS-Wave uses the updated bathymetry (if sediment transport is turned on), water levels, and current velocities from CMS-Flow.
![Fig 3 9.bmp](/images/thumb/6/65/Fig_3_9.bmp/562px-Fig_3_9.bmp.png)
The time interval at which CMS-Wave is run is called the steering interval. Currently, the steering interval is constant and the input spectra in CMS-Wave must be at constant intervals without any gaps. A schematic showing the steering process is shown in Figure 3-10 in which the simulations time is plotted as a function of the computational time.
![Fig 3 10.bmp](/images/thumb/f/f4/Fig_3_10.bmp/453px-Fig_3_10.bmp.png)
For CMS versions prior to version 4.0, the steering process is controlled in the SMS interface with communication files because the CMS-Wave and CMS-Flow models are separate executables. For CMS v4.0 and above, both CMS-Flow and CMS-Wave are contained within a single executable (known as the inline executable) and the steering process is controlled by an interval steering module. Two main advantages of the inline executable and inline steering module are: 1) the model runs faster because there is no need to use communication files or reinitialize the models (memory allocation, variable initialization, etc.); and 2) the inline executable makes the improvement and maintenance of the steering module easier for the developers and also makes the code portable for other operating systems. The inline steering process is summarized as follows:
- CMS-Wave is run for the first two timesteps and the wave infor-mation is passed to CMS-Flow (Figure 3-10). If specified, the surface roller model is run on the wave grid and the roller contributions to the radiation stresses are added to the wave radiation stresses.
- The wave height, period, dissipation, radiation stress gradients, and wave unit vectors are interpolated spatially from the CMS-Wave grid to the CMS-Flow grid.
- CMS-Flow is run until the next steering interval and wave variables are linearly interpolated throughout time during the specified steering interval. At each flow timestep, variables such as wave length and bottom orbital velocities are updated using the current water depths and current velocities.
- Water levels, current velocities, and bed elevations are estimated for the next wave timestep and are interpolated from the CMS-Flow grid to the CMS-Wave grid.
- CMS-Wave is then run again for the following timestep.
- Step 2-5 are repeated until the end of the simulation.
Spatial Interpolation and Extrapolation
CMS allows the user to use the same or different grids for CMS-Flow and CMS-Wave. If the same grid is used, then no spatial interpolation is carried out. If different grids are used, then spatial interpolation is necessary in order to transfer information from one model grid to another model grid. The interpolation of wave variables from the CMS-Wave grid to the CMS-Flow grid is done using a combination of bilinear and linear triangular interpolation methods. Bilinear interpolation is applied at non-jointed cells (i.e., cells with four neighbors) and trianular interpolation at jointed cells (cells with more than four neighbors). If the extents of the CMS-Wave and CMS-Flow grids are different (e.g. if the CMS-Flow grid is smaller), then the extrapolation of variables is necessary in order to avoid boundary problems with the models. The spatial extrapolations for different variables are given by
(39) |
(40) |
(41) |
(42) |
(43) |
(44) |
where is the mean water surface elevation, is depth-averaged current velocities, is the bed elevation, is the significant wave height, is peak wave period, and is the wave unit vector. The superscripts m and n indicate the CMS-Wave and CMS-Flow time-steps, respectively. The subscripts wave and flow indicate variables on CMS-Wave and CMS-Flow grids respectively. The subscripts P and N indicate variables at the extrapolated and nearest neighbor cells. The extrapolation function (fext) is given by
(45) |
Here, is the distance from cell P to N, and is the extrapolation distance. The extrapolation distance is assigned to each computational grid and can be either automatically calculated by CMS or specified by the user. The mean water surface elevation, peak wave period, and wave unit vectors are extrapolated using a nearest neighbor. This approach is more physically accurate than extrapolating only to a certain distance. For example, water levels are controlled mainly by tides along the coast, and the spatial variation is usually much smaller than the tidal range. Extrapolating bed elevations from a boundary can lead to sharp changes in bathymetry in the wave model and instability problems in both the wave and flow models. A better approach is to extrapolate the bed change. It is noted that this is only for extrapolation. For internal cells the actual bed elevations are interpolated from the flow grid to the wave grid. Finally, careful attention is needed in determining the nearest neighbor so that variables are not extrapolated over inactive portions of the grid (e.g., interpolating values in a bay using values from the open ocean).
Temporal Interpolation and Prediction
Because CMS-Wave requires the water surface elevation at times that are ahead of the hydrodynamic model, the water surface elevation and currents must be predicted for the CMS-Wave timestep. If the steering is relatively small (<30 min), then the values from the last time step may be used without significant error as
(46) |
(47) |
(48) |
where superscripts m and n indicate the CMS-Wave and CMS-Flow time steps, respectively. The subscript flow indicates the variables on the CMS-Flow grid. For many coastal engineering applications, it is desirable and common to use relatively large steering intervals of 2 to 3 hours. For large steering intervals, the change in water depth has the largest influence on the nearshore wave heights. Therefore, when using large steering intervals, it is desirable to make better predictions of water levels and not use the previous time-step water levels. In cases where the relative surface gradients at any time are much smaller than the mean tidal elevation, a better approximation of water level may be obtained by decomposing the water level into
(49) |
where is the mean water level and is a variation around the mean due to due to tidal, wave, and wind generated surface gradients. The symbol can be approximated from water level boundary conditions and is generally much larger. The water level variation may be neglected or approximated as
(50) |
For most coastal inlet applications, the above equation is a better representation of the water surface elevation and is used as the default in CMS. After spatially interpolating the wave height, period, dissipation, and forcing onto the CMS-Flow grid, the variables are linearly interpolated in time. The wavelength, bottom orbital velocities, and mean wave-current bottom friction are then updated including current-wave interactions at each time-step.