Showing posts with label AnAqSim Instructional Series. Show all posts
Showing posts with label AnAqSim Instructional Series. Show all posts

Friday, October 2, 2020

Using the Drain/Fracture Element – Part 3 of 3: Flow in Bedrock Fracture or Fault Zones

 As described in Part 1 and Part 2 of this series, Drain/Fracture elements are useful internal boundaries for easily modeling a variety of hydrologic features including collector trenches, interconnected ponds, and transmissive fracture or fault zones.

This example will demonstrate the use of a drain/fracture line element to represent a zone of more transmissive fractured or faulted rock within a lower permeability bedrock aquifer.

Discrete Fractures and Fracture Zones

In areas with discrete water-bearing fractures, drain elements can be incorporated into an AnAqSim model to direct flow along the higher conductance fracture(s). This capability can be useful when looking at groundwater contours and drawdown; however, particle pathlines cannot be tracked through drain/fracture elements, making interpretation of groundwater flow paths difficult, especially when multiple drain/fracture elements are combined.

To address this pathline issue, the use of separate fractured domains with anisotropy (different K1_horizontal and K2_horizontal values and an Angle_K1_to_x_axis aligned with the fracture strike) is recommended when using particle pathline tracing to evaluate model results is important. As shown in the examples below, the drawdown caused by pumping within a fractured region represented by discrete fractures is nearly identical to the drawdown caused by pumping within a fractured region represented by an anisotropic domain with representative bulk hydraulic conductivities along strike and perpendicular to strike (Fig 1 and Fig 2).

AnAqSim Fracture and Drain Elements

Fig 1. Drawdown caused by extraction well located within a fractured region represented by discrete fractures


AnAqSim Equivalent Porous Media Fractured Zone

Fig 2. Drawdown caused by extraction well located within the equivalent anisotropic porous media fractured region

While the two fractured zone representations both provide similar drawdown plots, they do not produce equivalent particle pathlines to the pumping well located within the fractured region. Pathlines within the equivalent anisotropic porous media agree with the flow of groundwater, predominantly along strike within fractures (Fig 4), while the pathlines tracked from the well located within the discrete fractures appear to flow across strike rather than along it (Fig 3). This is because pathlines that intercept the drain/fracture elements are terminated, so only pathlines that aren’t captured by the drains are tracked perpendicular to the hydraulic gradient.

AnAqSim pathlines through fractured region

Fig 3. Pathlines tracked to an extraction well located within a fractured region represented by discrete fractures

AnAqSim equivalent porous media fractured zone pathlines

Fig 4. Pathlines tracked to an extraction well located within the equivalent anisotropic porous media fractured region

Pathlines in the discrete fracture model primarily terminate at the closest fractures on either side of the well, while the pathlines in the equivalent anisotropic porous media model travel along strike while within the fractured region. The equivalent anisotropic porous media model produces a more representative capture zone and thus may be more useful when determining capture zones for wells within fractured regions.

Summary

Drain/fracture elements can easily produce hydraulic head contours resulting from discrete fractures, pipes, or karst zones located within an aquifer and can effectively represent drawdown resulting from pumping near those drain/fracture elements. If capture zones are desired, drain/fracture elements are not the right choice because the particles are not tracked along the line elements. Instead, representative anisotropic domains may be more appropriate for representing capture zones. The discrete drain/fracture elements can still play a role in developing the representative anisotropic domain if the number, aperture (width), and hydraulic conductivity of the fractures is approximately known. This will allow a model with an anisotropic domain to be fit to the discrete fracture model (by adjusting K1_horizontal, K2_horizontal, and Angle_K1_to_x_axis in the fracture domain window).

Tips and Tricks

  • Use more closely spaced nodes near the end of drain/fracture line elements where the boundary condition is changing rapidly if head contours are not smooth.
  • Using equations within excel can be useful to quickly set up multiple line boundaries that are aligned parallel to each other.

The models used in the above examples are available in this zipped file. The above examples require the full version of AnAqSim to solve. AnAqSim is available from Fitts Geosolutions.

Friday, September 4, 2020

Using the Drain/Fracture Element – Part 2 of 3: Connecting a Series of Ponds

 As described in Part 1 of this series, Drain/Fracture elements are useful internal boundaries for easily modeling a variety of hydrologic features including collector trenches, interconnected ponds, and transmissive fracture or fault zones.

This example will demonstrate the use of a drain/fracture line element to connect a series of ponds in such a way that water flows freely between the ponds and keeps them hydraulically linked regardless of additions or withdrawals from one of the ponds.

A pond in direct communication with the aquifer

In this example, a series of three ponds are in direct communication with the aquifer, and each pond is connected by a small stream. Because the ponds are in direct communication with the aquifer, groundwater is able to easily flow through the ponds as if they were a high hydraulic conductivity unit within the aquifer. And because the three ponds are linked by streams, the water level within all three ponds is nearly identical. This simple model uses five drain elements with high conductance values to represent the three ponds and two connecting streams (Fig 1). The Drain elements conduct water along their length effectively causing the three ponds to have roughly equal surface elevations (Fig 2).

Fig 1. Three ponds (represented by circular drain elements) connected by short stream segments (represented by linear drain elements).

Fig 2. Groundwater elevations in the vicinity of the ponds and connecting stream. Note that the easy flow among the ponds transmitted by the stream drain segments maintains the elevation of water in the ponds, and elevation of the adjacent groundwater in the aquifer, very close to 90 ft msl.


Increasing or decreasing the conductance of the drain elements can be used to control the elevations of the ponds relative to each other. A higher conductance will cause the three pond surface elevations to be closer together, while using a lower conductance will cause the three pond surface elevations to be further apart. If we increase the conductance of the model shown in the previous figure by a factor of 10, we can see that the 90-foot contour extends around the first pond, rather than cutting between the first and second ponds (Fig 3).


Fig 3. Increasing drain element conductance in the model enhances the hydraulic connection among the ponds, and all elevations more closely approximate 90 ft msl.

Similarly, decreasing the conductance of the original model by a factor of 100 causes additional contours above and below the 90-foot contour to separate the ponds, resulting in a larger hydraulic gradient between the three ponds.

Fig 4. Decreasing drain element conductance in the model reduces the hydraulic connection between the ponds and the aquifer, and from pond to pond, causing a significant decreasing head condition through the pond system from left to right.


In the above examples, the conductances of all five drains used to represent the ponds and connecting streams were changed uniformly, but each drain segment can be adjusted individually to better represent observed conditions.

Summary

Drain/fracture elements can easily represent ponds and networks of ponds that are in direct communication with the aquifer and hydraulically linked to each other. Using a high conductance for the drain/fracture elements (on the order 1 Million to 10 Million ft2/d) will cause ponds to have approximately equal surface elevations. Ponds at different surface elevations can be manual matched by adjusting the conductance of some or all of the drain/fracture elements to match observed surface water elevations. Representing ponds and streams using drain/fracture elements assumes that the surface water bodies are in direct communication with the aquifer and are neither extracting nor supplying water to the aquifer system. If the ponds are in-fact a source or sink in the aquifer system, spatially variable area source/sinks should be used for separate pond domains and river line boundaries should be used for the streams.

Tips and Tricks

  • For larger ponds, adding one or more drain lines within the interior of the pond will help to maintain heads across the entire pond.
  • To represent water extraction from within one of the ponds, a well or constant flux line element can be placed within the pond at a specified extraction rate.

The models used to in the above examples are available in this zipped file. Both model files are solvable using either AnAqSimEDU (the free version) or the full version of AnAqSim. Both versions are available from the Fitts Geosolutions.

Friday, August 14, 2020

Using Drain/Fracture Line Boundaries in AnAqSim – Part 1 of 3: Collector Trench Example

Drain/Fracture elements in AnAqSim are useful internal line boundaries that conduct water at a high rate compared to the surrounding domain.  They can be used to easily model a variety of linear hydrologic features including:

  • Trench drains that collect water in a high permeability trench and direct flow towards an extraction well
  • Ponds in direct communication with the aquifer where modeling pond responses to model stresses is desired
  • Discrete fractures or fractured zones

This example will demonstrate the use of drain/fracture line elements to represent a collector trench for groundwater dewatering or remediation, and parts 2 and 3 will focus on modeling ponds and fractures using drain/fracture line elements.

AnAqSim employs these drain/fracture elements as line boundaries with specified conductance (hydraulic conductivity * width) that can transmit large volumes of water. Note that drain/fracture elements in AnAqSim are different than drain boundaries employed in MODFLOW. Drain/fracture elements do not remove water from the model and the user does not supply a reference elevation. If you are trying to simulate a MODFLOW type drain boundary in AnAqSim, it is best to use the River element with the “Dries_up” box ticked. Note also that, while the drain/fracture feature is referred to as a boundary in AnAqSim, it is created using a line dipole function and should not be used to form an external domain boundary, nor should it contact or be joined to an external domain boundary - it is strictly an internal boundary.

Drain/fracture elements can be employed in any instance where hydraulic features can be conceptualized as a thin linear zone with a greater hydraulic conductivity than the surrounding aquifer. While that zone may have a physical width in the real aquifer, as for example in the case of a trench, the mathematical line boundary has zero width. This prevents any pathline tracing along these features as they transmit flow along their orientation. This limitation, along with other tips for implementation, will be discussed in the following example.

Trench Drains

Trench drains with extraction sumps or wells are useful remedial technologies to consider when evaluating remedial options at sites with impacted groundwater, or for certain dewatering applications. AnAqSim allows for rapid simulation of trench drains and extraction wells using either trench drain domains separated from the aquifer by interdomain boundaries or drain/fracture elements with an equivalent conductance (Kx * w) within the aquifer.

Previously, we have represented trench drains as separate domains in flexAEM exercises and calculators (available from the flexAEM website); this is an effective strategy that allows for particle tracing within the drain, but it can be time consuming to input the nodes along the edge of the drain (especially for complex drain geometries that do not align with the x and y axes). Drain/Fracture elements have are easier to input because only a single line is required (although care should be taken near the ends of trench drains to add additional nodes where the boundary condition changes rapidly). Additionally, a node is required at locations that correspond to wells pumping within the trench drain, otherwise the pumping will not be properly conveyed to the trench drain.

The examples below show a trench drain represented with a separate domain (Fig 1) and a trench drain represented using the drain/fracture element (Fig 2). Both examples have three pumping wells located within the trench drain pumping at 4,000 ft3/d or approximately 30,000 gpd. The trench drain is 4 feet wide with a hydraulic conductivity of 1,000 ft/d; this corresponds to a conductance of 4,000 ft2/d for the drain/fracture element.

Fig 1. Trench Drain Represented by a High Hydraulic Conductivity Domain













Fig 2. Trench Drain Represented by a Drain/Fracture Element























Notice that the two trench drain representations yield identical head contours (compare Figs 3 and 4), but the separate trench drain domain model produces a much more complete representation of the particle pathlines (Fig 3)  that represent the capture zones of the three wells. Although the drain/fracture element model does not allow particles to travel along the length of the drain (Fig 4), the particles that are shown represent the overall extent of the trench drain and extraction well capture zone.

Fig 3. Trench Drain Represented by a Separate High Hydraulic Conductivity Domain


Fig 4. Trench Drain Represented by a Drain/Fracture Element


Summary

Drain/fracture elements are useful features in AnAqSim that can be utilized to rapidly model trench drains used for capturing impacted water or dewatering. Modeling the dewatering effect of a trench drain and sump, without the need for particle pathline tracing is an efficient use of drain/fracture elements since it allows the user to save time when digitizing the trench drain.

Tips and Tricks

  • In the above example, near the ends of the trench drain and near the three wells, the spacing of drain/fracture element nodes was decreased to less than 1-foot to provide greater resolution where the boundary condition changes rapidly. If you are experiencing jagged contours near the drain, try decreasing the node spacing to see if this helps to smooth the contours.
  • If you have used drain/fracture elements in your model and you would like to perform particle pathline tracing, try adding a line of pathlines that trace backwards from immediately upstream of the drain/fracture element and another line of pathlines that trace forward immediately downstream of the drain/fracture element. This will give you a fairly good understanding of the flow directions on either side of the drain/fracture element, but will not indicate how far particles travel along the drain/fracture element before reentering the aquifer.

The models used to in the above examples are available in this zipped file. Both model files are solvable using either AnAqSimEDU (the free version) or the full version of AnAqSim. Both versions are available from the Fitts Geosolutions.


Friday, November 8, 2019

Groundwater Protection Area Delineation Using AnAqSim

Public water supply wellfields provide water for a variety of beneficial uses in homes, businesses and industries, and for farmland irrigation in many communities. To protect those water supplies, water purveyors often perform analyses to determine the area over which water enters and flows though the aquifer supplying a well or wellfield, so that measures can be taken to prevent and/or minimize the potential contamination of groundwater in those areas.
 
Often referred to as “wellhead protection areas”, a number of state and local governments have regulations and guidelines on how to delineate these groundwater protection areas.  For instance, in the Commonwealth of Massachusetts, regulations require that the groundwater protection area for a well (referred to as a “Zone II Area”) be delineated under severe hydrologic conditions.  Specifically, Massachusetts regulations describe the Zone II Area as follows:


“Zone II is that area of an aquifer which contributes water to a well under the most severe pumping conditions that can be realistically anticipated (180 days of pumping at safe yield with no recharge from precipitation). “


Typically, one of the most common methods utilized to delineate Zone II Areas (and groundwater protection areas in general) is a groundwater flow model.  AnAqSim is particularly well-suited for this type of analysis because it has a number of special features and tools that make it easy to delineate pumping well Zones of Contribution in general, and Zone II Areas in particular, including the following:
  • AnAqSim’s ability to automatically calculate recharge or leakage over an area (this is useful in confirming that the model area determined from pathline tracing to be contributing recharge to the well matches the specified withdrawal rate at the well; this area can also  be used as a basis for pathline tracing for the Zone II);
  • the ability to capture a snapshot of heads for a selected time step in a transient aquifer simulation (e.g. “freeze” calculated heads on the 180th day following termination of recharge as is required for a Zone II analysis), and then perform pathline tracing;
  • easy setup of a grid of pathline starting locations over some area of the aquifer surface for forward tracing toward the pumping well; and
  • constraining the display of pathlines, so that only those pathlines captured by selected model features (e.g. wells for which wellhead protection areas are to be delineated) are shown on the plot.
As the first installment of our new AnAqSim Example Application Series, which was developed to provide a set of practical modeling application examples that demonstrate how common groundwater modeling analyses can be accomplished using AnAqSim, our Simple Zone II Example Application  demonstrates how AnAqSim can be used to delineate a Zone II groundwater protection area consistent with Massachusetts 310 CMR 22 and guidance documents.


Although the example is focused on the delineation of a Zone II area in Massachusetts, the techniques used in delineating the Zone of Contribution (ZOC) and Area Contributing Recharge (ACR) for the well can also be applied for delineating groundwater protection zones under other regulatory programs.

The example, which comes with a detailed guide on model set up and Zone II delineation with AnAqSim(and all associated modeling files), can be downloaded for free HERE.



Friday, January 25, 2019

Using PEST with AnAqSim

Overview of the Process

AnAqSim, an easy to use Windows-based analytic element groundwater flow model, can also be run from the command line or a batch file. This ability allows the user to move beyond AnAqSim’s built-in manual model calibration features (maintaining a calibration target data set, and plotting a
map of residuals) to employ the power of PEST for automated model calibration.

PEST is a general-purpose parameter estimation software tool that has been widely used for calibrating MODFLOW models and other groundwater flow models. To use PEST with AnAqSim the user is required to create a batch file to run AnAqSim from the command line and create a template file for the AnAqSim model and an instruction file to read the AnAqSim output into PEST.

The creation of a simple AnAqSim script file described in section 4 of the AnAqSim User Guide (http://www.fittsgeosolutions.com/AnAqSimUserGuide.pdf) allows the user to automate AnAqSim runs from the command line. Specifically the user can specify where the run log should be written and what analysis commands should be executed. A list of the analysis commands is included in
Section 2 below. Using this command line functionality for AnAqSim, an automated PEST calibration can be performed for any AnAqSim model. A typical PEST run will include the following user created files:
  • The PEST control file (*.pst)
  • Any template files (*.tpl) that PEST needs (for AnAqSim there is only one template file because all of the AnAqSim inputs are stored in the *.anaq file in xml format).
  • Any instruction files (*.ins) for reading the output (for AnAqSim there is only one instruction file because all of the output will be written to the same *.out file).
  •  (Optional) A parallel run management file (.rmf) if you wish to use multiple processors on your own computer or across a network of computers.

AnAqSim analysis commands
  • initialheadsfile <name.hds> (Optional) name of the initial heads file if the model is
    set up to use an initial heads file
  • outputfile <name.out> file where AnAqSim will write the results of all
    subsequent commands
  • headspecifiedwells writes the discharges of any head-specified wells to the output file
  • dischargespecifiedwells writes the heads at discharge-specified wells to the output file
  • headspecifiedlines writes the discharges of internal head-specified line boundaries to the output
    file
  • rivers writes the discharges of river line boundaries to the output file
  • calibration writes the calibration results to the output file (includes the modeled
    head at each calibration target)
  • verticalleakage writes the vertical leakages over polygon areas to the output file
  • headoutputfile <name.csv> writes the heads to a csv file based on the current contour settings and plot window
  • exit instructs AnAqSim to close the current model window
Simple Example

To illustrate the use of PEST with AnAqSim we will present a simple model parameter fitting example. The following description is intended only to show the kinds of things that AnAqSim is capable of when coupled with PEST. It is not intended to be a step-by-step tutorial or set of instructions.

The example provided below is a simple box model that only requires the free educational version of AnAqSim, available from http://www.fittsgeosolutions.com/downloads-licensing/ (be sure to download the AnAqSimEDU version unless you have purchased a license for the full version of AnAqSim).

The box model is a 5000 ft x 5000 ft square area of homogeneous sandy aquifer material with flow from left to right and three pumping wells located near the center. The box model was initially set up with a specified hydraulic conductivity and pumping rates for the wells to calculate the hydraulic head field within the model. From within that head field, we recorded the head elevations at six observation well locations.

The goal of this example will be to have PEST work from the six recorded head values as its inputs to find the “unknown” pumping rates of the three wells and hydraulic conductivity of the aquifer. The model domain and observation well locations are shown in the figure below.

Starting Model

Starting AnAqSim Model
Observation wells (calibration targets) are added to an AnAqSim model by selecting Analysis Input/Calibration Targets/Head and entering the names and locations of the monitoring wells as well as the observed (measured) head at each location. For PEST runs, the observed head value entered is not important, only the locations of the observation wells. This is so we can extract the modeled heads from AnAqSim after each model run using the command line; the observed heads are input directly into the PEST .pst file and are not extracted from the AnAqSim model.

The first PEST file that we need to create is the PEST control file (ExtracWells.pst). A brief discussion of the relevant sections of the file will be included here, but we suggest that those interested in a more detailed description of the PEST input variables read the information contained
in the USGS report describing PEST++ Version 3 (https://pubs.usgs.gov/tm/07/c12//tm7c12.pdf), specifically Appendix 1.

PEST Files

The ExtracWells.pst file is shown below, select parameters that need to be changed to adapt this example to other AnAqSim models are emphasized in blue. The remaining parameters affect how the
calibration is carried out by PEST and are considered beyond the scope of this example.


ExtracWells.pst

1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pcf
* control data
restart estimation
     4      6       1     0       1
     1     1 single  point  1   0   0
 10.0  -3.0  0.3  0.03  10
 10.0  10.0  0.001
 0.1
 100  0.005  4  4  0.005  4
 1  1  1
* parameter groups
 kh     relative    0.01  0.0  switch  2.0 parabolic
* parameter data
 kh_1       log  factor      100.0       1.0  300.0 kh   1.0  0.0  1
 p_well1    none  factor   -4000.0  -25000.0   -1.0  kh   1.0  0.0  1
 p_well2    none  factor   -4000.0  -25000.0   -1.0  kh   1.0  0.0  1
 p_well3    none  factor   -4000.0  -25000.0   -1.0  kh   1.0  0.0  1
* observation groups
 heads
* observation data
 cal1        89.34256      1.0  heads
 cal2        80.57272      1.0  heads
 cal3        97.98874      1.0  heads
 cal4        82.09399      1.0  heads
 cal5        93.70227      1.0  heads
 cal6        95.60841      1.0  heads
* model command line
 run_anaq.bat
* model input/output
 ExtracWells.tpl  ExtracWells.anaq
 ExtracWells.ins  run1.out

The first line, pcf, indicates that this is the “PEST control file”. The next section contains the control data variables. The first blue variable, 4, is the number of parameters that PEST will be trying to calibrate, the second blue variable, 6, is the number of observation points that PEST will use to assess each run’s performance. These two variables must agree with the number of entries for 
* parameter data and * observation data.

The entries in each row under * parameter data contain the unique name of each parameter that will be adjusted during calibration; whether the variable should be adjusted using a log transform or not (for hydraulic conductivities, where values can range over several orders of magnitude, a log transform is recommended); the starting value that the parameter will take; the allowable minimum parameter value; and the allowable maximum parameter value.

The entries under * observation data contain the unique name for each observation point; the measured value for each observation point; the weight of each observation point; and what kind of observation it is (this can be named anything).

The command beneath * model command line is the command or batch file that is run for each model call. In this case, we are using the batch file run_anaq.bat.

The commands beneath * model input/output contain instructions for how to update the parameter data and how to read the observation data. The first line uses the PEST template ExtracWells.tpl to write the new AnAqSim file ExtracWells.anaq for the next model run. The second line uses the PEST instruction file ExtracWells.ins to read the model output from run1.out. PEST interfaces with the AnAqSim model using the instructions in these two files.

The DOS batch file used for this example is the command line call of our AnAqSim model.

run_anaq.bat

1
"C:\program files\fitts geosolutions\anaqsim\anaqsim.exe" ExtracWells.anaq run_anaq.txt


This instructs the computer (from the DOS command prompt) to run anaqsim.exe on the file ExtracWells.anaq and execute the commands in run_anaq.txt.

run_anaq.txt

1
2
3
outputfile run1.out
calibration
exit

The text file run_anaq.txt contains three lines, a line to use run1.out as the outputfile, a line to execute the calibration command so the modeled heads at each of our calibration targets are recorded for each model run, and a line to exit and close the model.

ExtracWells.tpl


The template file is a replica of AnAqSim XML model input file ExtracWells.anaq with the addition of ptf @ at the beginning and each instance of one of our parameters replaced with @<parameter name>   @. The @ symbol (or whatever symbol follows ptf) is used by PEST to identify locations where parameter data should be written. A snippet of the template file is shown below with the relevant sections in blue.

1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ptf @
<?xml version="1.0" standalone="yes"?>
<ModelInput>
  <Release>
    <ReleaseNo>AnAqSim release 2015-1 beta 30 Jan 2015</ReleaseNo>
  </Release>
  <General>
    <Steady>true</Steady>
    <Length_unit>feet</Length_unit>
    <Time_unit>day</Time_unit>
    <Comments>AnAqSim Remediation Toolkit</Comments>
  </General>
  <Solution>
    <Underrelaxation>0.9</Underrelaxation>
    <Maximum_iterations>20</Maximum_iterations>
    <Starting_heads_source>file</Starting_heads_source>
    <Almost_dry_fraction>0.01</Almost_dry_fraction>
    <Interface_leakage_option>false</Interface_leakage_option>
  </Solution>
  <Check>
    <Head_check_tolerance>1e-3</Head_check_tolerance>
    <Q_check_tolerance>1e-3</Q_check_tolerance>
    <Qn_check_tolerance>1e-4</Qn_check_tolerance>
    <Extraction_check_tolerance>1e-6</Extraction_check_tolerance>
  </Check>
  <ConfinedUnconfinedDomains>
    <Label_unique>aquifer</Label_unique>
    <Level>1</Level>
    <Domain_Type>confined</Domain_Type>
    <Top_elevation>50</Top_elevation>
    <Bottom_elevation>0</Bottom_elevation>
    <Average_head>87</Average_head>
    <Porosity>0.25</Porosity>
    <Storativity>0.10</Storativity>
    <Specific_yield>0.1</Specific_yield>
    <K1_horizontal>@kh_1          @</K1_horizontal>
    <K2_horizontal>@kh_1          @</K2_horizontal>
    <Angle_K1_to_x_axis>0</Angle_K1_to_x_axis>
    <K3_vertical_top_half>30</K3_vertical_top_half>
    <K3_vertical_bottom_half>30</K3_vertical_bottom_half>
  </ConfinedUnconfinedDomains>

The parameter kh_1 is inserted for both the K1_horizontal and K2_horizontal in the confined aquifer domain for our model. PEST recommends that the variable name be padded by multiple spaces to allow enough space to enter variables (e.g. if the number of desired significant digits for kh_1, above, is less than the space provided, kh_1 will be rounded to fit within the allocated space – 14 digits in the example above).

ExtracWells.ins

1
2
3
4
5
6
7
8
pif @
@Label@
l1 w !cal1!
l1 w !cal2!
l1 w !cal3! 
l1 w !cal4! 
l1 w !cal5! 
l1 w !cal6!

The instruction file is used by PEST to read any output files and extract the relevant observation data. The @ symbol is used to identify characters in the output file that PEST will place the cursor. The following ExtracWells.ins is used to read run1.out.

ExtracWells.ins begins with pif @ indicating that this is a PEST instruction file and the @ symbol is used to identify characters. The second line, @Label@, lets PEST know that the next command should be run with the cursor placed after the characters Label. In our run1.out file this is the line before the calibration target results. The next line, l1 w !cal1!, indicates that PEST should move down 1 line (l1) place the cursor just after the 1st white space (w) and read the next uninterrupted set of characters to cal1 (!cal1!). The next 5 lines do the same thing for cal2 through cal6.

run1.out


1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
ExtracWells.anaq opened

Start solving system 11/20/2018 9:16:42 AM
80 equations and unknowns in system
Iteration 1 2 3 4 5 
Converged within the specified solution check values.
Solve complete 11/20/2018 9:16:42 AM

Head Calibration: 
Label   Modeled Head Observed Head Residual      Time
c-1     89.34256  89.34256        -3.870564E-08  0
c-14    80.57272  80.57272        -4.054981E-06  0
TP-5    97.98874  97.98874        -2.511405E-06  0
MW1     82.09399  82.09399        -1.832374E-06  0
MW-2a   93.70227  93.70227        2.057103E-06  0
TW-84   95.60841  95.60841        2.81206E-06  0
Average residual = -5.94717E-07
Sum of residuals squared = 3.824847E-11
Root mean square error (RMSE) = 2.524826E-06

The final PEST file that may be needed is the parallel run management file, ExtracWells.rmf. This file is used to assign any number of PEST slaves (i.e. the individual processors that will run instances of the AnAqSim model) to run in parallel across a range of locations. For this example problem we used two slaves. These are in the folders slave_1 and slave_2 as subdirectories of the folder where ExtracWells.rmf is located. Each folder that is being used for PEST slaves needs to have a copy of the model, and all of the previous files mentioned. A command prompt then needs to be opened in each of these locations and the command pslave needs to be run to set up these locations to receive instructions from parallel PEST (PPEST) followed by the model command line call (run_anaq.bat in this case). The parallel pest run can then be executed in the main file location by entering ppest ExtracWells into the command line (no extension needs to be provided and the .rmf file and .pst file must share the same name).

ExtracWells.rmf


1
2
3
4
5
prf
2 0 0.2 0
'S1' .\slave_1\
'S2' .\slave_2\
1 1


The first line of ExtracWells.rmf indicates that this is a PEST run file, the second line has four entries: the number of slaves (2), whether files are individually named for each slave (1) or not (0), the time to wait for machines to catch up in seconds (0.2) (this should be longer when slaves are distributed over multiple nodes on a crowded network), and whether the lambda search is undertaken using partial parallelization (1) or in serial (0). The third and fourth lines contains the name and location of each slave. For this example the slaves are located in subfolders slave_1 and slave_2. The final line is an estimate of the amount of computation time the model requires to finish on each slave in seconds (if the time is unknown use a ratio of computation times). This is useful when running on nodes of different computational power (e.g. different processors on multiple computers).

PEST Run Results
Pest Run Results

For the box model presented above, PEST performed 68 model runs and was able to complete the optimization with a final phi of 0! The lower the phi value, the better is the estimation of the sought parameters. PEST is telling us that, for this simple ideal model example, the parameter estimation is close to perfect.

The comparison of the calibrated model that was used to set the observations heads and the final PEST calibration is presented below. PEST as able to almost perfectly reproduce the original calibrated model.

Final Calibrated Model

Helpful Tips

PEST utilities are available at http://www.pesthomepage.org/PEST_Utilities.php. These commands can help ensure that the input files are formatted correctly and provide debugging information. The most important one is PESTCHEK <name.pst> which checks that the PEST input files are formatted correctly and consistent.

We hope this simple example has shown you how easy it can be, with a few data and instruction files, to set up and execute a PEST parameter estimation process for an AnAqSim model. If you have questions, please contact us.

The files used for this tutorial are available from FlexAEM at: http://www.flexaem.com/downloads/PEST AnAqSim Example.zip

Friday, January 18, 2019

Exploring the power of AnAqSim using QGIS


FlexAEM recently announced the addition of a new set of exercises to the AnAqSim Instructional Series! The new set of exercises demonstrates how groundwater professionals can use the spatial data management and analysis features of QGIS, a free and powerful open-source geospatial information system (GIS) software package to enhance the groundwater modeling capabilities of AnAqSim. 

The series illustrates how QGIS can generate spatial data describing hydrologic and hydrogeologic features to facilitate groundwater model construction, and then import and process AnAqSim model output data to display model results such as water level contours and flow pathlines in both 2D and 3D. For AnAqSim users who may be less familiar with QGIS, the series includes an overview of QGIS and its capabilities, including compatible file formats, vector and raster analysis tools, editing and management tools, and much more.

The new series includes exercises that demonstrate how to perform a number of useful functions with QGIS, including the digitization of site features to create model elements. For example, river or ocean boundaries, or groundwater divides, can be digitized and transferred to AnAqSim to represent model boundary conditions (Figure 1). The boundaries of other features, such as lakes and ponds, can also be digitized in QGIS and placed in the AnAqSim model using appropriate element properties (Figure 2).

Figure 1
Figure 2











The exercises also demonstrate how QGIS can be used to create rivers and assign elevation data to points along a river system. Users will learn how to digitize a river system using a basemap, and then use a raster file to obtain elevation values for the selected points along the river. Users also learn how to easily format the river data and import it into AnAqSim.

Basemaps for digitizing model elements or preparing river data can also be created in QGIS for use in AnAqSim, or basemap images from other sources can be imported into QGIS to facilitate basemap creation. There is a multitude of freely available GIS data available online, which can be downloaded, viewed, and analyzed in QGIS. The exercises included in the set demonstrate how to use these data to create custom basemaps, and then export those basemaps as a DXF file for use in AnAqSim. For example, the set include an exercise that provides a step-by-step tutorial on how to obtain a web map hosted by the USGS, digitize the boundary of a feature using the web map, and then export the digitized boundary to AnAqSim to help establish model boundary conditions.

Figure 3
Figure 4
Finally, the exercise set demonstrates how to export water level contours (Figure 3) or groundwater flow pathlines (Figure 4) generated from an AnAqSim model run, import the results into QGIS, and view them in 3D. Any model result from AnAqSim that contains elevation values can be viewed in 3D in QGIS, which allows users to easily visualize model scenarios.

To learn more about QGIS and how it can be used with AnAqSim, check out the new addition to the AnAqSim Instructional Series at http://www.flexaem.com/tutorials-tools/Instructional-Set-7.  

Friday, June 29, 2018

New Exercises - Using AnAqSim with QGIS!

FlexAEM is pleased to announce the addition of a new set of exercises to the AnAqSim Instructional Series! The new set of exercises demonstrates the link between QGIS, a free and powerful open-source software package that can be used as a graphical interface for building and displaying model results, and AnAqSim.  The series demonstrates how to digitize features and build basemaps in QGIS, and how AnAqSim model results can be viewed in 2D and 3D in QGIS. Check out the new instructional series HERE.


Wednesday, March 11, 2015

Uncover the Power of Multi-Layer AEM Models with the AnAqSim Instructional Series Advanced-1 Training Package

The Advanced-1 Training Package, which was recently added to the AnAqSim Instructional Series, introduces an important new area of AnAqSim’s capabilities: development of multiple layer groundwater flow models.

Unlike simpler AEM models, which generally only allow for one model layer, AnAqSim can incorporate up to 10 model layers. Each layer can have its own aquifer properties, its own hydraulic features (wells, line sources and sinks, recharge or leakage areas, etc.), and its own boundary conditions.  This allows users to create vertically-zoned aquifers, or vertical aquifer-aquitard sequences that can more accurately represent geology within the aquifer domain and can simulate three-dimensional groundwater flow conditions, such as vertical discharge to surface water bodies or flow to partially penetrating features.

Similar in some ways to the new MODFLOW-USG software, AnAqSim allows for flexible layering in a model – allowing more layers to be added in an area of interest, and fewer layers in the far field area, as shown below.


With this additional power and flexibility come some additional requirements for model construction and testing to ensure an accurate solution. The Advanced-1 Tutorial Series was designed to provide users with detailed instruction on how to properly construct complex multi-layer models, as well as tools and methods that should be utilized to analyze model performance and evaluate aquifer response.  Topics covered include:

·        When a multi-layer model may be necessary or advantageous, and how to specify multiple layers in AnAqSim;
·         How and when extraction element basis points are used to represent vertical leakage between layers;
·         Various methods for checking the accuracy of a multi-layer model solution;
·         Tools and techniques for evaluation of 3-D vertical flow conditions;
·         Proper assignment of model elements and sub-domains to accurately represent hydraulic features;
·         How to identify and avoid errors when joining model domains and model elements;
·         Adjustment of model settings to help improve model convergence;
·         How to incorporate and accurately simulate flow conditions within long, narrow domains (e.g. faults); and
·         Advanced pathline tracing techniques.


The concepts for properly constructing and testing a model are demonstrated in the tutorial series by constructing and examining simple, multi-layer models. The series begins with an overview lesson that explains the basic concepts and methods associated with the construction of multi-layer models in AnAqSim. The first tutorial exercise constructs a basic single-layer box model, and then adds multiple aquifer layers and a pumping well to demonstrate how the flow field changes as the model is transitioned from a single layer model with a fully penetrating well, to a multi-layer model with a fully penetrating lens, to a multi-layer model with pumping from a partially penetrating well. Pathline tracing is applied to examine the three-dimensional capture zone in the vicinity of the well screens. The importance of proper basis point spacing, as well as tools that can be utilized to analyze and test model performance, are also demonstrated.


The next set of exercises construct models to examine three-dimensional groundwater flow in a multi-layer area near a shallow river.  These types of groundwater-surface water interaction models are often applied in ecosystem hydrology studies or conjunctive use water management studies. Multiple methods for representation of a river in an AnAqSim multi-layer model are explored (including the use of a line element within an aquifer domain, and a separate narrow domain with a head-dependent flux upper boundary condition), including how the depiction of vertical flow and discharge in the aquifer zone beneath the river is affected when employing each of these methods.



A set of exercises is also included that demonstrates the proper methods for joining an AnAqSim stream element to a lake or pond boundary. 2-D and 3-D models are constructed to explore the proper placement of stream and lake boundary control points. For the multi-layer model, the use of digitized polygon features to efficiently create more refined basis point spacing near surface water boundaries for greater model accuracy is also explored.


Finally, a model of a bedrock aquifer is created that incorporates a long, linear geologic fault feature with higher hydraulic conductivity. This transmissive fault model demonstrates the outstanding performance of a grid-free polyline-element modeling tool like AnAqSim in simulating small-scale high-resolution flow features that are oriented in ways that would be very difficult to design in a grid-based modeling system. The exercise demonstrates the proper techniques for designing these types of features, and employs pathline tracing to examine the effect of the fault on the groundwater flow patterns near the fault and in the vicinity of a nearby pumping well.


These tutorials should provide a great start in getting you familiar with the concepts behind multi-layer AnAqSim model construction and operation, for a variety of common three-dimensional model applications. They cover the basic concepts, provide practical hands-on model building experience, and teach valuable techniques for refining model design in key areas to improve model solution accuracy.

Visit us on the flexAEM website to learn more about the Advanced-1 Training Package and our other Tutorials and Tools today!