Numerical Solution¶
Characteristics of the Finite Difference Scheme¶
The solution of the governing equations in CE-QUAL-W2 is based on a finite difference numerical approach using variables defined in Figure 122 for no channel slope or Figure 123 for arbitrary channel slope. The finite difference solution has the following characteristics:
- Space-staggered grid
- Conservative formulation
- Regular, structured, Cartesian grid with variable cell length Δx and cell thickness Δz
- Δt for stability requirement computed internally and updated for each time step
This section outlines the numerical approach for the hydrodynamic equations (solution of \(U\), \(W\), and η) and advective-diffusion equations (\(T\) and \(C\) or Φ). Abbreviations used throughout this section include: finite difference approximation (FDA), left-hand side (LHS), right-hand side (RHS), and partial differential equation (PDE).
Hydrodynamic Equations Numerical Solution¶
Characteristics of the Hydrodynamics Numerical Solution¶
- Horizontal velocities and water levels are not solved simultaneously; water levels are solved first followed by velocities.
- Branch hydrodynamics are solved sequentially rather than simultaneously. This can cause instabilities if Δt is too large, and the time step may need to be manually reduced.
- The water surface solution is solved implicitly using central spatial differences, and the resulting simultaneous equations are solved using the Thomas algorithm.
- The horizontal momentum equation is solved explicitly using upwind (or backward) spatial differencing for the advection terms and central spatial differences for all other terms.
- The continuity equation is used to solve for vertical velocities using a central difference explicit solution.
- The order of the solution is as follows:
- Solve the water surface equation for η at time level \(n+1\) (\(n\) is the current time level).
- Compute \(U\) at \(n+1\) using the momentum equation.
- Compute \(W\) at \(n+1\) using the continuity equation.
Free-Water Surface Numerical Solution for η¶
The free surface equation:
is solved by substituting the momentum equation:
in finite difference form and then simplifying. The finite difference form of the momentum equation is:
Defining for simplicity the term \(F\) as:
and substituting in for \(\tau_{xx}\), \(F\) becomes:
Substituting the term \(UB_i^{n+1}\) in the free surface equation for \(UB\), the free surface equation becomes:
Some of these terms can be simplified as follows:
Then substituting these into the equation:
All terms with η are grouped on the left-hand side (LHS) such that:
The first term on the LHS can be put into a backward finite difference form as:
The second term, \(-\Delta t g \cos\alpha \frac{\partial}{\partial x}\left(\frac{\partial \eta}{\partial x} \int_\eta^h B \, dz\right)^n\), can be simplified using the chain rule for partial differential equations to:
Then using a second-order central difference for the second derivative and a first-order backward difference for the first derivative such that:
Also using a backward difference:
Grouping and collecting terms and multiplying through by \(\Delta t \Delta x\), the LHS becomes after simplification:
where the RHS is defined as:
and is evaluated at time level \(n\).
The integral of the cell widths can be put into a summation over the vertical layers as:
where \(BH_r\) is the value of the width times the layer depth for the right-hand side of a cell. In the code, this is the variable BR(I,K) times H(K), or the derived variable BHR(I,K).
Some of the right-hand side terms can be put into a format compatible with the model schematization such as:
The lateral inflow of momentum term represents the gradient over \(x\) of the inflow momentum:
Tridiagonal System for η¶
Combining these terms into one equation:
where:
This equation is applied at all cells in the branch, generating a system of equations that are solved for the water surface elevation at the \(n+1\) time level using the Thomas algorithm. The resulting FDA is implicit in η because of the dependence of η in the momentum equation (see Figure 124).
The boundary conditions of either flow or head boundary are accounted for in applying the above equation to the boundary cells as shown in Figure 125 and Figure 126, respectively. The boundary condition implementation is the same as described in Cole and Buchak (1995).
Horizontal Momentum Numerical Solution for Horizontal Velocity U¶
The x-momentum equation:
is solved using either a fully explicit or an explicit/implicit finite difference solution technique specified by the user after the water surface equation is solved.
Explicit Solution¶
This scheme solves the partial differential terms using an explicit finite difference technique where:
The various terms are put into finite difference form as follows. The longitudinal advection of momentum is an upwind difference scheme where the order of differencing depends on the sign of \(U\), e.g., for \(U > 0\):
The vertical advection of momentum is also an upwind scheme based on the velocity of \(W\). For \(W > 0\) or downward flow:
The gravity force is:
The pressure gradient is:
The horizontal advection of turbulent momentum is:
The contribution to longitudinal momentum by lateral branch inflows is:
Using the definition of the shear stress:
where \(A_z\) is the turbulent kinematic viscosity, the vertical transport of momentum is:
Implicit Solution¶
The implicit technique was utilized to reduce the time step limitation for numerical stability when values of \(A_z\) were large, as for an estuary or a river system. This occurs because the time step limitation is a function of \(A_z\). Only the vertical transport of momentum term was solved implicitly. All other terms for the solution of the horizontal momentum equation were the same as the explicit scheme.
The horizontal momentum equation can be separated into the following two equations:
Equation 5-39 is written as:
where \(U^*\) is the velocity at the new time level before the application of Equation 5-40. Equation 5-39 is solved similarly to the solution of the fully explicit technique outlined above.
Equation 5-40 is then solved using a fully implicit technique as:
This can be rewritten as:
Regrouping terms at \(n+1\) time level on the LHS, the equation can be written as:
where:
The resulting simultaneous equations are solved for \(U^{n+1}\) using the Thomas algorithm.
The resulting horizontal velocities are then corrected to preserve branch continuity (or more correctly to "force" continuity). The lack of a continuity balance is a result of numerical errors in the solution of the FDAs for \(\eta^n\) and \(U^{n+1}\). Cole and Buchak (1995) discuss the algorithm to correct horizontal velocities from continuity.
The correction is calculated segment by segment: the change in the water layers over time should equal the net flow into the segment by horizontal velocities. The change or correction in velocity is apportioned equally to the horizontal velocity of all vertical layers. Other numerical models iterate by re-solving the water surface equation after updated horizontal and vertical velocities are computed, which results in significant computational time but a more correct solution.
Boundary Conditions¶
The solution of the horizontal momentum equation can either accept a flow boundary condition (as shown in Figure 127) or a head or water level condition (as shown in Figure 128). For the flow boundary condition, the velocities at the flow boundary are specified based on the flow rates provided by the user. For the head condition, the model user sets the head or water level as a function of time.
Solution of Vertical Velocity W¶
The continuity equation
is used to solve for \(W\) (Figure 129) after discretizing into finite differences as:
The algorithm starts at the bottom cell using corrected horizontal velocities and where \(WB_{k=0} = 0\) such that:
Numerical Stability¶
The numerical stability criterion is based on the following equation that only considers momentum equation stability:
where:
| Symbol | Description | Units |
|---|---|---|
| \(\Delta t\) | time step | s |
| \(A_x\) | longitudinal eddy viscosity | m² s⁻¹ |
| \(A_z\) | vertical eddy viscosity | m² s⁻¹ |
| \(Q\) | total flow into or out of a cell | m³ s⁻¹ |
| \(V\) | cell volume | m³ |
| \(g\) | gravitational acceleration | m s⁻² |
| \(H\) | maximum waterbody depth | m |
| \(\rho\) | water density | kg m⁻³ |
| \(\Delta\rho\) | surface to bottom water density difference | kg m⁻³ |
Warning
This criterion does NOT guarantee numerical stability since it is based on a linearized form of the PDEs. There is no check on stability for the advective-diffusion equation since it is usually not limiting. However, the advective-diffusion equation can also become unstable.
Advective-Diffusion Equation Numerical Solution¶
Characteristics of the Constituent Numerical Solution¶
- The advective-diffusion equation is solved by splitting the solution between horizontal and vertical transport.
- The horizontal transport is solved explicitly where QUICKEST (Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms, a third-order numerical scheme, Leonard, 1979) is used for horizontal explicit transport, and central differences are used for diffusion.
- Vertical transport is solved using an implicit/explicit general time-weighted scheme for advection and a fully implicit scheme for diffusion; simultaneous equations are solved using the Thomas algorithm.
Solution of the Advective-Diffusion Equation¶
The advective-diffusion transport equation
is solved by splitting the two-dimensional FDA into two one-dimensional parts (Figure 130): (1) horizontal transport and sources/sinks and lateral inflows/outflows, and (2) vertical transport.
Horizontal Transport¶
The horizontal part of the solution is:
The time level \(*\) is the intermediate concentration (or temperature) considering only horizontal fluxes, sources/sinks, and lateral inflows. In this step, the diffusion term is a central spatial difference and the advection term uses the ULTIMATE/QUICKEST differencing technique (see discussion below).
In Version 2, the QUICKEST scheme was introduced, which uses quadratic upstream differencing rather than linear upstream differencing. Cole and Buchak (1995) discuss this differencing algorithm, which eliminates much of the numerical diffusion associated with upstream differencing.
Vertical Transport¶
The result from this explicit computation is then used to compute the vertical transport (see Figure 131). The resulting FDA is put in a general time-weighted scheme:
where θ is the degree of implicitness (=0 explicit; =0.5 Crank-Nicholson; =1 fully implicit). Central differences are used for the spatial derivatives for both the vertical diffusion and vertical advection terms. This equation is applied to all vertical layers and solved using the Thomas algorithm. The model user can choose the degree of implicitness for this equation.
Advective Transport in x and z¶
The first step in the numerical solution is to define the computational grid (Figure 132). The grid is space-staggered since some state variables are defined at the segment centers and some at segment interfaces, displaced by \(\Delta x/2\) or \(\Delta z/2\) from the segment center. The grid discretizes a waterbody into computational cells whose locations are defined by their segment I and layer number K, i.e., cell (K,I).
Variables defined at the cell boundary include the horizontal and vertical velocities (\(U\) and \(W\)), longitudinal eddy viscosity and diffusivity (\(A_x\) and \(D_x\)), vertical eddy viscosity and diffusivity (\(A_z\) and \(D_z\)), and internal shear stress \(\tau_x\). Variables defined at the cell center include the density (\(\rho\)), temperature (\(T\)), constituent concentration (Φ), pressure (\(P\)), and average cell width (\(B\)).
Since constituent concentration is defined at the center and velocities are defined at the boundaries, spatial averaging of velocities is not required to determine fluxes into or out of the control volume at a fixed time level. The horizontal velocity is surrounded by a cell with water surface elevations and densities defined on either side, so it is computed from horizontal gradients of the surface slope and densities without requiring spatial averaging of these variables.
The geometry is specified by a cell width, \(B\), thickness or vertical grid spacing, \(H\) or \(\Delta z\), and length, \(\Delta x\). Several additional geometric variables are used in the calculations. These additional variables include the average cross-sectional area between two cells (k,i) and (k,i+1):
the average widths between two cells (k,i) and (k+1,i):
and the average layer thickness between layers k and k+1:
The numerical procedure for solving the six unknowns at each timestep is to first compute water surface elevations. With the new surface elevations, new horizontal velocities can be computed, and with new horizontal velocities, the vertical velocities can be found from continuity.
Using new horizontal and vertical velocities, the water surface elevation equation can be solved for η simultaneously for a model branch. The solution for η is thus spatially implicit at the same time level and eliminates the surface gravity wave speed criterion:
that can seriously limit timesteps in deep waterbodies. Then the temperature and constituent concentrations are computed from the energy and constituent mass balance equations.
Numerical Diffusion with Upwind Differencing¶
Version 1.0 used upwind differencing in the constituent transport advective terms, in which the cell concentration immediately upstream of the velocity was used to calculate mass fluxes. A major problem with upwind differencing is the introduction of numerical diffusion, which acts like physical diffusion but is an artifact of the numerical scheme. The false longitudinal diffusion coefficient (m² s⁻¹) added to the model can be computed from:
where:
| Symbol | Description |
|---|---|
| \(\alpha_e\) | numerical diffusion coefficient, m² s⁻¹ |
| \(u\) | velocity, m s⁻¹ |
| \(\Delta x\) | longitudinal grid spacing, m |
| \(C\) | Courant number = \(\frac{u \Delta t}{\Delta x}\) |
A similar condition holds for vertical advection. In many cases, numerical diffusion can overwhelm physical diffusion, producing inaccurate results when strong gradients are present. The problem is particularly pronounced for stratified reservoirs and estuaries.
Numerical diffusion has been reduced by implementing an explicit, third-order accurate QUICKEST horizontal/vertical transport scheme (Leonard, 1979), and time-weighted, implicit vertical advection. Tests of this scheme are reported in Chapman and Cole (1992).
Non-Uniform Grid QUICKEST Formulation¶
QUICKEST uses an additional spatial term to estimate concentrations used in computing horizontal and vertical fluxes. A nonuniform grid QUICKEST scheme was developed using a three-point Lagrangian interpolation function to estimate constituent values at grid cell interfaces. Specifically, advective multipliers for each of three upstream weighted grid cells are derived in terms of cell lengths and the local cell interface velocity. Time-invariant parts of the interpolation functions are calculated once, thus minimizing computations for additional constituents.
Implicit vertical transport including variable layer heights has also been implemented. Vertical diffusion is fully implicit, and advection employs a time-weighted, central difference, implicit scheme. A unique feature of vertical advection in the explicit part of the time-weighted scheme is QUICKEST, which increases overall accuracy.
As implemented in the code, the transport scheme is a two-part solution for constituent concentrations at the new timestep:
- Horizontal advection is computed using QUICKEST and diffusion is computed using central differencing. This part also includes the explicit vertical advection contribution (which utilizes QUICKEST) and all sources and sinks.
- The implicit part of vertical advection and diffusion are included. Diffusion is always fully implicit.
The user can time-weight advection by specifying a value for [THETA] that varies from 0 to 1:
- For
THETAequal to 0, the solution is explicit in time and vertical advection is accounted for in the first part of the algorithm. - For
THETAequal to 1, the solution is fully implicit in time and vertical advection is accounted for in the second part of the algorithm. - For
THETAequal to 0.5 or greater, a Crank-Nicholson scheme results where vertical advection is time-weighted between the explicit (using QUICKEST) and implicit parts.
The following is a description of QUICKEST, the preferred transport scheme.
QUICKEST Derivation¶
In one dimension, the conservative control volume advective transport of a constituent Φ integrated over a timestep is:
where:
| Symbol | Description | Units |
|---|---|---|
| \(\Phi_i\) | constituent concentration at a grid point | g m⁻³ |
| \(\Phi_{r,l}\) | right and left cell face constituent concentrations | g m⁻³ |
| \(U_{r,l}\) | right and left cell face velocity | m s⁻¹ |
| \(t\) | time | s |
The QUICKEST algorithm was originally derived using an upstream weighted quadratic interpolation function defined over three uniformly spaced grid points. This interpolation function estimates cell face concentrations required by the conservative control volume transport scheme. For example, the right cell face concentration estimate for a flow positive to the right is:
where \(T\) are advective multipliers which weight the contribution of three adjacent grid point concentrations.
The advective multipliers are obtained by collecting terms associated with each constituent defined by the QUICKEST advection operator. For a non-uniform grid, a combination of two and three-point Lagrangian interpolation functions (Henrici, 1964) are used to compute the QUICKEST estimate for the right cell face concentration centered about cells i and i+1:
where:
- \(x\) = the local right cell face position
- \(D_x\) = diffusion coefficient
Defining a local coordinate system of three non-uniformly spaced grid cells denoted by \(x_{i-1}\), \(x_i\), and \(x_{i+1}\) with corresponding constituent values, the interpolation functions required in Equation 5-56 are:
Taking the first derivative of \(P_1(x)\) and the second derivative of \(P_2(x)\) and substituting into Equation 5-56, it is then possible to group terms and obtain the advective multipliers. For example, the \(T_{i+1}\) multiplier is:
Similar functions are obtained for \(T_i\) and \(T_{i-1}\) multipliers that complete the formulation for the QUICKEST algorithm.
From a computational standpoint, most geometric components of the multipliers are time-invariant and are computed once and stored in arrays. The time-varying part of the multipliers (\(U\), \(\Delta t\), \(D_x\)) are updated each timestep during computation of the \(T\) arrays. However, when the QUICKEST scheme is applied vertically, the spatial part of the multipliers for layers KT and KT+1 are updated each timestep to accommodate the surface elevation fluctuation.
ULTIMATE/QUICKEST Numerical Transport Solution Scheme¶
In Version 2, the QUICKEST numerical scheme replaced the upwind numerical scheme used in Version 1 for solving the advective terms in the advection-diffusion equation. Compared to the upwind scheme, QUICKEST resulted in improved numerical accuracy in simulating sharp fronts since the upwind transport scheme adds excessive numerical diffusion.
A problem with the QUICKEST scheme is that it can give rise to spurious oscillations at the leading and trailing edge of a sharp front or gradient. This can occur where there are fresh/salt water interfaces, point source discharges, or cases of strong temperature stratification. Even though the upwind scheme always gives physically realistic solutions, it introduces numerical diffusion that artificially reduces sharp gradients.
An improvement was introduced by Leonard (1991) that eliminated spurious oscillations but preserved the higher-order solution scheme of QUICKEST. This technique is a Universal Limiter for Transient Interpolation Modeling of the Advective Transport Equations (ULTIMATE), a limiter for maintaining monotonic profiles near a gradient that can be applied to numerical schemes other than QUICKEST.
Formulation for Uniform Velocity and Grid Spacing¶
In order to illustrate the scheme, consider the solution of the unsteady advective equation:
where:
| Symbol | Description | Units |
|---|---|---|
| Φ | concentration | g m⁻³ |
| \(B\) | width | m |
| \(U\) | velocity | m s⁻¹ |
| \(x\) | longitudinal coordinate | m |
| \(t\) | time | s |
The finite difference scheme for this based on a positive flow (\(U > 0\)) is:
The value \(i\) refers to the center grid point, \(R\) is the right-hand face value, and \(L\) is the left-hand face value.
For positive flow (Figure 133):
| Symbol | Description | Units |
|---|---|---|
| \(\Phi_{i-1}\) | upstream concentration | g m⁻³ |
| \(\Phi_i\) | center concentration | g m⁻³ |
| \(\Phi_{i+1}\) | downstream concentration | g m⁻³ |
| \(\Phi_L\) | left face concentration | g m⁻³ |
| \(\Phi_R\) | right face concentration | g m⁻³ |
| \(U_r\) | right face horizontal velocity | m s⁻¹ |
For negative flow (Figure 134):
| Symbol | Description | Units |
|---|---|---|
| \(\Phi_{i-1}\) | downstream concentration | g m⁻³ |
| \(\Phi_i\) | center concentration | g m⁻³ |
| \(\Phi_{i+1}\) | upstream concentration | g m⁻³ |
| \(\Phi_L\) | left face concentration | g m⁻³ |
| \(\Phi_R\) | right face concentration | g m⁻³ |
| \(U_L\) | left face horizontal velocity | m s⁻¹ |
The term \(U \Delta t / \Delta x\) is called the Courant number. The problem to resolve is how to choose the concentrations at the "face" values since concentrations are defined at the center of a cell. An upwinding scheme sets the concentration at the left face to \(\Phi_{i-1}\) and the concentration at the right face to \(\Phi_i\) for positive flow. Higher-order numerical techniques, such as QUICKEST (Leonard, 1979), improve numerical accuracy in estimating these face values.
In CE-QUAL-W2, \(\Phi_R\) and \(\Phi_L\) are initially computed based on the QUICKEST method. However, if the criteria for a monotonic solution are violated, the values for \(\Phi_R\) and \(\Phi_L\) are revised to ensure a monotonic solution. This is the essence of the ULTIMATE algorithm that eliminates over/undershoots in the numerical transport scheme.
Monotonicity Criteria¶
To outline the procedure for simple conditions, the velocity, segment spacing, and segment widths are assumed constant, so that Equation 5-61 can be written as:
Defining normalized variables based on:
for location \(i\) (the center location) and the right face value for positive flow, we have the following:
The conditions for a monotonic solution are:
The face value is unadjusted from that computed by the numerical scheme and the QUICKEST value of \(\Phi_R\) is used without alteration. These conditions are shown as the shaded region in Figure 135.
If these conditions are not met, then \(\Phi_R\) is adjusted to force a monotonic solution. The value of the face is replaced with the nearest allowable value of \(\widetilde{\Phi}_R\) based on the above criteria that will ensure these criteria are met. The face value is determined by using:
This procedure is applied to all the faces and then Equation 5-61 is solved to update the concentration at the next time level. This means that the right face concentration will be the left face concentration for the next segment, thus ensuring mass conservation.
According to tests performed by Lin and Falconer (1997), the QUICKEST-ULTIMATE scheme with splitting of the diffusion and source/sink terms conserved mass and eliminated numerical oscillations (Figure 136). Leonard (1991) also indicated that the QUICKEST scheme coupled with the ULTIMATE scheme was numerically accurate and cost-effective in terms of computational time.
Note
For any case of unequal grid spacing, the order of accuracy diminishes. Leonard (1991) recommends that if used with non-uniform grid spacing, the formal accuracy of the method is only preserved if the grid does not expand or contract more than about 125%.
Tip
Even though the ULTIMATE scheme can be used with any suitable numerical technique, Leonard (1991) indicates that when coupled with the 3rd-order QUICKEST scheme and a 2nd-order central difference diffusion operator, the results are virtually indistinguishable from other higher-order advection solvers.
Procedure for Variable Velocities and Grid Spacing¶
The following shows a straightforward procedure by Leonard to compute the right and left face values if they do not meet the monotonic criteria, as well as a procedure for variable velocities.
Based on the sign of the velocity for each face, compute DEL:
If \(|\text{DEL}| < 10^{-5}\), set \(\Phi_{face} = \Phi_i^n\) and proceed to the next face (the face value is the L or R face). Otherwise, compute:
If \(\widetilde{\Phi}_i^n < 0\) or \(\widetilde{\Phi}_i^n > 1\), set \(\Phi_{face} = \Phi_i^n\) and proceed to the next face. If not, compute:
where \(\Phi_{face}\) is computed based on the user's chosen numerical scheme (such as QUICKEST or another scheme).
- If \(\widetilde{\Phi}_{face} < \widetilde{\Phi}_i^n\), \(\widetilde{\Phi}_{face} = \widetilde{\Phi}_i^n\)
- If \(\widetilde{\Phi}_{face} > \frac{\widetilde{\Phi}_i^n}{\left(\frac{U\Delta t}{\Delta x}\right)}\), \(\widetilde{\Phi}_{face} = \frac{\widetilde{\Phi}_i^n}{\left(\frac{U\Delta t}{\Delta x}\right)}\)
- If \(\widetilde{\Phi}_{face} > 1\), \(\widetilde{\Phi}_{face} = 1\)
Then recompute the face value according to \(\Phi_{face} = \widetilde{\Phi}_{face} \cdot \text{DEL} + \Phi_i^n\).
Once all the face values are determined, use the finite difference form of the solution (Equation 5-61) to determine the solution.
Optimized ULTIMATE/QUICKEST Procedure¶
Leonard (1991) also showed a numerical technique that minimized the computational burden when using ULTIMATE with the QUICKEST scheme. This technique is described as follows.
Based on the sign of the velocity for each face, define C, D, and U nodes (center, downstream, and upstream) corresponding for positive flow to \(i\), \(i+1\), and \(i-1\), respectively.
Compute DEL and CURV, where \(\text{DEL} = \Phi_{i+1}^n - \Phi_i^n\) and \(\text{CURV} = \Phi_{i+1}^n - 2\Phi_i^n + \Phi_{i-1}^n\).
- If \(|\text{CURV}| \leq 0.6|\text{DEL}|\), then use the QUICKEST computed value for the face value, \(\Phi_{face}\) (the face value is the R or L face as shown in Figure 137).
- If not, and if \(|\text{CURV}| \geq |\text{DEL}|\), then set \(\Phi_{face} = \Phi_i^n\)
- If not, and \(\text{DEL} > 0\), limit \(\Phi_{face}\) by \(\Phi_i^n\) below, or the smaller of \(\Phi_{reference} = \Phi_{i-1}^n + \frac{(\Phi_i^n - \Phi_{i-1}^n)}{\left(\frac{U\Delta t}{\Delta x}\right)}\) and \(\Phi_{i+1}^n\)
- If not, and \(\text{DEL} < 0\), limit \(\Phi_{face}\) by \(\Phi_i^n\), or the larger of \(\Phi_{reference} = \Phi_{i-1}^n + \frac{(\Phi_i^n - \Phi_{i-1}^n)}{\left(\frac{U\Delta t}{\Delta x}\right)}\) and \(\Phi_{i+1}^n\)
- Once all the face values are determined, use Equation 5-61 to obtain the solution.
Conditions for Variable Velocity and Width¶
The procedure outlined above is based on unidirectional and uniform magnitude velocity and segment widths. If the velocity regime and widths are variable, then the following procedure is followed in order to maintain a monotonic solution.
Assuming that \(U_R\) is positive and the concentration times width (\(\Phi B\)) increases monotonically, i.e., \((B\Phi)_{i-1}^n < (B\Phi)_i^n < (B\Phi)_{i+1}^n < (B\Phi)_{i+2}^n\), between segment \(i-1\) and \(i+2\), then the goal of the technique is to estimate \(\Phi_R\), or really \(B_R \Phi_R\), and to update the concentration using Equation 5-61. Equation 5-61 can be written as a condition for \(\Phi_R\) as:
If it is assumed that \(B_i^n \Phi_i^n \leq B_R \Phi_R \leq B_{i+1} \Phi_{i+1}^n\), then this is equivalent to saying that \(B_i^n U_i^n \Phi_i^n \leq B_R^n U_R^n \Phi_R \leq B_{i+1}^n U_{i+1}^n \Phi_{i+1}^n\), or that the net flux into a segment is increasing.
Using the monotonic limitation that \(B_i^{n+1} \Phi_i^{n+1} \geq B_{i-1} \Phi_{i-1}^n\) then Equation 5-73 becomes:
Then making a conservative assumption that \(B_L \Phi_L \geq B_{i-1} \Phi_{i-1}^n\), Equation 5-74 becomes:
Another condition is also imposed on \(B_R \Phi_R\) by looking at the control volume segment centered at \(i+1\). Using similar reasoning as above and assuming that \(U_{RR} > 0\), the other criterion for \(B_R \Phi_R\) is:
These criteria would be altered appropriately if the function were monotonically decreasing rather than increasing.
Vertical Implicit Transport¶
Focusing on vertical advective and diffusive transport, constituent transport can be written as:
where \(RHS\) represents horizontal transport and all sources/sinks. Integrating the transport equation vertically and over time gives:
where:
- \(\Phi^*\) = all \(n\)-time level horizontal and explicit vertical transport and sources/sinks
- θ = time-weighting for vertical advection; 0 for fully explicit, 0.55 for Crank-Nicholson, and 1 for fully implicit
Expanding the differential operators in terms of central differences and collecting terms, the above equation can be recast as:
where:
The coefficients are computed once, stored in arrays, and used to update each constituent. This is accomplished by loading the explicit part of the solution, \(\Phi^*\), with each successive constituent and inverting the resulting matrix via a Thomas tridiagonal solver.