Skip to main content

Tridiagonal matrix, river stage and water table

Short answer

Apply implicit scheme to 1D groundwater equation: −λ h_{i-1}^{j+1}+(1+2λ)h_i^{j+1}−λ h_{i+1}^{j+1}=h_i^j, with λ=TΔt/(SΔx²). River boundary: h_0=h_L; no-flow far boundary: h_{N+1}=h_n. The tridiagonal matrix is solved by Thomas algorithm.

Develop a tridiagonal coefficient matrix to assess river stage and water table interactions for a groundwater aquifer along a river.

A tridiagonal matrix arises when the 1D groundwater equation is written implicitly for every grid along a line from the river to the aquifer boundary.

 river                                     barrier (no flow)
  hL  |  grid1  grid2  grid3  ...  gridN  |
  ~~~~|---o------o------o-------o------o--|
      0   1      2      3      N-1    N  N+1
      |<-dx->|

Governing equation

For a one-dimensional unconfined/confined aquifer next to a river (x measured from the river), with transmissivity TT, storage coefficient SS and head hh:

T∂2h∂x2=S∂h∂tT\frac{\partial^2h}{\partial x^2}=S\frac{\partial h}{\partial t}

Implicit finite difference form

Divide the aquifer into NN grids of width Δx\Delta x (grid 1 next to the river). Use a backward difference in time and a central difference in space, with the space terms at the new time level j+1j+1:

T hi−1j+1−2hij+1+hi+1j+1Δx2=S hij+1−hijΔtT\,\frac{h_{i-1}^{j+1}-2h_i^{j+1}+h_{i+1}^{j+1}}{\Delta x^2}=S\,\frac{h_i^{j+1}-h_i^j}{\Delta t}

With λ=TΔtSΔx2\lambda=\dfrac{T\Delta t}{S\Delta x^2}:

−λ hi−1j+1+(1+2λ) hij+1−λ hi+1j+1=hij,i=1,…,N-\lambda\,h_{i-1}^{j+1}+(1+2\lambda)\,h_i^{j+1}-\lambda\,h_{i+1}^{j+1}=h_i^j,\qquad i=1,\dots,N

Each equation has three unknowns, so a set of NN simultaneous equations must be solved at each time step.

Boundary conditions

  • River side: h0j+1=hLh_0^{j+1}=h_L (the river stage, which may change with time). In the first equation the known term moves to the right-hand side: (1+2λ)h1−λh2=h1j+λhL(1+2\lambda)h_1-\lambda h_2=h_1^j+\lambda h_L.
  • Barrier (no flow) at the far end: ∂h/∂x=0⇒hN+1=hN\partial h/\partial x=0\Rightarrow h_{N+1}=h_N, so the last equation is −λhN−1+(1+λ)hN=hNj-\lambda h_{N-1}+(1+\lambda)h_N=h_N^j. (If the far end has a specified head hRh_R, the last row is instead −λhN−1+(1+2λ)hN=hNj+λhR-\lambda h_{N-1}+(1+2\lambda)h_N=h_N^j+\lambda h_R.)

Tridiagonal coefficient matrix

[1+2λ−λ−λ1+2λ−λ⋱⋱⋱−λ1+2λ−λ−λ1+λ][h1h2⋮hN−1hN]j+1=[h1j+λhLh2j⋮hN−1jhNj]\begin{bmatrix} 1+2\lambda&-\lambda&&&\\ -\lambda&1+2\lambda&-\lambda&&\\ &\ddots&\ddots&\ddots&\\ &&-\lambda&1+2\lambda&-\lambda\\ &&&-\lambda&1+\lambda \end{bmatrix} \begin{bmatrix}h_1\\h_2\\ \vdots\\h_{N-1}\\h_N\end{bmatrix}^{j+1} = \begin{bmatrix}h_1^j+\lambda h_L\\h_2^j\\ \vdots\\h_{N-1}^j\\h_N^j\end{bmatrix}

The matrix is symmetric, tridiagonal and diagonally dominant, so the system has a unique solution and can be solved efficiently by the Thomas algorithm.

Thomas algorithm for the solution

Write the rows as aihi−1+bihi+cihi+1=dia_ih_{i-1}+b_ih_i+c_ih_{i+1}=d_i with ai=ci=−λa_i=c_i=-\lambda. Forward elimination:

c1′=c1b1, d1′=d1b1;ci′=cibi−aici−1′,  di′=di−aidi−1′bi−aici−1′c_1'=\frac{c_1}{b_1},\ d_1'=\frac{d_1}{b_1};\qquad c_i'=\frac{c_i}{b_i-a_ic_{i-1}'},\ \ d_i'=\frac{d_i-a_id_{i-1}'}{b_i-a_ic_{i-1}'}

Back substitution: hN=dN′h_N=d_N', hi=di′−ci′hi+1h_i=d_i'-c_i'h_{i+1}. The new heads become the right-hand side for the next time step, with hLh_L updated to the new river stage.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computational Techniques in Civil Engineering chapter 7 questions →