iMOD User Manual version 4.4 (html)

11.4Tutorial 4: Create your First Groundwater Flow Model

This tutorial gives a short introduction in creating a groundwater flow model from scratch. It yields a preliminary model that will be enhanced even more in Section 11.5.

All steps in this tutorial were demonstrated during the first live iMOD webinar, recorded on May 2016. You can watch the recordings via the webinar page on the iMOD website ( (Be aware that some parts of the tutorial might be improved or edited in the mean time)


This is what you will do:

Required Data

For this tutorial you need the following iMOD Data Folders:

This file is located in/below the folder:{installfolder} \TUTORIALS \TUT_INITIAL_MODELING.

Note: {installfolder} refers to the full path of the directory you installed iMOD in (e.g. D:\iMOD). Note: If you are a left-handed person and you converted your mouse button settings, ’left mouse button’ should be ’right mouse button’ and vice versa in these tutorials.

Beside this data you will need the iMODFLOW executable to make the final model computations.

Getting Started

Example of a content of an iMOD_INIT.PRF file.


See Section 11.1 and Chapter 9 for more information about the folder structure in iMOD and a description of IMOD_INIT.PRF (see Section 9.1 for more information about this PRF file). Please restart iMOD after changing the IMOD_INIT.PRF file.

Background Image

One of the first things one would like to display is an image of the outline of our island that we’re going to model. Let’s do that.


Figure 11.35: Example of showing a topographical map using the main menu ’View’, ’Show Background Image(s)’ option.

This island represents a small tropical island (3 x 3 km) somewhere in the Pacific. It is surrounded by shallow waters with crystal clear water (light blue), white beaches all around (yellow) and meadows (light green) with some bush areas (dark green) on the hills. In the centre of the island there exists a small settlement with a few houses that use groundwater for watering their fields and cattle and use it as primary source for drinking water. They extract groundwater at the centre of the island (blue circle).

Many people have discovered the beauty of this island and plans arise to build a resort on the island. This will increase the pressure on the natural water resource and the question to be answered is: “How much water can be sustainably extracted from the subsoil, without attracting seawater in the near future to the pumps?”.

With this very simple example we will use iMOD to build a hypothetical model of this island. By means of this example we will illustrate the methodology in iMOD to create a groundwater flow model. At this stage we will ignore any effects of density-driven components caused by salt water. The following steps will be undertaken:

Okay, a lot of work needs to be done, so let’s go!

Creating the topography

Our model will describe the groundwater flow between the surface level and the bedrock in the subsoil. Our first task is to get a digital representation of the surface elevation. Often this is available in the form of a Digital Elevation Model (DEM), unfortunately, we’re lacking this DEM for our island, so we have to sketch it ourselves.

With this functionality in iMOD we’re able to create simple features in the format that iMOD needs to perform a model simulation. In this case we would like to create the outline of the surface level and therefore we need to draw the contours of the surface level and assign appropriate levels to it. After that we can tell iMOD to interpolate from the contours. Okay, let’s start this by digitizing the shore of the island, the outer yellow contour, with an elevation of 0.0 m+MSL.

Your cursor has been changed into the following cursor symbol pictures/h72-end/image1044.png which means that you can start drawing a polygon. Figure 11.36 gives an idea of how this first polygon should look like.


Figure 11.36: Example of how the first polygon should look like.

See Section 4.4 for more details how to modify the polygon once you’ve created it.

Now we have to assign a surface level of 0.0 m+MSL to the drawn polygon.


Figure 11.37: Example of the ’Attribute Values for ...:’ window.

With this Attribute values for ... window we can observe/change the attributes that can be added to the shapes (polygons, lines). We have to add a new attribute to the data to store the contour values of the surface level. Let’s do that.


Figure 11.38: Example of the ’Input’ window to add an attribute.


Figure 11.39: Example of the ’Attribute Values for ...’ window.

Similarly repeat steps Item 12. to Item 18. to sketch the other polygons and lines of the surface elevation of the island. Choose the corresponding elevation values from the table and figure below. Please note that it is not necessary to add the attribute column named [Level] for each shape since this will be applicable for all shapes that are entered. Also use a [Line] feature to express the watershed on the more elevated parts of the island.

Table 11.1: Elevation of the island elements

Island level description type elevation [m]
Hills ridge (west and east) line 15
Hills feet (west and east) line 5
Border green area polygon 2
Island Boundary polygon 0
Shallow water polygon -1
Deep water polygon -5


Figure 11.40: Example of a final result sketching the surface level for the island.

Once we’ve outlined the surface level, we will interpolate the contours to a grid (IDF) with rastersize of 10 meter. This will be accurate enough for our simulation. However, gridsizes at this stage will not be determined for the final simulation scale. See Section 7.9 for more information on scaling issues for model simulations.

This interpolation method will follow the given contours accurately giving a smooth representation of the entered contours.


Figure 11.41: Example of a resulting topography of the island.

It is completely irrelevant where files are saved actually; however, in order to keep your project organized well, it is advisable to create a clear structure in which you save all files that are related to the model. Note: Commonly, we use the foldername DBASE to store all model files. So whenever we refer to the folder DBASE in the coming parts of this tutorial we actually denote the IMOD_USER \DBASE folder.


Figure 11.42: Example of a 3D image of your created island.

Creating the boundary conditions Okay, now we’ve outlined the uppermost boundary of our model, we will specify those areas that are part of the model simulation (active areas) and areas that have fixed values (fixed or non-active areas) for the hydraulic heads. We will use IDF-Calc and IDF-Edit that you both have used in Section 11.2 (we assume you finished Section 11.2 before you moved on to Section 11.4). Okay, we now make an IDF with similar extent and cell size to use for the definition of boundary conditions, therefore we can copy the SURFACE_LEVEL.IDF.

The new file BOUNDARY.IDF is drawn and listed in the iMOD Manager. Please note that BOUNDARY.IDF is a copy of the SURFACE_LEVEL.IDF. Now we are going to determine in the file BOUNDARY.IDF the active areas of the simulation (value= 1) by selecting the area with surface level values above zero. Areas with values less than zero will be fixed areas (value=-1). So let’s continue with that.


Figure 11.43: Example of assigned active (=1) and fixed head cells (=-1).


Figure 11.44: Example of the selection of cells with values greater or equal to zero.

Repeat steps Item 31. upto Item 38. to adjust all values that have values less than zero and calculate those values to become -1.0.

Creating the well file Last thing we need to do is to create an IPF file (iMOD Point File) to represent the well in our model. We have a single well situated in the centre of the island, in the following steps we will create this simple file inside iMOD; however, it can be easily modified/created outside iMOD. For large datasets it is often more convenient to process these types of data in another program.

iMOD already presents the first free data column of the IPF, named ID. The two non-free columns (X-coordinate and Y-coordinate) are not displayed because editing is not permitted. However, for a standard ipf representing a well, the first free column should contain the abstraction rate Q. So we will change the name of the column and fill in the abstraction rate.

Conceptual model - summary For this hypothetical model, these three files ..\DBASE \SURFACE_LEVEL.IDF, ..\
DBASE \BOUNDARY.IDF and ..\DBASE \WELL.IPF are the only spatial varying data sources. The other model input are constant values throughout the model domain and we will assign those values by creating a modeling project in the following section. In the next figure we’ve given a sketch of the subsoil and flow patterns that might occur.


Figure 11.46: Sketch of a estimated flow pattern that might occur in our island model.

We simulate this model with three model layers. The first model layer has a thickness of 1.0 meter (almost no horizontal flow in that model layer) to intercept the recharge. From there water will migrate to the deeper layers 2 and 3. The third model layer is the actual aquifer from which water is extracted via the well screen.

Schematic, the model can be represented by the following figure:


Figure 11.47: Schematic representation of the model.

Creating a Modeling Project and defining a Runfile iMOD arranges a model project by a project file, a so called PRJ file. This file stores all parameter files (IDF, IPF, GEN etc.) that are assigned to particular phenomena in the model. From a project file (*.PRJ) you can generate a runfile (*.RUN) that will be used eventually to simulate groundwater heads. You can imagine that with the same set of parameter files you can simulate many different configuration or different scenarios. For instance steady-state simulation versus transient simulations, a scenario with 50% abstraction, an increase of aquifer permeability or a simulation for a smaller subwindow.
That kind of configurations or scenarios can be initiated by the Project-Manager. Well, probably it is better just to start with it.

This window shows all available packages that are supported by iMOD. Still many will come in future though. Okay, we have to fill in this project manager with our model configuration. In the table, shown below, we have outlined the requirements for this particular three-layered model. Note: the "Porosity Aquifer" and "Porosity Aquitard" values are only needed for the pathlines simulation from step Item 107. onwards.

Table 11.2: Model requirements for a confined, steady-state three layered model.

Parameter Model layer IDF file / Constant Value
2,3 1
(SHD) Starting Heads 1,2,3 0.0 m+MSL
2 ’SURFACE_LEVEL.IDF’ with Addition Value -1.0 m
3 -15.0 m+MSL
(BOT) Bottom Elevation 1 ’SURFACE_LEVEL.IDF’ with Addition Value -1.0 m
2 -15.0 m+MSL
3 -20.0 m+MSL
(KHV) Horizontal Permeability 1,2,3 25.0 m/day
(KVA) Vertical Anisotropy 1,2,3 1.0
(KVV) Vertical Permeability 1,2 25.0 m/day
(WEL) Wells 3 . \DBASE \WELL.IPF
(RCH) Net Recharge 1 0.5 [standard unit is mm/day]

Okay, let us fill in the boundary conditions in the Project Manager.

In the current window you can specify how the package (in this case the Boundary Condition) needs to be configured. Let us fill this dialog for the boundary condition for model layer 1.


Figure 11.48: Example of the ’Define Characteristics for:’ window, filled in for Boundary Condition (BND).

Let us fill in the boundary conditions for the remaining 2 layers.

Now let us fill in the remaining parameters from table Table 11.2.

Take care to select the parameter name in the Project Definition list each time you want to open the Define Characteristics for window to enter NEW parameters.


Figure 11.49: Example of selecting a parameter in the ’Project Definition’ window: in this example firsts ’(BOT) Bottom Elevation’ is selected to expand the tree view by clicking the ’+’-sign.

Whenever you select the expression under an expanded branch in the treeview in the Project Definition list, you’ll be able to edit an existing entered parameter; see the example below.


Figure 11.50: In this example the exisiting (BOT) parameter set of layer 1 is selected. Click on the ’Properties’ button to open the ’Define Characteristics for:’ window to edit the Bottom Elevation parameters.

The figure below is an example of the Project Manager window after filling in all parameters.


Figure 11.51: Example of Project Manager window after filling in a model configuration.

For the meaning and explanation of the available buttons on the Project Manager window go to section Section 5.5.

Now the model parameters are added, we need to add also settings of the solver. iMOD uses the Preconditioned Conjugate Gradient method (PCG), the same solver used in MODFLOW.

The next step will be to create a runfile than can be used for a model simulation.

iMOD will fill this dialog depending on the definitions in the Project Manager. We are not able to create a transient runfile since we do not have any transient data. We will generate a runfile for a three-layered model.


Figure 11.52: The Define Simulation Configuration window after entering the value ’3’ for the ’Number of layers’.

iMOD will create a runfile for a steady-state simulation taking into account all active packages in the Project Manager. This runfile can be used to start the model simulation.

Running the Model

iMOD will draw a hatched rectangle showing the maximum extent of the model described in the runfile. In Section 11.6 we will demonstrate more functionalities in scaling and creating a submodel using the Model Simulation Tool. For now we will just skip most of the functionalities on this window and start running the model.


Figure 11.53: Example of the ’Start Model Simulation’ window.


Figure 11.54: Example of the ’Result Folder’ tab in the ’Start Model Simulation’ window.

The actual simulation will be carried out by the iMODFLOW executable and will run in the DOS box attached to iMOD. Please check whether you can find this window and examine the results, it will look more or like as follows:


Figure 11.55: Example of a DOS window showing the echo of the model simulation.

Model results Let’s have a look at some results.

iMOD will load the selected results files (HEAD for model layers 1, 2 and 3) into the iMOD Manager and displays the result on the graphical canvas. Use your experience learned from the previous Tutorials to display the computed heads as shown in the example on the next page. To show the IDF by contourlines, open the Legend window and click the Contourlines button (  pictures/h1-h3/image234.png ).


Figure 11.56: Isolines of the computed hydraulic heads of the island.

As we can see by the computed hydraulic head, the gradient towards the well in the centre of the island tends to be such that no water is extracted from the ocean. To illustrate this even more we can compute pathlines that show the actual path through the subsoil that groundwater follows from the location of infiltration towards the location of extraction. We call that particle tracking which is explained in the next section.

Intermezzo: Result folder and logfile *.LIST
iMOD will create folder \IMOD_USER \MODELS \ISLANDQ500 in which the results of the model simulation will be saved. Moreover, a complete copy of the runfile, the used executable for the simulator (e.g. iMOD_V4_3_X64R.exe) and a batch script will be saved too. Double clicking this batch script (RUN.BAT) from Windows Explorer or Total Commander will re-run this model outside iMOD. This can be very convenient whenever some trial-and-error computations have to be carried out. For now, we will work purely within iMOD.
If only the folder ...\ISLANDQ500 \mf2005_tmp is available, your model did not run successfully. In that case, check the standard output file.

iMODFLOW produces standard output in the file iMODFLOW.list. This files is saved in the subfolder mf2005_tmp of the Result Folder you specified (in this example ..\IMOD_USER \MODELS \ISLANDQ500 \mf2005_tmp). Your simulation ended correct if the last lines of the LIST file should look like this:
Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/10/25 11:31:05
Elapsed run time: 4.261 Seconds

If this is not the case, the last file mentioned might be the cause.

At the end of the LIST file the overall volumetric budget is printed and can be checked for the resulting water balance error (IN - OUT):


Figure 11.57: Example of the volumetric water balance as printed by MODFLOW in the iMODFLOW.list-file.

So, in short, the iMODFLOW standard output file iMODFLOW.list contains info on:

Create Startpoints for a Pathline Simulation

iMOD offers the possibility to define startpoints for any particle tracking independently of a model, modelsize and or cellsize. Startpoints will be defined by means of a polygon a line and/or points and startpoints are distributed within the limits of that/those polygon(s)/lines. So, let us define startpoints on the island.


Figure 11.58: The ’Start Points Definition’ window including a Preview of the spatial distribution.

So now we’re finished creating startpoints, let’s use them in the pathline simulator.

Running the Pathline Simulator

iMOD will search in the appropriate folders to see whether all necessary files are available. For a particle tracking you need at least the budget terms in the x, y and z direction, these files are stored in the . \BDGFRF, . \BDGFFF and . \BDGFLF, respectively. iMOD will display the availability of those files whenever you select a model result.

The example shown here will only highlight the most important steps to perform the particle simulation; however, it is difficult to explain the results whenever one cannot fully understand the technique behind it. So please, read some documentation on particle tracking, done by D.W. Pollock (USGS OpenFile Report 94-464).


Figure 11.59: The ’Pathline Simulation’ window; tab Model and tab Input.

On this tab we need to tell iMOD the specific information that is needed for the particle simulation. Most important are the top- and bottom interfaces for the two model layers, see Section 7.14 for more detailed information on this topic. Let’s fill it in quickly.
Important note "do not close this window before you saved your input otherwise you lose all your work"!


Figure 11.60: The ’Input Properties’ window for the Boundary Conditions.

Before we enter the Properties for the Top- and bottom Files we need to create another IDF file. Remember our conceptual model of the Islans model? For the bottom of layer 1 (and the top of layer 2) we need an IDF which has an elevation 1 meter below the surface level IDF; you can create such an IDF in the iMOD manager without closing the Pathlines Simulation window.


Figure 11.61: The ’Input Properties’ window for the Top- and bottom Files.

We now need to specify how the starting points for the simulation are defined.

This is the starting definition file that we’ve created earlier.

For now we will skip most of the configuration setting in the other tabs, but feel free to have a look in more detail at Section 7.14.

Bear in mind that whenever you have a lot of particles to examine, but you’re not actually interested in their paths but only in their age at interception, consider the IPF files as alternative to flowlines. Those files are much-much smaller and can be examined quicker.

iMOD will load the computed IFF file and presents it like black lines. So let’s colour it by their age, which makes more sense.

One of the other items to be plotted is the velocity, that is computed as the flux (m\({}^{3}\)/day) divided by the porosity (-) divided by the area (m\({}^{2}\); width*model layer thickness). A change in porosity will change the velocity linearly and therefore the age of the flowline, but will, however, not affect the shape of the pathline.


Figure 11.63: Example of a two-dimensional image of pathlines.

From the 3D image below, it is clear that most of the water penetrates vertically to the deeper subsoil and then flows to the well. Given that the material is highly permeable (25m/day) and homogeneous. Please note that the vertical scale is always very much exaggerated! In the next Section 11.5we will enhance this model to include more resistance in the subsoil which will affect the pathline behaviour.

Finally, our major question is still unanswered.


Figure 11.64: Example of a three-dimensional image of pathlines near the well.

Sensitivities and sustainable yield

So, now we know that an extraction of 500m\({}^{3}\)/day will be sustainable, we’re still wondering what the maximum will be. It will be your task as hydraulic engineer to give an answer to that question by simulating a variety of model simulations for different extraction rates for the well. You could vary the permeability too, since this parameter is often uncertain. It will be interesting to illustrate the accuracy of your sustainable yield estimation with a bandwidth that expresses the inaccuracy of the permeability too.

As stated above, after each model simulation you should check the total water balance of the model in the iMODFLOW.list file located in the model directory ..\MODELS \ISLANDQ500 \mf2005_tmp), it shows the total summary of the model simulation. If you scroll down, you’ll see the total water balance for the model.

In the example above shows the quantity of water flowing in from the sea is close to zero while the amount of water flowing out to the sea is 4081m\({}^{3}\)/day. You could use these as evaluation criteria as well!