Documentation of Groundwater Agent-based Model

Comments or suggestions to <>

1.                              Introduction

In environmental resources management there is the recognition of need for combined socio-environmental models, taking into account multiple points of view of what are the salient features of the system.

Some researchers argue that the modeller should use the simplest representation that captures adequately these features, such that additional complexity would not make a significant difference to the scientific validity of the results produced. For example, many scientists would accept a simplified model that could provide a performance in most cases of 95%+ accuracy compared to a more complicated, detailed, model.

However, this is the argument made when the objective is for scientific understanding. When the purpose of the modelling is linked to stakeholder understanding and decision support, it is arguable that the representational requirements are quite different. In this case, the model proposed has to be sophisticated enough to satisfy the people who will be inspecting it and evaluating it: the stakeholders. This is the most important criterion. For example, if groundwater is a main feature that raises many issues in a region, those stakeholders must see that the model treats groundwater in a realistic way.

The most realistic hydrologic models are those scientific tools based on system dynamics approaches. MODFLOW is a 2-or 3-dimensional ground-water flow model, which is machine-dependent (specific to UNIX, Mac or PC Fortran compilers). The hydrological theory and the derivation of finite-difference equations used in MODFLOW are well documented in 9 chapters (Harbaugh 2005). It is a long running and well-established program now widely used, including free versions as well as corporate GUI products based on MODFLOW codes. Like many scientific and mathematical softwares, MODFLOW has been programmed in Fortran.

MODFLOW is not (on its own) suitable for a project to incorporate social behaviours that are adaptive and responsive to different stresses and structural changes: in this case, many of the decisions relating to resource uses need to be endogenous to the model. One approach that offers some potential in this area (combined socio-environmental models) is agent-based modelling (ABM).

This report outlines ongoing work to build a socio-environmental ABM of groundwater resource management. The method that was chosen was to reimplement the groundwater flow equations entirely in the language of ABM program. This involved identifying the required functionality (starting with just a small subset of all the options of MODFLOW) and writing a new Java package that could be easily integrated with existing software. The RePast (North, Collier, and Vos 2006) ABM platform was chosen. RePast is a set of Java packages designed to provide functionality for social modelling. Furthermore, RePast can be linked with the JESS declarative programming application. This would provide the ability to simulate procedurally the rules for updating the environment, and declaratively the rules for the social actors (a planned future stage of the work).

Model development consisted of implementing the groundwater flow equation for 2d-areal flows[1] of an unconfined aquifer (i.e. the water table is a free surface). In the simplest case, implemented for the testing here, only one geological layer is simulated and the grid cells represent columns of geologic material rather than 3-dimensional cells. Assumptions are grid initial and boundary conditions, described in the following section.


2.                              Test model specifics

In this section I shall document the features of the test model which has been implemented in RePast Agent-based modelling platform, and also simulated in MODFLOW. This model is the subject of experiments to validate the work carried out to integrate the social and environmental processes relating to groundwater resources.

The environment represents a spatial territory modelled as grid of cells of appropriate size, cell spacing, and topography. In this experiment a grid of size 50 x 50 was used. The environment also requires one to specify hydraulic conductivity (C) distributions of the hydrogeologic units, specific yield (Sy), as well as boundary conditions (specified heads and flows) and initial conditions (head elevations).

Specific yield is a ratio between 0 and 1 indicating the volumetric fraction of the bulk aquifer volume that a given an aquifer will yield (per unit drop in head per unit length). Length units were specified in metres and time units in days. A grid cell was chosen to represent 1 Ha, i.e. 100m by 100m. Other parameterisation values were chosen as follows: Sy =  0.2, C = 0.5 metres per day, uniformly over the aquifer.

Physical boundaries are boundaries such as water bodies, impermeable bodies. Hydrological boundaries are regional groundwater divides, streamlines, specified head boundaries and specified flow. Anderson & Woessner (1992) suggest placement of stress nodes on the model boundary. Recharge of an aquifer usually refers to precipitation entering the top of the cell at the water table, whereas underflow refers to water entering horizontally from other aquifers or area outside of the studied region. Two options are to use specified flows or specified heads (either can be constant or time-varying).

The test environment consists of specified flow hydrological boundaries on the top (North) of the grid and specified head boundaries on the bottom (South) of the grid. On the two perpendicular sides are no-flow boundaries, i.e. inactive cells, marking the boundary between aquifer region and impermeable material. Figure 1 illustrates grid layout and boundary conditions.



Figure 1. illustration of the GW environment


The 2D characteristics of the grid are loosely based on one supplied as a RePast demo, namely the sugarscape environment (Epstein and Axtell, 1996). The saturated thickness of the column was calculated by assuming a horizontal aquifer bottom, taking this as the zero elevation datum. Land surface elevation was assumed to lie at a uniform 120m above the horizontal bottom. Specified head in the bottom row of the grid ranged between 50 and 100m; underflow was simulated by placing a ‘recharge well’ on the model boundary, with pumping rate ranging between 40 and 80 cubic metres per day.

The objective of the GFP is to find approximate solutions to the test case, that is, to calculate head values the active cells, i.e. water table elevation values, lying inside the model boundaries not already specified as constant head (row 50).

3.                              Validation experiments

Having inputted the data necessary to create the environment described above into both the MODFLOW software and the Java-RePast ABM, validation experiments were run, the objective being to see whether or not the results of simulations with the two softwares agree.

The test environment ABM was simulated for 1,000,000 time steps, where the convergence to steady state is not complete but is very close. Figure 2 illustrates with a screenshot the convergence upon the steady state at the end of the simulation run. The darkness of the blue shade indicates the elevation at each location: the darker the higher the level. In this situation, the constant head cells act as a drain, the direction of flow is north to south and the head values are higher in the north of the grid. Direction of flow is perpendicular to the contours appearing on the display.

Figure 2. Screenshot of ABM approaching steady state convergence.

A further experiment involved simulation of human-induced stresses. The aim was to compare the environment’s response after a period of abstractions. In the ABM this was done by adding ‘farmer agents’, each possessing a well. Farmer agents are created and located at random places in the environment (and if it happens that they are placed outside of the aquifer upon an inactive cell, they are unable to abstract) and the positions of their wells are recorded in a text file. Figure 3 shows the positioning of farmer agents (red) and their wells (blue – or black for non-functioning ones) as well as the response of the groundwater system after 1,000 time-steps. This information is displayed in different layers (Fig 3) but it can also be superimposed. Well abstractions were set at a constant rate of pumping of 100 cubic metres per time-step.

Figure 3. Screenshot of ABM incorporating farmer-induced stresses (2 layers).

The well locations are then entered in the input file for MODFLOW where the Well package is used to compute the terms for the GFP and simulate the impact of pumping.

The final experiment is not a validation test but is rather an exploration of the model which involves simple adaptive behaviour. There are two possible farmer behaviours. The first behaviour is the one just described: ‘abstract at a constant rate’. The second is the ‘abandon well’ rule, where the farmer abandons the well permanently, switching to a different crop choice or livelihood following the earlier ‘abstract' behaviour.

Within the MODFLOW well package, a conditional rule to end abstractions cannot be incorporated. In MODFLOW there can only be two possible outcomes: 1) if there is water, abstract it (up to the maximum desired rate), and 2) if there is no water there is no abstraction. Because of this it is not possible to simulate the situation in which cells where abandoned wells are located are able to recharge. It could be important to test the resilience or response of the groundwater system to new behaviours of the water users. Therefore we have to reject the use of MODFLOW for simulation of such behaviours on the grounds that it is not suitable.

Clearly in this last experiment, MODFLOW cannot be used for validating the ABM. It can however be argued that if the ABM output closely resembles MODFLOW output over the tests reported in this paper, i.e. that it has been validated against MODFLOW, one can have more confidence in the future results.


4.                              References

ANDERSON M P and WOESSNER W W (1992) Applied Groundwater Modeling: Simulation of Flow and Advective Transport, Academic Press Inc.

EPSTEIN J M and AXTELL R L (1996) Growing Artificial Societies: Social Science From the Bottom Up, MIT Press

HARBAUGH A W (2005), Modflow-2005, The U.S. Geological Survey Modular Ground-Water Model, U.S. Geological Survey Techniques and Methods 6-A16

MCDONALD M G and HARBAUGH A W (1988) A modular three-dimensional finite-difference ground-water flow model, Techniques of Water-Resources Investigations, Book 6, Chapter A1, U.S. Geological Survey, Denver, Colorado

NORTH M J, COLLIER N T and VOS J R Experiences Creating Three Implementations of the Repast Agent Modeling Toolkit. ACM Transactions on Modeling and Computer Simulation, Vol. 16, Issue 1, pp. 1-25


[1] Under the Dupuit assumptions that: (1) flow lines are horizontal and equipotential lines are vertical, and (2) the horizontal hydraulic gradient is equal to the slope of the free surface and is invariant with depth.