# Investigation solution methods for the groundwater flow equations

#### Summary

This activity is used in my groundwater flow modeling class (GEOS-724), a class for upper-level undergraduates and graduate students. In advance, the students receive an introduction to MATLAB and basic programming constructs, and background on the use of finite difference discretizations for solving partial differential equations.

The problem being solved here is a (relatively) simple steady-state, linear groundwater flow problem. The code presents different numerical methods for solving a seminal groundwater flow problem - the Toth problem (as solved by J. Toth http://onlinelibrary.wiley.com/doi/10.1029/JZ068i016p04795/abstract). The solution to the Toth problem shows that if the water table is a muted expression of surficial topography, then groundwater organizes itself into groundwater flow "cells" of varying expanse.

This problem - which is familiar to most groundwater modelers - provides a baseline for discussing differences in solution methods for numerical models. In this script, different solution styles tested include: 1) A "direct" matrix inversion method which is exact but somewhat memory intensive; 2) An iterative but relatively inefficient "point Jacobi" method; and 3) A more efficient Gauss-Seidel iterative method.

After running this script, students are asked to explore aspects of the solutions and comment on their benefits and drawbacks. For example:

-Which solution method appears to be the most accurate, based on the problem statement (for instance the students should check that streamlines do not intersect no-flow boundaries)

-Which solution requires the least / most memory to compute?

-Which solution is the fastest to compute?

-Which solution obtains the most reasonable mass balance?

-How do the solutions perform if the discretization is increased or other parameters are varied (such as iteration "convergence" parameters)?

The problem being solved here is a (relatively) simple steady-state, linear groundwater flow problem. The code presents different numerical methods for solving a seminal groundwater flow problem - the Toth problem (as solved by J. Toth http://onlinelibrary.wiley.com/doi/10.1029/JZ068i016p04795/abstract). The solution to the Toth problem shows that if the water table is a muted expression of surficial topography, then groundwater organizes itself into groundwater flow "cells" of varying expanse.

This problem - which is familiar to most groundwater modelers - provides a baseline for discussing differences in solution methods for numerical models. In this script, different solution styles tested include: 1) A "direct" matrix inversion method which is exact but somewhat memory intensive; 2) An iterative but relatively inefficient "point Jacobi" method; and 3) A more efficient Gauss-Seidel iterative method.

After running this script, students are asked to explore aspects of the solutions and comment on their benefits and drawbacks. For example:

-Which solution method appears to be the most accurate, based on the problem statement (for instance the students should check that streamlines do not intersect no-flow boundaries)

-Which solution requires the least / most memory to compute?

-Which solution is the fastest to compute?

-Which solution obtains the most reasonable mass balance?

-How do the solutions perform if the discretization is increased or other parameters are varied (such as iteration "convergence" parameters)?

## Learning Goals

Concepts / concepts:

-The Toth problem in groundwater flow

-2D groundwater flow modeling

-Direct solution methods

-Iterative solution methods

-Mass balance checks on model solutions

Higher-order thinking skills:

-Model development

-Model intercomparison and criticism

Other skills:

-Basic programming, script modification.

-The Toth problem in groundwater flow

-2D groundwater flow modeling

-Direct solution methods

-Iterative solution methods

-Mass balance checks on model solutions

Higher-order thinking skills:

-Model development

-Model intercomparison and criticism

Other skills:

-Basic programming, script modification.

## Context for Use

This exercise is presented in a 700-level class intended for MS- to PhD level graduate students that often sees a few undergraduates in the class as well.

I present this problem in class - generally 10-15 minutes are needed to describe the basic problem being solved, and then students are allowed to explore (for 15-20 minutes) different aspects of the solution methods, their efficiency, and accuracy.

Students working on this problem should have mastered basic MATLAB programming structures such as for-next loops and if-then statements. In addition students will have gained exposure (earlier in the class) to methods for formulating and discretizing simple partial differential equations, such as the diffusion equation or the Laplace equation.

Throughout this class (Groundwater Flow Modeling), I try to give students scripts similar to the one attached in order to serve as a base set of code that can then be modified to solve similar problems in later homework assignments.

I present this problem in class - generally 10-15 minutes are needed to describe the basic problem being solved, and then students are allowed to explore (for 15-20 minutes) different aspects of the solution methods, their efficiency, and accuracy.

Students working on this problem should have mastered basic MATLAB programming structures such as for-next loops and if-then statements. In addition students will have gained exposure (earlier in the class) to methods for formulating and discretizing simple partial differential equations, such as the diffusion equation or the Laplace equation.

Throughout this class (Groundwater Flow Modeling), I try to give students scripts similar to the one attached in order to serve as a base set of code that can then be modified to solve similar problems in later homework assignments.

## Description and Teaching Materials

## Teaching Notes and Tips

## Assessment

## References and Resources

Original JGR paper by J. Toth: http://onlinelibrary.wiley.com/doi/10.1029/JZ068i016p04795/full