geos 5311 lecture notes: introduction to mod...

68
GEOS 5311 Lecture Notes: Introduction to Modflow Dr. T. Brikowski Spring 2013 0 Version 1.22, April 3, 2013 1

Upload: buikhue

Post on 22-Jun-2018

239 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

GEOS 5311 Lecture Notes: Introduction toModflow

Dr. T. Brikowski

Spring 2013

0Version 1.22, April 3, 20131

Page 2: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

About Modflow

I Modflow was written to be the principal USGS program forsolving groundwater flow problems (Harbaugh, 2005;Harbaugh et al., 2000; Harbaugh and McDonald, 1996;McDonald and Harbaugh, 1988)

I modularity is its main design featureI code can be easily modified and extended (e.g. Hill, 1990a)I tremendous improvement over earlier USGS codes (e.g.

Prickett and Lonnquist, 1971)I modularization is a good approach to take with any computer

program

I Modflow is the de facto standard for modeling of hydrologicflow problems. For example, a GeoRef search for “Modflow”returns 2332 different articles.

2

Page 3: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Discretization in Modflow

I Modflow uses a block-centered grid system (Fig. 1)

I the modeled system is essentially discretized as a regular seriesof cubic “buckets” (i.e. a block-centered grid, Fig. 2)

I water mass balance is carried out by summing the water fluxesacross each side of the bucket (e.g. Fig. 3), plus internalsource/sinks (wells)

I governing equation for a cell (p. 2-3, Harbaugh, 2005):∑i

Qi = Ss∆h

∆t∆V

where Qi is a discharge into the cell (L3

T ), Ss is the specificstorage of the cell, ∆h is the head change over the timeinterval ∆t, ∆V is the volume of the cell

3

Page 4: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Discretization in Modflow (cont.)

I ultimately a matrix equation is derived in which the unknownvector of cell heads is multiplied by a matrix of geometry androck-property dependent coefficients

I the following notes detail the derivation of that matrixequation, in order to clarify the significance of variousModflow input parameters, matrix solver choices, etc.

4

Page 5: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Example Modflow Grid

Figure 1: Generic modflow grid. Arrays table lists typical variablesspecified for each cell. After Anderson and Woessner (Fig. 3.9, 1992),originally from McDonald and Harbaugh (1988)

5

Page 6: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Grid Types

Figure 2: Finite difference grid types. Modflow adopts theblock-centered approach for ease in describing cell-boundary fluxes. AfterMcDonald and Harbaugh (Fig. 2, 1988).

6

Page 7: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Cell Numbering

Figure 3: Cell numbering scheme in Modflow, where i is row number, jis column, and k is layer. After McDonald and Harbaugh (Fig. 3, 1988).

7

Page 8: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Special Cells

I not all cells in a finite-difference grid will be “normal” (i.e.allow internal changes or flow across all sides)

I in Modflow there are three basic cell types: variable-head(“active”), constant-head (boundary condition) and inactive(outside the problem domain). See Fig. 4

I the status of all cells is stored in array IBOUND in Modflow

I in GMS this array can be viewed from the 3D

Grid/Modflow/Global Options dialog

8

Page 9: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Cell Types

Figure 4: Basic cell types in Modflow. Variable-head cells are normallycalled “active”, constant head cells can also be set using the GeneralHead Boundary (GHB) package. The grid boundary defaults to no-flow(e.g. white cells along top row). After McDonald and Harbaugh (Fig. 8,1988).

9

Page 10: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Layering and Grid Design

Figure 5: Two schemes for vertical discretization. (B) implemented bycomputing material-averaged K for cubic cell, (C) implemented byadjusting conductivity on a cell face to reflect true area (i.e. cubic grid,with K on a face a function of its area). After Harbaugh (Fig. 2-8, 2005).

10

Page 11: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Modflow Packages in GMS

The modular components of Modflow are called packages, andeach Modflow run involves applying the appropriate package set.

Table 1: GMS-supported input/output control and basic problemparameter packages for Modflow. BAS6 package is required.

Package Name Abbrev Description

Basic Pack-age

BAS6 Used to specify the grid dimensions, thecomputational time steps, and an arrayidentifying which packages are to be used.

OutputControl

OUT1 Controls what and when information is tobe output from MODFLOW.

Gage Pack-age

GAGE generates time-series output for selectedcell(s), as if a piezometer (gage) was in-stalled there

11

Page 12: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Matrix Construction

GMS-supported matrix construction packages for Modflow. Oneand only one of these must be selected.

Package Name Abbrev Description

Block Cen-tered FlowPackage

BCF6 Performs the cell by cell flow calcula-tions. The input to this package in-cludes layer types and cell attributessuch as storage coefficients and trans-missivity. Parameters for sensitivityanalysis or parameter estimation areNOT supported.

Layer Prop-ery FlowPackage

LPF Performs the cell by cell flow calcula-tions. The input to this package in-cludes layer types and cell attributessuch as storage coefficients and trans-missivity

12

Page 13: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Matrix Construction (cont.)

HydrogeologicUnit FlowPackage

HUF Defines the model stratigraphy in a gridindependent fashion (in the vertical di-rection)

UpstreamWeighting

UPW computes boundary values with empha-sis on upstream value

13

Page 14: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Source/Sinks

GMS-supported source-sink packages for Modflow. Any numberof these can be selected, none are required.

Package Name Abbrev Description

River Pack-age

RIV1 Simulates river type boundary condi-tions (water source or sink, dependingon head difference between river andaquifer)

RechargePackage

RCH Simulates areal recharge

Well Pack-age

WEL Simulates injection/extraction wells

Multi-NodeWell

MNW Well that spans multiple layers

14

Page 15: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Source/Sinks (cont.)

Drain Pack-age

DRN Simulates drain-type conditions (waterextraction when head rises above speci-fied elevation)

Evapotranspirationpackage

EVT Simulates the effect of evapotranspira-tion from the vadose zone

GeneralHeadBoundaryPackage

GHB Simulates a general purpose head-dependent source/sink. Commonly usedto simulate lakes

15

Page 16: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Source/Sinks (cont.)

Stream/AquiferInteractionPackage

STR Simulates the exchange of water be-tween the aquifer and surficial streams.Includes routing and automatic compu-tation of stage (i.e. like River pack-age but accounting for effect of aquiferon river, and along-stream surface waterflow). Parameters for sensitivity analysisor parameter estimation are NOT sup-ported.

Time Vari-ant Speci-fied HeadPackage

CHD Simulates specified head boundary con-ditions where the head is allowed to varywith time (e.g. a fluctuating lake level)

16

Page 17: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Source/Sinks (cont.)

HorizontalFlowBarrierPackage

HFB Simulates the effect of horizontal flowbarriers such as faults/fractures (or en-gineered structures like sheet piles andslurry trenches)

17

Page 18: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Matrix Solution

GMS-9.0-supported matrix solution packages for Modflow. Oneand only one of these must be selected. Changing solvers mayallow a failed run to converge.

Package Name Abbrev Description

Direct DE4 Modified Gaussian elimination(Harbaugh, 1995). Quick, canstall, but memory-intensive forlinear problems

Geometric Multigrid GMG Good for regular grids (generatessub-grids based on input geome-try) tricky with anisotropy

18

Page 19: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Matrix Solution (cont.)

Link AlgebraicMultigrid Package

LMG Multi-grid independent of inputgeometry (handles irregular gridsor anisotropy well), requires morememory but converges 2-25 timesfaster than previous MODFLOWsolvers (Detwiler et al., 2002)

Strongly ImplicitPackage

SIP1 Iterative solver, can develop oscil-lation or overshoot

PreconditionedConjugate GradientPackage

PCG2 Iterative solver based on thepreconditioned conjugate gradienttechnique

Slice SuccessiveOverrelaxationPackage

SSOR Not available in Modflow-2005+,iterative solver that solves “slice-at-a-time”, limiting communica-tion between slices

19

Page 20: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Multi-Grid Approaches

I initial head in a model can be approximated as a series ofperiodic functions, e.g. a step function in head

I matrix solution often fails because a given frequency of error(high frequency for sound, low frequency for matrices) isamplified, much like sound feedback (e.g. listen to start ofBeatles “I Feel Fine”)

I use internally-computed coarser grids to dampen effect oflow-frequency errors (see slide 51)

I see CFD-online summary

20

Page 21: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

General Matrix Solution Guidance

In general try these methods in the following order

DE4 or SIP Direct, work well for simple problems

PCG2 More parameters to set, but more robust than DE4

LMG Handles most “feedback” (dry/rewet) errors well.Best for large problems (e.g. Yucca Mountain)

NWT Newton-Raphson solution, available inMODFLOW-NWT only (with UPW package)

I best for unsat. flow-dominated settings wheredry/rewet is frequent

I uses magnitude of change from last-computedvalue at cell to accelerate convergence

21

Page 22: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Modflow Processes

Modflow2K has been structured in terms of four basic processes,representing the general tasks involved in modeling (Fig. 6):

I Global Process (GLO): general controls on the model (e.g.grid definitions, etc.)

I Ground-Water Flow (GWF): solution of the flow equation

I Observation Process (OBS): calculates simulated values atobservation points (known head), and error statistics(residuals, or difference between observed and simulatedvalue)

I Sensitivity Process (SEN): uses OBS to determine whichparameters have the greatest impact on error

I Parameter Estimation (PES): optimizes parameter values tominimize error determined by OBS

22

Page 23: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Process Flowchart

Figure 6: Flowchart of Modflow process procedure. After Harbaugh et al.(Fig. 1, 2000).

23

Page 24: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

File Structure

I Modflow utilizes a control file (name file), written by GMSwith the extention mfn (Fig. 8)

I name file lists separate input or output files used by eachpackage

I GMS, VisualModflow, GroundwaterVistas, etc. are allpackages to simplify creation of these input files, and readingand interpretation of output files.

I As such, these programs are just elaborate input/output“wrappers” for the free (public-domain) Modflow software.

24

Page 25: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Modflow Example Grid

Figure 7: Example Modflow grid. After Harbaugh et al. (Fig. 10, 2000).

25

Page 26: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Modflow Namefile

LIST 6 twri.lst

BAS6 5 TWRI.ba6

BCF6 11 TWRI.bc6

WEL 12 twri.wel

DRN 13 twri.drn

RCH 18 twri.rch

SIP 19 twri.sip

OC 22 twri.oc

DIS 10 TWRI.dis

Figure 8: Example Modflow namefile. After Harbaugh et al. (pg. 90,2000).

26

Page 27: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Modflow Discretization File

3 15 15 1 1 0 NLAY,NROW,NCOL,NPER,ITMUNI,LENUNI

1 1 0 CONSTANT 5.000000E+03 DELR

CONSTANT 5.000000E+03 DELC

CONSTANT 2.000000E+02 TOP of system

CONSTANT -1.500000E+02 Layer BOTM layer 1

CONSTANT -2.000000E+02 Confining bed BOTM layer 1

CONSTANT -3.000000E+02 Layer BOTM layer 2

CONSTANT -3.500000E+02 Confining bed BOTM layer 2

CONSTANT -4.500000E+02 Layer BOTM layer 3

8.640E+04 1 1.000E+00 SS PERLEN,NSTP,TSMULT,Ss/tr

Figure 9: Example Modflow discretization (grid-definition) file. AfterHarbaugh et al. (pg. 90, 2000).

27

Page 28: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Modflow Input Instructions

Figure 10: Modflow discretization file input instructions. Each package file has suchinstructions, making hand-editing possible. Note Modflow2K input is free-format(spacing and length of entries is unimportant). After Harbaugh et al. (2000, pg. 45).

28

Page 29: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Governing Equation

The general governing equation solved by Modflow is:

∂x

(Kxx

∂h

∂x

)+

∂y

(Kyy

∂h

∂y

)+

∂z

(Kzz

∂h

∂z

)− W = Ss

∂h

∂t(1)

where

I Kxx ,Kyy ,Kzz are hydraulic conductivity, with principaldirection oriented along a coordinate axis

I W is volumetric source/sink, units of 1t (i.e. volumetric flux

per unit volume of aquifer). Areal source/sinks are convertedto these units

I Ss is specific storage 1L

29

Page 30: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Numerical Approximation

I Recall that Modflow grids are block centered, and numberedby the ith row, jth column and kth layer (Fig. 1).

I Each block is ∆ci wide, ∆rj deep and ∆Vk high

I Flux across a cell face can be determined using Darcy’s Law(i.e. flux into cell i , j , k across face at i , j − 1

2 , k):

Qi ,j− 12,k = Kr

i,j− 12 ,k

(∆ci∆vk)hi ,j−1,k − hi ,j ,k

∆rj− 12

= Cri,j− 1

2 ,k︸ ︷︷ ︸Conductance

(hi ,j−1,k − hi ,j ,k)

where Kri,j− 1

2 ,kis the hydraulic conductivity in the along-row

direction at the cell wall j − 12 , over a cross-sectional area

∆ci∆vk

30

Page 31: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Numerical Approximation (cont.)

I geometric and rock properties are combined into a“Conductance” term that remains constant throughout thesolution process

31

Page 32: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Horizontal Discharge

Figure 11: Horizontal discharge calculation in Modflow. After (Fig. 4,McDonald and Harbaugh, 1988).

32

Page 33: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Water Mass Balance

I the total flux (continuity eqn) into cell i , j , k can then bewritten using the equation on page 30:

Qtotal = Qi ,j− 12,k + Qi ,j+ 1

2,k + Qi− 1

2,j ,k +

Qi+ 12,j ,k + Qi ,j ,k− 1

2+ Qi ,j ,k+ 1

2

= Cri,j− 1

2 ,k(hi ,j−1,k − hi ,j ,k) + Cr

i,j+ 12 ,k

(hi ,j+1,k − hi ,j ,k)

Cri− 1

2 ,j,k(hi−1,j ,k − hi ,j ,k) + Cr

i+ 12 ,j,k

(hi+1,j ,k − hi ,j ,k)

Cri,j,k− 1

2

(hi ,j ,k−1 − hi ,j ,k) + Cri,j,k+ 1

2

(hi ,j ,k+1 − hi ,j ,k)

I adding storage and source/sinks to this equation, the finalmass balance is:

Qtotal + Qsource/sink = Ssi,j,k∆hi ,j ,k

∆t(∆rj∆ci∆vk) (2)

where the fraction represents the time change of head, andthe quantity in the parentheses is the cell volume

33

Page 34: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Source-Sink Representation

I source sinks are grouped into head-dependent and known-fluxplus known-head (where n is the source/sink number):

Qsource/sink =Ns∑n=1

(Pi ,j ,k,n · hi ,j ,k)

︸ ︷︷ ︸Head−Dependent

+Ns∑n=1

qi ,j ,k,n

︸ ︷︷ ︸Known−Flux/Head

(3)

I head-dependent fluxes represent leakage, stream/riverinteractions, etc.

I known-flux source/sinks are wells, recharge, E.T., etc.

34

Page 35: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Finite Difference Equation

I Modflow utilizes a backward-difference formulation, i.e. amolecule in which all terms but one are evaluated at futuretime m + 1

I with this formulation, the final Modflow finite differenceequation (based on equation 2) is:

Cri,j− 1

2 ,k

(hm+1i ,j−1,k − hm+1

i ,j ,k

)+ Cr

i,j+ 12 ,k

(hm+1i ,j+1,k − hm+1

i ,j ,k

)+

Cri− 1

2 ,j,k

(hm+1i−1,j ,k − hm+1

i ,j ,k

)+ Cr

i+ 12 ,j,k

(hm+1i+1,j ,k − hm+1

i ,j ,k

)+

Cri,j,k− 1

2

(hm+1i ,j ,k−1 − hm+1

i ,j ,k

)+ Cr

i,j,k+ 12

(hm+1i ,j ,k+1 − hm+1

i ,j ,k

)+

Ns∑n=1

Pi ,j ,k,n · hm+1i ,j ,k + Qi ,j ,k = Ssi,j,k (∆rj∆ci∆vk)

hm+1i ,j ,k − hmi ,j ,k

∆t

35

Page 36: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Finite Difference Equation (cont.)

I the final step is to simplify by combining all the multipliers ofeach hm+1

i ,j ,k into a single coefficient HCOFi ,j ,k (which can beadjusted for partially-saturated flow)

I these can be combined to make a matrix equation (A · ~h = ~q,Fig. 12), which is solved repetitively in Modflow

36

Page 37: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Matrix Equation

Figure 12: Example matrix equation for 4x3x2 Modflow grid (see Fig.13). After (Fig. 46, McDonald and Harbaugh, 1988).

37

Page 38: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Grid For Matrix Equation

1 2 3 4

5 6 7 8

10 119 12

14 1513 16

Figure 13: 4x3x2 grid for matrix equation (Fig. 12)

38

Page 39: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Matrix Structure

Figure 14: Banded matrix structure of 4x3x2 Modflow grid example (seeFig. 12), only non-zero diagonals are shown, D-E-F are adjacent. After(Fig. 47, McDonald and Harbaugh, 1988).

39

Page 40: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Full vs. Quasi-3D

I several choices are available for treatment of heterogeneity inthe vertical direction:

I fully 3-D flow: when 3-D flow must be considered in thelower-permeability units. Most useful when differences invertical conductivity between units is less than factor of 100(see Fig. 15 and page 43)

I quasi-3D: aquitards are treated as reduced conductancesbetween aquifers. Only vertical flow is considered in theaquitard (see Fig. 16 and 43)

I in Modflow, aquifer thickness is treated only indirectly aspart of the conductance (VCONT & HCOF) terms

I it is important to understand the Modflow formulation ofVCONT (also known as leakance) in order to producesuccessful models. This formulation is outlined below.

40

Page 41: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

VCONT for Fully-3D

Figure 15: Geometry for computation of VCONT for fully-3D case. After(Fig. 27, McDonald and Harbaugh, 1988).

41

Page 42: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

VCONT for Quasi-3D

Figure 16: Geometry for computation of VCONT for quasi-3D case.After (Fig. 28, McDonald and Harbaugh, 1988).

42

Page 43: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

VCONT Formulas

I in Modflow, conductance is calculated as

Cv =Kz

∆v· (∆c · ∆r)

I for convenience, let

VCONT =Cv

∆c · ∆r=

Kz

∆z(4)

i.e. VCONT contains all the time-invariant parametersaffecting vertical flow in the cell (geometric and rockproperties, assuming unconfined saturated thickness constant. . . )

43

Page 44: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

VCONT Formulas (cont.)

I For the fully 3-D case, vertical hydrauilc conductivity is givenby the harmonic mean of the two layers, and VCONT is:

Kz =∆zk+ 1

2

∆vk+1/2Kk+1

+ ∆vk/2Kk

VCONT =2

∆vk+1

Kk+1+ ∆vk

Kk

Note: VCONT incorporates variations in Kz and layerthickness

44

Page 45: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

VCONT Formulas (cont.)

I for the quasi-3D case, Kz for the zone between points i , j , kand i , j , k + 1 (see right side of Fig. 16) is calculated byin-series formula for layered media, and VCONT (akaLeakance) becomes (using the nomenclature in Fig. 16)

Kz =∆ztotal∑Ni=1

∆ziKi

=∆Zu

2 + ∆Zc + ∆ZL2

∆Zu2

Kzu+ ∆Zc

Kzc+

∆ZL2

KzL

VCONT =1

∆Zu2

Kzu+ ∆Zc

Kzc+

∆ZL2

KzL

≈ Kzc

∆Zcfor Kzc << Kzu,KzL

45

Page 46: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

VCONT Summary

I Modflow utilizes the leakance concept in many packages,including BCF6, River, Stream, Drain, GHB

I GMS and LPFI GMS interface to Modflow defaults to the LPF discretization

packageI has no provision to generate the VCONT array (known as

VKCB, pg. 62 Harbaugh et al., 2000)I i.e. when using LPF in GMS aquitards are modeled as explicit

layers, or via the vertical anisotropy parameterI Gotcha: in MODFLOW2005 user can choose to recalculate at

each time step; gives different results than pre-MODFLOW2Kmodel runs

I when BCF is selected for discretization, Leakance is calculatedfrom Map Module information in GMS, and can be editedmanually

46

Page 47: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Choosing a Matrix Package

I as seen above, Modflow generates a matrix equation, whichcan then be solved using a variety of techniques

I different techniques will perform better under particularcircumstances

I if a Modflow run fails to converge (see end of output file), dothe following:

I adjust solver parameters via appropriate GMS dialog (pulldown Modflow/PCG2 ..., etc.

I in particular, relaxing the maximum residual or head changecriterion can be effective. DON’T increase this beyond about1% of the value, since the criterion will be the minimum errorfor the problem.

I adjust other parameters, especially number of internaliterations (e.g. PCG), etc.

I change solver packages. In general LMG will be most robust(but greatest memory demand), SSOR will most reliablyconverge (but with higher error). See descriptions below

47

Page 48: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Choosing a Matrix Package (cont.)

I see Barrett et al. (1994) for a good general summary ofmethods

48

Page 49: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

General Matrix Solution

I as described above, in general the inverse of a matrix is sought

I most methods involve some sort of factorization, transformingthe original matrix into one or more “readily solvable” forms

I Gaussian Elimination, where rows of the matrix are combinedsequentially so as to generate an upper triangular matrix. Ingreatly simplified form, the original matrix equation becomes:

A︸︷︷︸Conductances

· ~h︸︷︷︸Unknown Heads

= ~q︸︷︷︸Source/Sinks

Known Head

[U L] · ~h = ~q

49

Page 50: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

General Matrix Solution (cont.)

I many methods compute a residual (first estimate of changebetween current solution and the last one), and use that toaccelerate convergence. This is done by multiplying the firstestimate of change by a number greater than 1 (theacceleration parameter) and using that to make a revisedestimate

50

Page 51: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Comparative Performance

I 1-D case (Fig. 17)I for two-component error, one long and one short wavelengthI SOR and SIP remove high-frequency error quickly, little effect

on low-frequencyI PCG does better at reducing bothI LMG removes both very quickly

I 2-D case (Fig. 18)I excessively sharp and high peaked initial conditionI SIP, SOR and PCG converge slowly (initial peak is spread out

more slowly, i.e. only local nodes are affected during eachiteration)

I PCG: Cholesky preconditioner spreads much more rapidly thanwith polynomial, i.e. allows increased internode communication

I again LMG gets near-perfect solution in one cycle (Fig. 19)

51

Page 52: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

1-D Performance Comparison of Matrix Packages

Figure 17: Comparison of Modflow matrix package performance, showing convergence rate and trends. Theproblem is a 1-D grid with fixed head of 0 at both ends, and the indicated smooth (wavenumber k=1) andoscillatory (k=15) components of error applied to the initial head condition (k=1+15). The exact solution is avalue of 0 everywhere in the grid. After Mehl and Hill (Fig. 1, 2001).

52

Page 53: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

2-D Performance Comparison of Matrix Packages

Figure 18: Comparison of Modflow matrix package performance, showingconvergence rate and trends. The problem is a 1-D grid with fixed head of 0 at bothends, and the indicated smooth (wavenumber k=1) and oscillatory (k=15)components of error applied to the initial head condition. The exact answer is a valueof 0 everywhere in the grid. After Mehl and Hill (Fig. 2, 2001).

53

Page 54: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

LMG 2D Performance

Figure 19: LMG Modflow matrix package performance. Excellentsolution is achieved in just one cycle. After Mehl and Hill (Fig. 2, 2001).

54

Page 55: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Strongly Implicit Method

I this method modifies the matrix equation by adding C · ~h toboth sides(where m is the iteration number:

(M + N) · ~hm+1

= ~q + N~hm

(5)

I N is constructed so that (M + N) can be easily factored intoUL form (Chp. 12, McDonald and Harbaugh, 1988)

I GMS user-settable parameters include (Fig. 20):I maximum iterations: increase this for runs that show steadily

decreasing residuals (see Modflow output file)I number of iteration parameters: sets number of values used for

weight parameter de-emphasizing influence of distant cells infinite difference molecule. Larger values may aid convergencein difficult cases. Essentially changes how N is built.

I acceleration parameter: weight given to residual-correctionterm

55

Page 56: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

SIP Dialog

Figure 20: GMS interface for Modflow SIP (Strongly Implicit Package)package showing most-commonly-set parameters.

56

Page 57: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

SSOR Package

I the slice-successive overrelaxation method solvestwo-dimensional “slices” of the grid using GaussianElimination, treating out-of-slice heads as known values.

I Essentially de-emphasizes slice-to-slice links. Can work verywell if main flow is along-slice

I slices are solved sequentially, iterating over the entire grid

I the main goals of the method are to minimize memory usageand numerical “spikes” from distant parts of the grid.

I a good method for poorly-converging matrices, but normallyyields higher numerical errors

I a residual scheme is used to accelerate convergence,trial-and-error adjustment of the acceleration parameter canoptimize convergence

57

Page 58: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

SSOR Dialog

Figure 21: GMS interface for Modflow SSOR(Slice-Successive-Overrelaxation) package showing most-commonly-setparameters.

58

Page 59: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

PCG Package

I like the SIP method, the pre-conditioned conjugate gradienttechnique factorizes the A matrix into a sum of two matricesM + N (matrix factorization)

I M is as close to A as possible but is easily invertible (Hill,1990a)

I a “pre-conditioner” is used to obtain M so that it is“well-behaved” during inversion. The conditioning functionmay be set by the user in GMS (Fig. 22). IncompleteCholesky should give the quickest convergence, butpolynomial may be better for “noisy” problems (esp. withparallel processing)

I “conjugate gradient” refers to the inversion of M + N whereinresiduals in two directions in the matrix are minimizedsimultaneously

59

Page 60: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

PCG Package (cont.)

I a residual acceleration scheme is used based on the previoustwo estimates of head during iteration. The relaxationparameter controls the rate of acceleration

I Hill (1990b) indicates SIP may converge more quickly in mostcases

60

Page 61: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

PCG Dialog

Figure 22: GMS interface for Modflow PCG (Preconditioned CongugateGradient) package showing most-commonly-set parameters.

61

Page 62: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

LMG Method

I main objective is to address different wavelength componentsof the residual error using coarser (sub)grids than entered bythe user

I errors that appear smooth on finer grids will appear oscillatoryon coarser grids, and can be more rapidly reduced

I solution proceeds from the finest to coarsest grids, thencorrections are applied from the coarsest to the finest

I note this is an algebraic multigrid method, and so technicallythe matrix, rather than the physical grid, is refined

I can be very efficient (converges in 10% of the time requiredby PCG), but requires 3-8 times more memory (Mehl and Hill,2001)

I the solver of choice for large problems

I the GMS interface (Fig. 23) allows:

62

Page 63: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

LMG Method (cont.)

I enable PCG iterations: do this if LMG fails to reduce residualon repeated cycles (i.e. use PCG to reduce some errorcomponents)

I residual acceleration parameter: as above. Values < 1 retardchanges in h, values > 1 accelerate them

63

Page 64: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

LMG Dialog

Figure 23: GMS interface for Modflow LMG (Linked Multi-Grid) packageshowing most-commonly-set parameters.

64

Page 65: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

Modflow Documentation

Here is a list of useful links to Modflow documentation/guides:

I USGS online overview/guide for Modflow

I USGS general Modflow page

65

Page 66: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

References

Anderson, M.P., Woessner, W.W.: Applied Groundwater Modeling.Academic Press, San Diego (1992)

Barrett, R., Berry, M., Chan, T.F., Demmel, J., Donato, J., Dongarra, J.,Eijkhout, V., Pozo, R., Romine, C., der Vorst, H.V.: Templates for theSolution of Linear Systems: Building Blocks for Iterative Methods.SIAM, Philadelphia, PA (1994),http://www.netlib.org/templates/templates.ps

Detwiler, R., Mehl, S., Rajaram, H., Cheung, W.: Comparison of analgebraic multigrid algorithm to two iterative solvers used for modelingground water flow and transport. Ground Water 40(3), 267–272(MAY-JUN 2002)

Harbaugh, A.W.: Direct solution package based on alternating diagonalordering for the U.S. Geological Survey modular finite-differenceground-water flow model. Open-File Report 95-288, U. S. Geol.Survey, Denver, CO (1995), http://water.usgs.gov/software/MODFLOW/code/doc/ofr95288.pdf

66

Page 67: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

References (cont.)

Harbaugh, A.W.: Modflow-2005, the u.s. geological survey modularground-water model–the ground-water flow process. Techniques andMethods Book 6-A16, U. S. Geol. Survey, Denver, CO (2005),http://pubs.usgs.gov/tm/2005/tm6A16/PDF/TM6A16.pdf

Harbaugh, A.W., Banta, E.R., Hill, M.C., McDonald, M.G.:MODFLOW-2000, the U.S. Geological Survey modular ground-watermodel – user guide to modularization concepts and the ground-waterflow process. Open File Rept. OFR00-92, U. S. Geol. Survey, Denver,CO (2000), http://water.usgs.gov/nrp/gwsoftware/modflow2000/ofr00-92.pdf, 121 p

Harbaugh, A.W., McDonald, M.G.: User’s documentation forMODFLOW-96, an update to the U.S. Geological Survey modularfinite-difference ground-water flow model. Open-File Report 96-485,U.S. Geol. Survey (1996), http://water.usgs.gov/software/MODFLOW/code/doc/ofr96486.pdf

Hill, M.C.: Preconditioned conjugate-gradient 2 (PCG2), A computerprogram for solving ground-water flow equations. Water-resour.investig. rept. 90-4048, U.S. Geol. Survey, Denver, CO (1990a)

67

Page 68: GEOS 5311 Lecture Notes: Introduction to Mod owutdallas.edu/.../GroundWater/LectureNotes/modflow.pdf · GEOS 5311 Lecture Notes: Introduction to Mod ow Dr. T. Brikowski Spring 2013

References (cont.)

Hill, M.C.: Solving groundwater flow problems by conjugate-gradientmethods and the strongly implicit procedure. Water Resour. Res. 26,1961–1969 (1990b)

McDonald, M.G., Harbaugh, A.W.: A modular three-dimensionalfinite-difference ground-water flow model. Techniques of WaterResour. Investig. A1, Book 6, 200 (1988)

Mehl, S.W., Hill, M.C.: Modflow-2000, the u.s. geological survey modularground-water model user guide to the link-amg (lmg) package forsolving matrix equations using an algebraic multigrid solver. Open FileReport OFR 01-177, U. S. Geol. Survey, Denver, CO (2001), http://water.usgs.gov/nrp/gwsoftware/modflow2000/ofr01-177.pdf

Prickett, T.A., Lonnquist, C.G.: Selected digital computer techniques forgroundwater resource evaluation. Bulletin, Illinois State Water Survey,Urbana, IL (1971)

68