GoPhast: A Graphical User Interface for PHAST 

Techniques and Methods 6-A20 

U.S. Department of the Interior 

U.S. Geological Survey
Cover: GoPhast screen view for Example 2 (p. 74). The grid has been colored to show the 

distribution of initial hydraulic head. The status bar (at bottom) shows the coordinates of the 

mouse cursor, the column and row numbers at the cursor position, the value of initial head in the 

user’s choice of units at the cursor position, and a description of how the initial head value at that 

location was specified. 
GoPhast: A Graphical User Interface for PHAST 

By Richard B. Winston 

 

Techniques and Methods 6-A20 

U.S. Department of the Interior 

U.S. Geological Survey
U.S. Department of the Interior 

P. Lynn Scarlett, Acting Secretary 

U.S. Geological Survey 

P. Patrick Leahy, Acting Director 

U.S. Geological Survey, Reston, Virginia: 2006 

Any use of trade, product, or firm names in this publication is for descriptive purposes only and 

does not imply endorsement by the U.S. Government. 

Suggested citation:

Winston, R.B., 2006, GoPhast: A Graphical User Interface for PHAST: U.S. Geological Survey 

Techniques and Methods 6-A20, 98 p. 
Contents

1. Abstract..................................................................................................................................... 1

2. Introduction............................................................................................................................... 1

2.1 Reasons for Using Graphical User Interfaces ....................................................................... 2

2.2 Purpose and Scope................................................................................................................. 3

2.3 Distribution............................................................................................................................ 3

3. Basic Concepts.......................................................................................................................... 3

3.1 The Grid ................................................................................................................................ 3

3.2 Data Sets................................................................................................................................ 4

3.3 Formulas................................................................................................................................ 4

3.4 Objects................................................................................................................................... 5

3.5 Assigning Values to Data Sets .............................................................................................. 5

3.6 Boundary Conditions............................................................................................................. 7

4. Initial Dialog Boxes.................................................................................................................. 7

4.1 Start-Up Dialog Box.............................................................................................................. 7

4.2 Initial Grid Dialog Box.......................................................................................................... 7

5. Main Window ........................................................................................................................... 8

5.1 Top, Front, and Side Views................................................................................................... 8

5.1.1 The Selection Cube......................................................................................................... 9

5.1.2 The Ruler ........................................................................................................................ 9

5.1.3 The Working Area ........................................................................................................ 10

5.2 Three-Dimensional View .................................................................................................... 10

5.3 Hints and the Status Bar...................................................................................................... 10

6. Generating Grids..................................................................................................................... 11

6.1 Specifying a Uniform Initial Grid ....................................................................................... 11

6.2 Specifying a Grid with Numbers......................................................................................... 11

6.3 Drawing the Grid................................................................................................................. 12

6.4 Using Objects to Specify the Grid....................................................................................... 12

7. Interpolation Methods............................................................................................................. 16

8. PHAST-Style Interpolation .................................................................................................... 16

9. Formulas................................................................................................................................. 17

9.1 Operators............................................................................................................................. 18

9.2 Functions............................................................................................................................. 19

9.2.1 GIS................................................................................................................................ 19

9.2.2 Grid ............................................................................................................................... 20

9.2.3 Logical .......................................................................................................................... 22

9.2.4 Math.............................................................................................................................. 23

9.2.5 Object............................................................................................................................ 24

9.2.6 Text ............................................................................................................................... 27

9.2.7 Trig................................................................................................................................ 27

10. Creating, Selecting, and Editing Objects in GoPhast ............................................................. 28

10.1 Creating Objects ........................................................................................................... 28

10.1.1 Points ............................................................................................................................ 28

10.1.2 Polylines........................................................................................................................ 28

10.1.3 Polygons........................................................................................................................ 29

10.1.4 Straight-Lines................................................................................................................ 29

iii
10.1.5 Rectangles..................................................................................................................... 29

10.2 Selecting Objects .......................................................................................................... 30

10.3 Editing Objects ............................................................................................................. 31

11. Main Menu and Buttons ......................................................................................................... 31

11.1 File ................................................................................................................................ 32

11.1.1 Import Shapefile Dialog Box........................................................................................ 33

11.1.2 Import DXF File Dialog Box........................................................................................ 34

11.1.3 Import Points Dialog Box............................................................................................. 35

11.1.4 Import Distributed Data by Zone Dialog Box .............................................................. 35

11.1.5 Import/Edit Bitmap Dialog Box ................................................................................... 36

11.2 Edit................................................................................................................................ 37

11.2.1 Show or Hide Bitmaps Dialog Box .............................................................................. 37

11.3 Grid ............................................................................................................................... 38

11.3.1 Editing the Grid ............................................................................................................ 38

11.3.2 Subdivide Columns, Rows, and Layers Dialog Box .................................................... 39

11.3.3 Set Widths of Columns, Rows, and Layers Dialog Box............................................... 39

11.3.4 Grid Angle Dialog Box................................................................................................. 39

11.3.5 Generate Grid Dialog Box ............................................................................................ 40

11.3.6 Grid Spacing Dialog Box.............................................................................................. 40

11.3.7 Smooth Grid Dialog Box .............................................................................................. 41

11.3.8 Select Column, Row, and Layer Dialog Box................................................................ 41

11.4 Data............................................................................................................................... 41

11.4.1 Data Sets Dialog Box.................................................................................................... 42

11.4.2 Formula Editor Dialog Box .......................................................................................... 44

11.4.3 Data Type Problem Dialog Box.................................................................................... 46

11.4.4 Color Grid Dialog Box ................................................................................................. 47

11.4.5 Formula Errors Dialog Box .......................................................................................... 47

11.5 Object............................................................................................................................ 48

11.5.1 Object Properties Dialog Box....................................................................................... 49

11.5.2 Rearrange Objects Dialog Box ..................................................................................... 53

11.5.3 Search for Objects Dialog Box ..................................................................................... 53

11.5.4 Selected Objects Dialog Box ........................................................................................ 53

11.5.5 Show or Hide Objects Dialog Box ............................................................................... 53

11.5.6 Select Objects by Name Dialog Box ............................................................................ 54

11.6 View.............................................................................................................................. 55

11.6.1 Changing the Magnification ......................................................................................... 55

11.6.2 Go To Dialog Box......................................................................................................... 56

11.6.3 Vertical Exaggeration Dialog Box................................................................................ 57

11.6.4 3D Lighting Controls Dialog Box ................................................................................ 57

11.7 Customize ..................................................................................................................... 58

11.7.1 Hint Display Time Dialog Box..................................................................................... 58

11.7.2 Ruler Format Dialog Box ............................................................................................. 58

11.7.3 Choose Style Dialog Box.............................................................................................. 58

11.8 PHAST Options............................................................................................................ 59

11.8.1 Title and Units Dialog Box........................................................................................... 59

11.8.2 Grid Options Dialog Box.............................................................................................. 59

11.8.3 Chemistry Options Dialog Box..................................................................................... 59

11.8.4 Solution Method Dialog Box........................................................................................ 60

iv
11.8.5 Steady Flow Dialog Box............................................................................................... 60

11.8.6 Time Control Dialog Box ............................................................................................. 61

11.8.7 Free Surface Dialog Box............................................................................................... 61

11.8.8 Print Initial Conditions Dialog Box.............................................................................. 61

11.8.9 Print Frequency Dialog Box ......................................................................................... 62

11.9 Help............................................................................................................................... 64

12. Examples................................................................................................................................. 64

12.1 Example 1 ..................................................................................................................... 64

12.1.1 Creating the Grid .......................................................................................................... 65

12.1.2 Phast Options................................................................................................................ 66

12.1.3 Data Sets....................................................................................................................... 67

12.1.4 Boundary Conditions.................................................................................................... 68

12.1.5 Initial Head ................................................................................................................... 71

12.1.6 More PHAST Options .................................................................................................. 72

12.1.7 Visualizing Data ........................................................................................................... 73

12.2 Example 2 ..................................................................................................................... 74

12.2.1 Initial Set Up................................................................................................................. 75

12.2.2 Create the Grid with Objects ........................................................................................ 75

12.2.3 Data Sets....................................................................................................................... 77

12.2.4 Boundary Conditions.................................................................................................... 77

12.2.5 PHAST Options............................................................................................................ 79

12.3 Example 3 (Example 4 in PHAST)............................................................................... 80

12.3.1 Initial Set Up................................................................................................................. 80

12.3.2 Data Sets....................................................................................................................... 81

12.3.3 Rivers............................................................................................................................ 82

12.3.4 Specified Flux Boundaries............................................................................................ 83

12.3.5 Leaky Boundaries......................................................................................................... 85

12.3.6 PHAST Options............................................................................................................ 86

12.4 Example 4 (Biscayne Bay Aquifer).............................................................................. 87

12.4.1 Initial Set Up................................................................................................................. 87

12.4.2 Creating New Data Sets................................................................................................ 87

12.4.3 Importing Data.............................................................................................................. 88

12.4.4 Generating the Grid ...................................................................................................... 89

12.4.5 Using Formulas to Define Aquifer Properties.............................................................. 90

12.4.6 Boundary Conditions.................................................................................................... 91

12.4.7 Initial Conditions .......................................................................................................... 92

12.4.8 Running the Model ....................................................................................................... 93

12.4.9 Variations...................................................................................................................... 93

13. Summary................................................................................................................................. 94

14. Acknowledgments .................................................................................................................. 95

15. References Cited..................................................................................................................... 95

16. Appendix 1. Tools for Programmers...................................................................................... 97

16.1 Help Generator.............................................................................................................. 97

16.2 GoPhast Testing Tool ................................................................................................... 97

16.3 WebIndexer................................................................................................................... 98

17. Appendix 2. Running GoPhast from the Command Line....................................................... 98

v
Figures

1. The grid in PHAST including nodes (black dots) and a light gray element and a dark gray 

cell. ............................................................................................................................................. 4 

2. Example of 2D data sets used to define the top and bottom of a geologic unit. (A) Top view, 

(B) Side view, (C) Front view, (D) Three-Dimensional view. .................................................. 6 

3. The main window of GoPhast. ........................................................................................................ 8 

4. The parts of the top, front, or side views of the model.................................................................... 9 

5. The top, front, and side Selection Cubes. ........................................................................................ 9 

6. Ruler in GoPhast.............................................................................................................................. 9 

7. A 3D view of a model in GoPhast. ................................................................................................ 10 

8. Unrotated (A) and rotated (B) grid with unmoved objects............................................................ 12 

9. The objects used to define the position of the grid........................................................................ 13 

10. The Generate Grid dialog box. .................................................................................................... 13 

11. Grid and objects........................................................................................................................... 14 

12. Grid with region with smaller elements specified by polygon object. ........................................ 14 

13. Generate Grid dialog box with grid smoothing activated............................................................ 15 

14. Grid generated with grid smoothing. ........................................................................................... 15 

15. Interpolation methods. A. Nearest interpolation method. B. Nearest Point interpolation 

method. C. Inv. Dist. Sq. interpolation method. ........................................................................ 16 

16. Global and grid coordinate systems in GoPhast. ......................................................................... 20 

17. BlockAreaFront returns the product of a times c......................................................................... 20 

18. BlockAreaSide returns the product of a times b.......................................................................... 21 

19. BlockAreaTop returns the product of b times c........................................................................... 21 

20. FractionOfObjectLength returns 0.30.......................................................................................... 25 

21. VertexInterpolate(1,2,3) returns the values shown for each element. ......................................... 26 

22. Appearance of (A) selected object, (B) non-selected object, and (C) an object with a 

selected vertex............................................................................................................................ 30 

23. Imported Oklahoma water bodies................................................................................................ 34 

24. Formula Editor............................................................................................................................. 45 

25. Object Properties dialog box........................................................................................................ 49 

26. Elements affected by object with Set values of enclosed elements checkbox (shown in red) 

in top and front views. ............................................................................................................... 50 

27. GoPhast Start-Up dialog box. ...................................................................................................... 65 

28. Initial Grid dialog box.................................................................................................................. 65 

29. Initial appearance of GoPhast main window in Example 1......................................................... 66 

30. Top section of the Title and Units dialog box showing the title for example 1........................... 66 

31. Grid Options dialog box showing selection of just the X Chemistry dimensions....................... 67 

32. Data Sets dialog box showing specifications of the aquifer properties....................................... 68 

33. Appearance of model in example 1 after zooming in on the left side of the top view of the 

model. ........................................................................................................................................ 69 

34. Drawing a line near the left side of the top view of the model................................................... 69 

35. Object Properties dialog box showing how to set up the specified head boundary for the left 

side of the model........................................................................................................................ 70 

36. Three dimensional view of model showing object on left side of model. ................................... 70 

vi
37. Drawing a line to represent a specified head boundary on the right side of the top view of 

the model.................................................................................................................................... 71 

38. Data Sets dialog box showing how to set up a gradient in initial head. ...................................... 71 

39. Solution Method dialog boxes showing how to set up the solution method for example 1. ....... 72 

40. Time Control dialog box showing how to set up the time control for example 1. ...................... 73 

41. Main window showing the grid being colored by the Initial_Head data set. .............................. 74 

42. Creating a rectangle object in GoPhast........................................................................................ 76 

43. Object Properties dialog box. Specified head boundary condition.............................................. 78 

44. Location of the specified concentration boundary. The grid has been colored by the 

specified head solution............................................................................................................... 79 

45. Active (blue) and inactive (red) areas in example. ...................................................................... 82 

46. The top view of the model with grid cells colored to reflect the river head in example 3. 

The river objects are shown with red lines. ............................................................................... 83 

47. Polygon used to define specified flux boundary in example 3.................................................... 84 

48. Polygon used to specify the specified head boundary condition in example 3. .......................... 84 

49. Polygon used to specify the leaky boundary on the front view of the model in example 3. ....... 85 

50. Point object used to specify well boundary in example 3............................................................ 86 

51. Imported initial water table, Biscayne Bay aquifer example....................................................... 88 

52. Domain outline for Biscayne Bay aquifer model. ....................................................................... 89 

53. Grid in Biscayne Bay aquifer example. ....................................................................................... 90 

54. Active data set in the top layer of the Biscayne Bay aquifer model............................................ 91 

55. Object representing a specified head boundary (in red) in the Biscayne Bay aquifer model...... 92 

56. Distribution of Kx in the top layer of the Biscayne Bay aquifer model when the Nearest 

interpolation method is used...................................................................................................... 93 

57. Distribution of Kx in the top layer of the Biscayne Bay aquifer model when the Inv. Dist. 

Sq. interpolation method is used................................................................................................ 94 

Tables

1. Operators in GoPhast formulas...................................................................................................... 18 

2. Operator precedence rules in GoPhast formulas............................................................................ 19 

3. File Menu....................................................................................................................................... 32 

4. Edit Menu ...................................................................................................................................... 37 

5. Grid Menu...................................................................................................................................... 38 

6. Data Menu...................................................................................................................................... 41 

7. Data Sets required by PHAST ....................................................................................................... 43 

8. Object Menu .................................................................................................................................. 48 

9. View Menu .................................................................................................................................... 55 

10. Customize Menu.......................................................................................................................... 58 

11. PHAST Options Menu................................................................................................................. 59 

12. Help Menu ................................................................................................................................... 64 

vii
viii
Abstract 

1. Abstract 

1

GoPhast: A Graphical User Interface for PHAST 

By Richard B. Winston

GoPhast is a graphical user interface (GUI) for the USGS model PHAST. PHAST 

simulates multicomponent, reactive solute transport in three-dimensional, saturated, ground-water 

flow systems. PHAST can model both equilibrium and kinetic geochemical reactions. PHAST is 

derived from HST3D (flow and transport) and PHREEQC (geochemical calculations). The flow 

and transport calculations are restricted to constant fluid density and constant temperature. The 

complexity of the input required by PHAST makes manual construction of its input files tedious 

and error-prone. GoPhast streamlines the creation of the input file and helps reduce errors. 

GoPhast allows the user to define the spatial input for the PHAST flow and transport data file by 

drawing points, lines, or polygons on top, front, and side views of the model domain. These objects 

can have up to two associated formulas that define their extent perpendicular to the view plane, 

allowing the objects to be three-dimensional. Formulas are also used to specify the values of 

spatial data (data sets) both globally and for individual objects. Objects can be used to specify the 

values of data sets independent of the spatial and temporal discretization of the model. Thus, the 

grid and simulation periods for the model can be changed without respecifying spatial data 

pertaining to the hydrogeologic framework and boundary conditions. This report describes the 

operation of GoPhast and demonstrates its use with examples. GoPhast runs on Windows 2000, 

Windows XP, and Linux operating systems.

2. Introduction 

GoPhast is a graphical user interface (GUI) for the PHAST ground-water simulation model 

(Parkhurst and others, 2004). GoPhast runs on Windows 2000, Windows XP, and Linux operating 

systems. PHAST simulates multicomponent, reactive solute transport in three-dimensional, 

saturated, ground-water flow systems. PHAST can model equilibrium and kinetic geochemical 

reactions. PHAST is derived from HST3D (flow and transport) (Kipp, 1987; 1997) and PHREEQC 

(geochemical calculations) (Parkhurst, 1995; Parkhurst and Appelo, 1999). The flow and transport 

calculations in PHAST are restricted to constant fluid density and constant temperature. GoPhast is 

a tool used to transform data about an aquifer system into a data input file for PHAST. GoPhast is 

used to create the flow and transport data file required by PHAST. GoPhast does not create the 

chemistry data file required by PHAST; PHREEQCI (Charlton and Parkhurst, 2002), PHREEQC 

for Windows (http://www.geo.vu.nl/users/posv/phreeqc/index.html), or a text editor can be used to 

create that file. 
Introduction 

2

2.1 Reasons for Using Graphical User Interfaces 

Tools such as GoPhast are a bridge between the conceptual model of an aquifer system and 

the numerical model used to represent that aquifer system. Graphical User Interfaces are useful 

because of the disparity between aquifers and the models used to understand them. Models are 

typically orderly; the aquifers are not. In PHAST, for example, the aquifer system consists of a 

series of nodes arranged in a grid; the aquifer, obviously, has no such grid. In PHAST, the grid is 

an isolated spatial domain, whereas, the aquifer system is embedded in a landscape with which it 

interacts. Boundary conditions are used to approximate the outside landscape but the boundary 

conditions allow only simplified interactions with the exterior. In PHAST, aquifer properties are 

defined in block-shaped zones that often encompass several nodes in the grid. In aquifers, zones, if 

they exist at all, will almost certainly not be block-shaped unless humans have engineered them to 

be so. Thus, the block-shaped zones of PHAST are an unnatural representation of the aquifer 

system. 

Resolving disparities between the requirements of the model and the nature of the aquifer 

system is one of the ways in which a GUI can be most useful. A GUI can allow the user to specify 

the aquifer properties in ways that do not correspond directly to the requirements of the model. For 

example, instead of block-shaped zones, the aquifer properties and boundary conditions can be 

specified in ways that seem more natural such as zones with irregular boundaries. Hydrologists 

often conceive of an aquifer system as comprising a series of irregularly shaped zones with uniform 

properties within those zones. Because it is a purely mechanical process to transform the irregular 

zones as conceived by the user to the block-shaped zones required by the model, the GUI can make 

this transformation for the user. 

The actual characteristics of the aquifer are imperfectly known. Often a property of interest 

is known at only a few sampling points and these data must be used to infer a likely value of the 

property elsewhere in the aquifer system. If the user wishes to interpolate among a series of data 

points to infer aquifer properties, those data points can be entered in the GUI and the GUI can 

perform the required interpolation. If the grid is changed, the GUI can automatically detect the 

change and reinterpolate the data to the new grid. 

Another benefit of a GUI is its graphical representation of data. Models typically require 

that all or nearly all of the input be in the form of numbers. A river, for example, is represented in 

PHAST by a series of X and Y coordinates. A GUI can make those numbers more comprehensible 

by mapping them as a series of line segments on a computer screen. Graphical representation of 

the data, including the use of color, has enormous benefits. The graphical representation allows the 

user to specify and check the data much more rapidly and accurately than would otherwise be 

possible. 

A detail that can be largely hidden from the user is the time discretization. Models typically 

require that time be broken up into a series of simulation periods. In each simulation period, the 

boundary conditions may need to be respecified. In the user’s conception of the aquifer, only one 

or a few of the boundary conditions may change over time. Thus, there is no conceptual reason 

why the user must respecify the boundary conditions that have not changed. Instead, the GUI can 

hide this detail from the user. 

The GUI of an aquifer system is most effective when it represents a system in two different 

ways: (1) as the user conceives it, and (2) as the model requires it. The latter representation can be 

largely hidden from the user. With current (2006) technology, the user must still be aware of the 

model requirements because the user is responsible for creating the grid. Similarly, the model may 

provide a number of different options and the user must decide which of these options to use. The 

GUI cannot hide those choices from the user. However, there are many aspects of the model the 
Introduction 

3

user does not need to know about. GoPhast is designed to simplify the process of translating 

conceptual models to numerical definitions and as much as possible to automate the tedious and 

error-prone parts of the process. 

2.2 Purpose and Scope 

This report (1) describes the basic concepts needed to work with GoPhast, (2) documents 

the features of GoPhast, and (3) gives examples of how to use GoPhast. 

Three of the examples are based on the examples provided with PHAST. The other 

example is new. Some of the text of this report consists of quotations from or paraphrases of the 

PHAST documentation (Parkhurst and others, 2004). Information for programmers is included in 

appendix 1. 

It is anticipated that different users will use this document in different ways. Some will 

read this document from beginning to end before trying to use GoPhast. Others will use it as a 

reference volume and will read parts of it in an arbitrary order as the situation warrants while using 

GoPhast. Others will want to learn how to use GoPhast by following the instructions in the 

“Examples” section (p. 64). The separate sections of this report have been designed to be 

independent of one another to allow for all these uses; however, all users would benefit from 

reading the “Basic Concepts” section (p. 3). Extensive cross references within the text should help 

the user find desired information quickly. 

2.3 Distribution 

The software described in this report may be obtained from the U.S. Geological Survey 

(USGS) Ground-Water Software web page (http://water.usgs.gov/software/ground_water.html).

3. Basic Concepts 

To work effectively with GoPhast, several basic concepts must be mastered. This section 

provides an introduction to those concepts and tells where in this document more information about 

them may be found. 

3.1 The Grid 

PHAST uses finite-difference techniques for spatial and temporal discretization. A grid is 

required for spatial discretization; PHAST uses a point-distributed grid. The nodes in this grid are 

at the corners of elements (fig. 1). Each node is surrounded by a cell that includes parts of one to 

eight elements (fig. 1). Boundary and initial conditions are specified by node; aquifer properties 

are specified by element. 
Basic Concepts

 

Figure 1. The grid in PHAST including nodes (black dots) 

and a light gray element and a dark gray cell. Solid lines 

represent element boundaries. Dashed lines represent cell 

boundaries. 

In GoPhast, the grid can be at an angle to the global coordinate system. The coordinate 

system for the grid is aligned with the grid lines, but has the same origin as the global coordinate 

system. The coordinates of a point in the global coordinate system are referred to as X, Y, and Z; 

the coordinates of a point in the grid coordinate system are referred to as X′, Y′, and Z (X-prime, 

Y-prime, and Z). There is no Z′ because the grid is never rotated away from the horizontal plane. 

Coordinate values at the cursor location in both the global and grid coordinate system are displayed 

on the status bar of the main window of GoPhast. More information about the grid can be found in 

the PHAST documentation (Parkhurst and others, 2004). GoPhast can be used to create the grid; 

rotate it; and add, move, or remove grid lines. 

3.2 Data Sets 

Data sets are used to represent spatially distributed data in PHAST. Each data set 

represents a two-dimensional (2D) or three-dimensional (3D) array of values. 3D data sets are 

defined for the entire extent of the model domain. 2D data sets are defined for a top, front, or side 

projection of the model domain. Because PHAST requires that some data be assigned to elements 

and other data be assigned to nodes, some data sets will have a value for each element and others 

will have a value for each node. The initial water table, which is a 2D data set, is only defined for 

the top layer of nodes in the model. The remaining data sets required by PHAST are 3D. If the 

number of rows, columns, or layers in the grid changes, the sizes of the data sets are also changed.

In addition to the data sets required by PHAST, the user can create additional data sets. The 

user-defined data sets can be used in “Formulas” to define the distribution of values in the data sets

that are required by PHAST. See “Data Sets Dialog Box” on page 42 for more information on data 

sets. 

3.3 Formulas 

Formulas are used to help define the distribution of values in data sets. One simple 

example of a formula would be just the name of another data set. For example, a valid formula for 

4
Basic Concepts 

5

the Ky data set (which defines the hydraulic conductivity in the Y direction) would be “Kx.” (Kx

is the data set that defines the hydraulic conductivity in the X direction.) Setting the formula for 

Ky to “Kx” would mean that the value of Ky in a given element would be equal to the value of Kx

within that element. 

Another simple example of a formula would be to set the formula for the Kz data set (Kz

defines the hydraulic conductivity in the Z direction.) to “Kx/10.” This formula would mean that in 

a given element, the value of Kz would be equal to the value of Kx in that element divided by 10. 

These examples only hint at the power of formulas. In addition to simple arithmetic 

operations, it is possible to use mathematical functions such as “sin” and “ln.” Geographic 

Information Systems (GIS) functions, logic functions, and functions related to the grid and objects 

are also available in formulas. 

See “Formulas”, and “Formula Editor Dialog Box” on pages 17 and 44 respectively for 

more information about formulas. 

3.4 Objects 

Objects are points, polylines (a series of connected line segments), and polygons drawn in 

the main window of GoPhast or imported from external files. An object can have a formula for just 

a single surface or it can have no surfaces. An object without any additional surfaces is twodimensional because it has only two coordinate directions defined. All objects, including point 

objects, with at least one surface defined are three-dimensional because they have three coordinate 

directions defined. Each object can have an upper and lower surface making it three-dimensional. 

For example, a polygon with an upper and lower surface is a solid. The surfaces associated with an 

object need not be flat. The surfaces are defined by formulas that allow them to have virtually any 

shape. There are some limitations: none of the line segments defining an object can cross another 

line segment of the same object; objects cannot have holes in them; and an object can have, at most, 

one upper and one lower surface. 

Objects are used to modify the default values of data sets and to set boundary conditions. 

Objects can be used to set values of data sets in any of three ways: (1) values can be interpolated 

among objects; (2) values can be set for elements or cells whose centers or nodes are enclosed 

inside the object; and (3) values can be set for elements or cells intersected by the object. For the 

latter two methods, the order of the objects is important; because each object overwrites previous 

values, only the last value applied takes effect. 

See “Creating, Selecting, and Editing Objects in GoPhast” and “Object Properties Dialog 

Box” on pages 28 and 49 respectively for more information about Objects. 

3.5 Assigning Values to Data Sets 

Values are assigned to data sets at nodes or elements using the following procedure. 

1. First, a default value is assigned to every node or element by using either PHAST-style 

interpolation or mixtures (See “PHAST-Style Interpolation”, p. 16.), the selected interpolation 

method (See “Interpolation Methods”, p. 16.), or the default formula for the data set (See 

“Formulas”, p. 17 and “Data Sets Dialog Box”, p. 42.). 

2. Next, each object that affects the data set is processed, and nodes or elements that are 

intersected or enclosed by each object are assigned values on the basis of PHAST-style 

interpolation or mixtures or by using the object’s formula for the data set. 
Basic Concepts

Interpolation can be useful to specify the boundaries between geologic units (see example in 

fig. 2). To do this, the user first creates a data set for each interface between adjacent geologic 

units. Then the user creates point objects to specify the elevations of the interfaces at known 

locations. Interpolation can then be used to specify the elevations throughout the grid. These data 

sets for the elevations can then be used in the formulas for the upper and lower surfaces of “3D 

Objects” that define properties of aquifers. 

Figure 2. Example of 2D data sets used to define the top and bottom of a geologic unit. (A) Top view, 

(B) Side view, (C) Front view, (D) Three-Dimensional view. In the top view (A), point objects (black 

squares) were used to specify the top and bottom of a geologic unit by interpolation. Polygons were 

then used to define the value of the hydraulic conductivity of that unit. The colored cells represent 

the different values of hydraulic conductivity. Note the sloping surfaces of the geologic unit visible 

in the front (C) and side (B) views of the model. 

Because values for data sets are specified using formulas and objects, the data for a given 

model are independent of the spatial discretization of the model. Values of a data set are needed 

when exporting the model input or when coloring the grid with the data set. Values for data sets 

are recalculated when the data are needed and the values for the data set are out-of-date. These 

values become out-of-date when any of the following occur: 

6
Basic Concepts 

7

1. the grid changes, 

2. any of the formulas used to set values of the data set change, 

3. the interpolation method for the data set changes, 

4. any of the objects used to set the value of the data set are edited, or 

5. any of the data sets on which the data set in question depends become out-of-date. 

3.6 Boundary Conditions 

Boundary conditions are treated similarly to other “Data Sets” except that there is no global 

formula for boundary conditions; boundary conditions are specified only with objects (points, lines, 

and polygons). In addition, the user must specify starting times for each boundary condition. The 

values specified for each time apply until the model run is terminated or the values are overridden 

by values for a later time. The user does not need to define stress periods because GoPhast can 

determine the appropriate stress periods based on the times specified by the user. The user can also 

specify different starting times for different objects, making the specification of the boundary 

conditions independent of the time discretization. 

4. Initial Dialog Boxes 

When the user first starts GoPhast, the Start-Up dialog box is displayed. If the user 

chooses to create a new model in the Start-Up dialog box, the Initial Grid dialog box is displayed. 

After both these dialog boxes are closed, the main window of GoPhast is displayed (fig. 3). 

4.1 Start-Up Dialog Box 

The Start-Up dialog box is displayed when first starting GoPhast. It prompts the user 

either to start a new project or to open an existing GoPhast project. The five most recently opened 

files will be listed among the choices. If the user chooses to start a new project, the Initial Grid

dialog box will be displayed. 

4.2 Initial Grid Dialog Box 

The Initial Grid dialog box is used to specify the grid for a new GoPhast project either 

when first starting GoPhast or by selecting File|New. In it, the user specifies the dimensions of the 

grid (the number of columns, row, and layers of nodes) and the spacing between nodes in the 

column, row, and layer directions. The user must also specify the X, Y, and Z coordinates of the 

grid origin. The grid origin is the location of the node in the first column, row, and layer. Columns 

are numbered from left to right. Rows are numbered from front to back. Layers are numbered from 

bottom to top. Thus the grid origin is the node at the left, front, bottom corner of the grid. The grid 

angle must also be specified. The angle is measured in degrees counterclockwise from the X-axis. 

The vertical exaggeration must also be specified. 

Clicking the Finish button will create a grid with the dimensions and location specified. If 

the Do not create initial grid button is clicked instead, a new project will be created without a 

grid.
Main Window

5. Main Window 

8

The main window of GoPhast has several parts as listed below and shown in figure 3. 

• the Main Menu and Buttons 

• the Top, Front, and Side Views of the model, 

• the 3D View of the model, and 

• the Status Bar. 

The menu and buttons are described in “Main Menu and Buttons” on p. 31. The other parts 

are described below. 

Main

Menu 

Buttons 

Side

View 

Top

View 

Front

View 

3D

View 

Status 

Bar 

Figure 3. The main window of GoPhast.

5.1 Top, Front, and Side Views 

The main GoPhast window includes four panes. Three of these panes contain the top, front, 

and side views of the model. The other pane is a 3D view of the model. Each pane can be resized 

by clicking on the space between the panes, moving the mouse while holding the mouse button 

down, and releasing the mouse button at the new position. 

The top, front, and side views of the model are each composed of several parts (fig. 4): 

• the Selection Cube, 

• the two Rulers, and 

• the Working Area. 
Main Window

Selection Cube Ruler 

Working

Area Ruler 

Figure 4. The parts of the top, front, or side views of the model. 

5.1.1 The Selection Cube 

The Selection Cube (fig. 5) shows the selected column row or layer. It can also be used to 

change the selected column row or layer. 

Figure 5. The top, front, and side Selection Cubes. 

• To change the selected column, row, or layer with the Selection Cube, click on the Selection 

Cube. The selected column, row, or layer will move by one node or element toward the position 

that was clicked. 

• If the Shift key on the keyboard is held down when the mouse button is clicked, the selected 

column, row, or layer will move by 10 nodes or elements toward the position that was clicked. 

• If the Ctrl key on the keyboard is held down when the mouse button is clicked, the selected 

column, row, or layer will move to the position that was clicked. 

• If the left mouse button is kept held down while the cursor is on the Selection Cube, the 

selected column row or layer will start to move toward the cursor position after a wait of one 

second. It will then move rapidly toward the cursor. 

See also: “Select Column, Row, and Layer Dialog Box” on p. 41. 

5.1.2 The Ruler 

The Ruler (fig. 6) is used to show the position of the model. The format of the numbers on 

the Ruler can be changed by double clicking on a Ruler or selecting Customize|Ruler Format... 

See “Ruler Format Dialog Box” on p. 58. 

Figure 6. Ruler in GoPhast. 

9
Main Window

5.1.3 The Working Area 

The Working Area is used to display and edit the model. All objects are created and edited 

in the Working Area. It is also possible to edit the grid in the Working Area. The Zoom , 

Zoom In , Zoom Out , and Pan buttons allow the user to navigate in the Working Area. 

See the “Grid” (p. 38), “Object” (p. 48), and “View” (p. 55) menu items under “Main Menu and 

Buttons” for more details. 

5.2 Three-Dimensional View 

The 3D view of the model (fig. 7) allows the user to view (but not edit) the model. A 

number of items in the View menu (p. 55) change the appearance of the 3D view. The following 

mouse actions can be used to navigate in the 3D view. 

• To rotate the 3D view, click in the 3D view and drag with the mouse. 

• To pan the 3D view, hold down the shift key while dragging with the mouse. 

• To change the magnification of the 3D view, hold down the right mouse key and click in the 3D 

view. Then, while holding the right mouse key down, move the mouse up or down. 

Figure 7. A 3D view of a model in GoPhast. 

5.3 Hints and the Status Bar 

When the mouse is held briefly over a menu item or button in the main GoPhast window, a 

hint will appear on the status bar briefly describing the function of the menu item or button. In 

addition, with buttons, a shorter version of the “hint” will appear in a small window above the 

button. The hint will remain visible for a short time and then disappear. 

Hints that are related to the Working Area are also displayed on the status bar. When the 

cursor is moved over the Working Area, the coordinates of the cursor are displayed on the left 

panel of the status bar. When the cursor is over the grid, the column, row, and/or layer number is 

displayed on the middle panel of the status bar. When the grid is colored, the value of the data set 

used to color the grid in the current node or element is displayed on the right hand panel of the 

status bar along with a description of how the value was assigned. 

To resize the individual panels on the status bar, click on the dividers between the panels 

and drag with the mouse. 

See also “Hint Display Time Dialog Box” on p. 58

10
Generating Grids 

6. Generating Grids 

11

There are four ways to generate a grid. 

1. When a new model is first created, a uniform grid can be specified. 

2. The commands Grid|Specify Grid Angle... and Grid|Specify Grid Lines... can be used to 

specify the grid numerically. 

3. A grid can be drawn and rotated with the mouse. 

4. The user can use objects to define where the grid should be and then use the Grid|Generate 

Grid... command to create it. 

These four options are explained in greater detail in the following sections. 

6.1 Specifying a Uniform Initial Grid 

When the user chooses to create a new model, the “Initial Grid Dialog Box” gives the user 

the opportunity to specify a uniform grid (see p. 7). 

6.2 Specifying a Grid with Numbers 

If precise control over the position of the grid is desired, the menu items Grid|Specify Grid 

Angle... and Grid|Specify Grid Lines... can be used to locate the grid at an exact position. 

Normally, it is best to specify the grid angle first. When the grid angle is changed, the grid is 

rotated relative to its own center. The positions of the grid lines are measured relative to the origin 

of the coordinate system so when the grid is rotated, those positions change, as illustrated in the 

front and side views of the model in figure 8. The objects are not rotated when the grid is rotated 

(fig. 8). See “Grid Angle Dialog Box” on p. 39 and “Grid Spacing Dialog Box” on p. 40 for more 

information. 
Generating Grids

A B 

Figure 8. Unrotated (A) and rotated (B) grid with unmoved objects. 

6.3 Drawing the Grid 

If the user selects Grid|Add Vertical Grid Line or Grid|Add Horizontal Grid 

Line and then clicks on the top, front, or side view of the model, a horizontal or vertical grid 

line will be drawn at the mouse position. By doing this repeatedly, a complete grid can be drawn. 

The grid can be rotated around its center by selecting Grid|Drag to Rotate and then dragging 

with the mouse on the top view of the model. Other menu items that are useful in drawing the grid 

include Grid|Delete Grid Line , Grid|Move Grid Line , Grid|Subdivide Grid Elements

, Grid|Set Width , and Grid|Smooth Grid... 

See “Editing the Grid” on p. 38 for more information on these menu items. 

6.4 Using Objects to Specify the Grid 

Objects can be used to set the size of elements in a grid. Multiple objects can be used in 

determining the grid location and node spacings. An object drawn on the top view of the model 

specifies the column and row width. Polygons drawn on the top view of the model specify the grid 

location in addition to specifying the grid element size. The grid will be drawn to completely 

enclose the polygon or polygons. An object drawn on the front or side view of the model 

specifies the layer height and the vertical extent of the grid. For an object to be used to specify the 

grid, the Use to set grid element size checkbox in the “Object Properties Dialog Box” (p. 49) must 

be checked. When it is checked, the user can enter the desired size in the Grid element size edit 

box. 

In PHAST it can be useful to have an area with a refined grid where results need to be more 

accurate. To support this, GoPhast allows the user to specify overlapping objects that specify 

different element sizes. The final sizes of the elements will be determined by the smallest element 

12
Generating Grids

size specified for a region. In some models (but not PHAST) it is important that the contrast in 

element size in adjacent elements not be too large. When the user creates a grid using objects, the 

Grid smoothing criterion in the “Generate Grid Dialog Box” (p. 40) allows the user to specify the 

maximum ratio of lengths between nodes for adjacent rows, columns, or layers that will be 

accepted. The default value is 1.2, which is well below the usual limit of 1.5. 

Figures 9 to 14 illustrate examples of creating grids by using objects. 

1. The user draws two objects to define the grid location and the size of the elements: a polygon 

on the top view of the model and a line on the front view of the model (fig. 9). (To create 

objects, see “Creating, Selecting, and Editing Objects in GoPhast” on p. 28 and the Object

menu item on p. 48.) In this example, the size of the elements are set in the Object Properties

dialog box (p. 49) to 500 meters in the horizontal direction (top view, fig. 9) and 10 m in the 

vertical direction (front view, fig. 9).

Figure 9. The objects used to define the position of the grid. 

2. The user selects Grid|Generate Grid... and the Generate Grid dialog box appears (fig. 10). 

When the user clicks on the OK button, the grid is created (fig. 11). 

Figure 10. The Generate Grid dialog box. 

13
Generating Grids

Figure 11. Grid and objects. 

3. It may be desirable to have a finer grid in some regions than others. To do this, additional 

objects can be use to specify a zone where a fine grid will be used (fig. 12). In this example, 

the object specifies an element size of 200 m in the Grid element size edit box of the Object

Properties dialog box. 

4. After choosing Grid|Generate Grid... again, a new grid is created with a smaller element size 

in the area enclosed by the object (fig. 12). 

Figure 12. Grid with region with smaller elements specified by polygon object. 

14
Generating Grids

5. In some cases, it may be desirable to have a gradual transition in element size. A size transition 

can be achieved by checking the Smooth grid checkbox in the Generate Grid dialog box 

(fig. 13). When it is checked, the widths of the columns, row, or layers will be adjusted so that 

the maximum ratio of the widths of adjacent cells is less than or equal to the grid smoothing 

criterion. An example of such a grid is shown in figure 14. See “Editing the Grid” on p. 38 for 

more information on grid smoothing. 

Figure 13. Generate Grid dialog box with grid smoothing activated. 

Figure 14. Grid generated with grid smoothing.

15
Interpolation Methods

7. Interpolation Methods 

16

The interpolation method is used to determine how values should be interpolated among a 

group of objects. Interpolation can only be used for 2D data sets. Only one of the PHAST data 

sets, Initial_Water_Table, is a 2D data set; however, the user can define his or her own 2D data 

sets and use interpolation in them. One appropriate use of such 2D data sets would be to define the 

tops and bottoms of geologic units. Three interpolation algorithms are available in GoPhast: 

Nearest, Nearest Point, and Inv. Dist. Sq. (Inverse Distance Squared). 

The Nearest interpolation method (fig. 15A) works by determining the object that is closest 

to the location where the data set in question is being evaluated. Then the formula of that object is 

evaluated at that location.

The Nearest Point interpolation method (fig. 15B) is similar to the Nearest interpolation 

method except that only the vertices of objects are considered, rather than the lines connecting the 

vertices. If only point objects are being used, the results are identical. The Nearest Point 

interpolation method uses an algorithm that is faster than the Nearest interpolation method when 

the number of points is greater than several hundred. 

With the Inv. Dist. Sq. interpolation method (fig. 15C), the formula for each object is 

evaluated at the location under consideration. The final value is a weighted average of these 

values. The weights are the inverse of the distance from the location to the closest point on each 

respective object. The Inv. Dist. Sq. interpolation method may only be used with data sets 

containing real numbers. 

 A B C 

Figure 15. Interpolation methods. A. Nearest interpolation method. B. Nearest Point

interpolation method. C. Inv. Dist. Sq. interpolation method. 

8. PHAST-Style Interpolation 

PHAST has a built in interpolation method using the grid coordinate system that can be

applied to some CHEMISTRY_IC, FLUX_BC, HEAD_IC, LEAKY_BC, MEDIA, and 

SPECIFIED_HEAD_BC properties (Parkhurst and others, 2004). In PHAST-style interpolation, 

the user specifies a coordinate direction (X, Y, or Z), two distances, and two values. (The 

coordinate direction is relative to grid so if the grid is at an angle these are actually the X', Y' and Z 

directions.) If the X', Y', or Z coordinate of the current node is less than or equal to the first 

distance, the first value (Value 1) is used. If the X', Y', or Z coordinate of the current node is greater 
PHAST-Style Interpolation 

17

than or equal to the second distance, the second value (Value 2) is used. For intermediate distances, 

linear interpolation between the two values is used. 

A related capability in PHAST is the ability to specify mixtures between two chemical 

compositions. In PHAST-style mixtures, the user specifies two values that represent chemical 

compositions and a series of proportions (between 0 and 1). The proportion represents the fraction 

of Value 1 in the mixture. 

The following controls are used to specify the values needed for PHAST-style interpolation. 

• Interp. dir. or mixture: Interp. dir. or mixture indicates the direction in which the 

interpolation will take place. For some data sets, the user can specify Mix. If Mix is specified, 

the mixture formula is used to specify the fraction of Value 1 in the mixture. 

• Distance 1 and Distance 2: Distance 1 is the lower end of the distances used for interpolation. 

Distance 2 is the upper end of the distances used for interpolation. If the position of a cell or 

element is between Distance 1 and Distance 2, the value applied to a cell will be interpolated 

between Value 1 and Value 2. Otherwise, either Value 1 or Value 2 will be applied depending 

on which end of the range of distances is closest to the position of the cell or element. 

• Value 1 and Value 2: Value 1 and Value 2 are the two values that will be used for 

interpolation. 

• Mixture formula: Mixture formula is the fraction of Value 1 to use in the mixture of Value 1

and Value 2. The Mixture formula should range between 0 and 1. If the Mixture formula is 

outside the range of 0 to 1, a value of either 0 or 1 will be used depending on which is closest to 

the value of the mixture formula. 

PHAST-style interpolation in GoPhast can only be applied to data sets in PHAST that allow 

PHAST-style interpolation. This includes all the data sets directly used in the PHAST transport 

data file except Active, Print_Chemistry, and Print_XYZ_Chemistry. PHAST-style 

interpolation cannot be used with data sets created by the user. However, the user could specify a 

formula that would have the same effect as PHAST-style interpolation. Either of the following will 

emulate PHAST-style interpolation when applied to a real-number data set: 

• If((X_Prime < 1000.), 25., If((X_Prime > 10000.), 50., ((((X_Prime - 1000.) / 9000.) * 25.) + 

25.))) 

• MultiInterpolate(X_Prime, 25, 1000, 50, 10000) 

In these formulas, the interpolation direction is X', the two distances are 1,000 and 10,000, 

and the two values are 25 and 50. 

Data sets that store integers and whose values are set by PHAST-style interpolation or 

mixtures should not be used in formulas for other data sets because the value used in the formula 

will be rounded to the nearest integer rather than representing a mixture between the two end 

member compositions. The formulas used in GoPhast are strictly mathematical and are unable to 

interpret those numbers as chemical compositions. 

9. Formulas 

Formulas are used to assign values to nodes or elements and help to define the geometry of 

3D objects. The simplest formula is simply a numerical value such as "100." or "1.” In a new 

model, if the user selects Data|Edit Data Sets..., the Data Sets dialog box (p. 41) will appear and it 
Formulas 

18

can be seen that the default formulas for Kx and Kz respectively are "100." and "1." This means 

that, in the absence of any other method (see “Assigning Values to Data Sets” on p. 5) for assigning 

a value to an element, Kx and Kz for all elements will be 100 and 1, respectively. By using a 

slightly more complicated formula, it is possible to see the power of formulas. Here is an example: 

• Click on the cell in the table for the default formula for Kz. A button will appear in that cell. 

Ignore the button. 

• Click in the cell again. The button will disappear and it will be possible to type a formula. 

• Type "Kx/100" (without the quotation marks). 

In the absence of any other method for assigning a value of Kz to an element, Kz for all 

elements will be equal to the value of Kx for that element divided by 100. Now by specifying the 

spatial distribution of Kx, the spatial distribution of Kz is also specified. 

If the user selects the cell for the default formula for Kz again and clicks the button labeled 

F() that appears in the cell, the Formula Editor will appear. The Formula Editor can help set up 

complex formulas correctly. See the “Formula Editor Dialog Box” on p. 44 for more information. 

When a Formula is applied to a data set or boundary condition in the Data Sets tab of the 

Object Properties dialog box, the formula will only be used for those nodes or elements that the 

object affects. (See “Objects” on p. 5.) 

Formulas are, in essence, mathematical expressions that can be evaluated to produce realnumbers, integers, Booleans, or text. A formula can include constants and any of the operators or 

functions described in the following two sections. Text constant must be enclosed in double 

quotes. Boolean constants must be either True or False. Numeric constants that do not have a 

decimal point and that are not expressed in engineering notation (such as 1E0) are considered 

integers. Other numeric constants are real numbers. Integers are 32-bit values. Real numbers are 

double-precision values. Spaces, tabs, and line breaks in formulas are considered white space and 

are otherwise ignored. Loop constructs such as “while”, “for”, and “do” are not supported. 

9.1 Operators 

The operators in table 1 can be used in formulas. 

Table 1. Operators in GoPhast ormulas 

Operator Meaning Data Types Result type

= equals real numbers, integers, Booleans, text Boolean

<> not equals real numbers, integers, Booleans, text Boolean

> greater than real numbers, integers, Booleans, text Boolean

< less than real numbers, integers, Booleans, text Boolean

>= greater than or equals real numbers, integers, Booleans, text Boolean

<= less than or equals real numbers, integers, Booleans, text Boolean

and and Booleans Boolean

or or Booleans Boolean

xor exclusive or Booleans Boolean

not not Booleans Boolean

mod modulus (remainder) integers integer

div integer division integers integer

* multiplication real numbers, integers real number, integer

/ division real numbers, integers real number, integer

+ addition or concatenation real numbers, integers, text real number, integer, text

- subtraction real numbers, integers real number, integer
Formulas 

19

The operator precedence rules are shown in table 2. Operators that are part of the same 

group have equal precedence. Operators of equal precedence are evaluated in order from left to 

right. 

Table 2. Operator precedence rules 

in GoPhast formulas 

Operators Precedence

() first (highest)

not second

and, mod, div, *, / third

or, xor, +, - fourth 

=, <>, >, <, >=, <= fifth (lowest)

9.2 Functions 

Functions that can be used in formulas are grouped into the following categories. 

• GIS 

• Grid 

• Logical 

• Math 

• Object 

• Text 

• Trig 

In each function, optional arguments are listed inside curly braces {}. If a function has 

more than one argument, the arguments must be separated by a single comma and/or one or more 

spaces or tab characters.

9.2.1 GIS 

The GIS functions return values related to location. 

X returns the X coordinate of a node or the element center in global coordinates (fig. 16). 

(See “The Grid” on p. 3.) 

X_Prime returns the X coordinate of a node or the element center in grid coordinates 

(fig. 16). (See “The Grid” on p. 3.) 

Y returns the Y coordinate of a node or the element center in global coordinates (fig. 16). 

(See “The Grid” on p. 3.) 

Y_Prime returns the Y coordinate of a node or the element center in grid coordinates 

(fig. 16). (See “The Grid” on p. 3.) 

Z returns the Z coordinate of a node or the element center in global coordinates. (Because 

this is also the Z coordinate in grid coordinates, there is no Z_Prime function) (fig. 16). (See “The 

Grid” on p. 3.) 
Formulas: GIS

20

X

Y

Z

X'

Y'

Figure 16. Global and grid coordinate systems in GoPhast.

9.2.2 Grid 

The Grid functions return values related to the grid. 

BlockAreaFront({Column, Layer}) returns the cross-sectional area of an element or cell as 

seen from the front of the grid (fig. 17). The function has two optional arguments: Column and 

Layer. If these arguments are provided, they specify the element or cell for which the area should 

be calculated. If they are not provided, the function uses the column and layer of the element or 

cell for which the formula is being calculated. If either of the arguments has an invalid value, the 

function returns zero. 

Figure 17. BlockAreaFront returns the product of a times c. 
Formulas: Grid

BlockAreaSide({Row, Layer}) is like BlockAreaFront except that the value returned is the 

cross-sectional area of an element or cell as seen from the side of the grid (fig. 18). 

Figure 18. BlockAreaSide returns the product of a times b. 

BlockAreaTop({Column, Row}) is like BlockAreaFront except that the value returned is 

the cross-sectional area of an element or cell as seen from the top of the grid (fig. 19). 

Figure 19. BlockAreaTop returns the product of b times c. 

BlockVolume({Column, Row, Layer}) returns the volume of an element or cell. The 

function has three optional arguments: Column, Row, and Layer. If these three arguments are 

provided, they specify the element or cell for which the volume should be calculated. If they are 

not provided, the function uses the column, row, and layer of the node or element for which the 

formula is being calculated. If any of the three arguments has an invalid value, the function returns

zero. 

Column returns the column number of the node or element for which the formula is being 

calculated. 

ColumnBoundaryPosition({Column}) returns the X coordinate in the grid coordinate 

system of the column boundary specified by its one optional argument Column. If the optional 

21
Formulas: Grid 

22

argument is not included, the function uses the column number of the node or element for which 

the formula is being calculated. 

ColumnCount returns the number of column boundaries in the grid, which equals the 

number of nodes in the X direction. 

ColumnWidth({Column}) returns the width of the cell or element column specified by its 

one optional argument Column. If the optional argument is not included, the function uses the 

column of the node or element for which the formula is being calculated. 

Layer returns the layer number of the node or element for which the formula is being 

calculated. 

LayerBoundaryPosition({Layer}) returns the Z coordinate in the grid coordinate system 

of the position of the layer boundary specified by its one optional argument Layer. If the optional 

argument is not included, the function uses the layer number of the node or element for which the 

formula is being calculated. 

LayerCount returns the number of layer boundaries in the grid, which equals the number of 

nodes in the Z direction. 

LayerHeight({Layer}) returns the height of the cell or element layer specified by its one 

optional argument Layer. If the optional argument is not included, the function uses the layer of 

the node or element for which the formula is being calculated. 

Row returns the row number of the node or element for which the formula is being 

calculated. 

RowBoundaryPosition({Row}) returns the Y coordinate in the grid coordinate system of 

the position of the row boundary specified by its one optional argument Row. If the optional 

argument is not included, the function uses the row number of the node or element for which the 

formula is being calculated. 

RowCount returns the number of row boundaries in the grid, which equals the number of 

nodes in the Y direction. 

RowWidth({Row}) returns the width of the cell or element row specified by its one 

optional argument Row. If the optional argument is not included, the function uses the row of the 

node or element for which the formula is being calculated.

9.2.3 Logical 

The logical functions are used to choose between two or more possible choices based on a 

criterion. 

Case(Index, Result1, Result2, ...). Case uses Index to determine which of the Result1, 

Result2... arguments will be returned as a result. If Index equals 1, Result1 is returned; if Index 

equals 2, Result2 is returned; if Index equals 3, Result3 is returned; and so forth. Only “Index”, 

constant expressions, and the result that is returned will be evaluated. The types of Result1, 

Result2... must all be the same but they can be of any type. The type that is returned will be the 

same as the type of Result1, Result2, ... 

CaseB(Index, Boolean_Result1, Boolean_Result2, ...) is like Case except that the value 

returned is always a Boolean. 

CaseI(Index, Integer_Result1, Integer_Result2, ...) is like Case except that the value 

returned is always an integer. 

CaseR(Index, Real_Result1, Real_Result2, ...) is like Case except that the value returned is 

always a real number. 
Formulas: Logical 

23

CaseT(Index, Text_Result1, Text_Result2, ...) is like Case except that the value returned is 

always text. 

If(Boolean_Value, If_True_Result, If_False_Result) If uses Boolean_Value to determine 

whether If_True_Result or If_False_Result is returned as a result. If Boolean_Value is true, 

If_True_Result returned; if Boolean_Value is false, If_False_Result is returned. Only 

“Boolean_Value”, constant expressions, and the result that is returned will be evaluated. The types 

If_True_Result and If_False_Result must be the same but they can be of any type. The type that is 

returned will be the same as the type of If_True_Result and If_False_Result. 

IfB(Boolean_Value, If_True_Boolean_Result, If_False_Boolean_Result) is like If except 

that the value returned is always a Boolean. 

IfI(Boolean_Value, If_True_Integer_Result, If_False_Integer_Result) is like If except that 

the value returned is always an integer. 

IfR(Boolean_Value, If_True_Real_Result, If_False_Real_Result) is like If except that the 

value returned is always a real number. 

IfT(Boolean_Value, If_True_Text_Result, If_False_Text_Result) is like If except that the 

value returned is always text.

9.2.4 Math 

The math functions supply general mathematical capabilities beyond the simple operations 

of addition, subtraction, multiplication, and division. 

Abs(Value) returns the absolute value of Value. Value can be either an integer or a real 

number. The value returned by Abs will be the same type as Value. 

AbsI(Value) returns the absolute value of Value. Value must be an integer. The value 

returned by AbsI will be an integer. 

AbsR(Value) returns the absolute value of Value. Value can be either an integer or a real 

number. The value returned by AbsR will be a real number. 

Distance(X1, Y1, X2, Y2) calculates the distance between points (X1, Y1) and (X2, Y2). 

FactorialI(Value_Less_than_13) returns the factorial of Value_Less_than_13 as an integer. 

FactorialR(Value_Less_than_171) returns the factorial of Value_Less_than_171 as a real 

number. 

Frac(Value) returns the fractional part of Value. Value is a real number. 

Interpolate(Position, Value1, Distance1, Value2, Distance2). Interpolate returns (PositionDistance1)/(Distance2-Distance1)*(Value2-Value1)+Value1. As its name implies, this is an 

interpolation between Value1 and Value2 based on where Position is between Distance1 and 

Distance2. If Position is not between Distance1 and Distance2, Interpolate extrapolates a value. 

See also MultiInterpolate. 

IntPower(Base, Exponent) returns Base raised to the Exponent power. Base is a real 

number or integer. Exponent is an integer. IntPower returns a real number. See also Power. 

ln(Value) returns the natural log of Value. 

log10(Value) returns the log to the base 10 of Value. 

logN(Base, Value) returns the log to the base N of Value. 

Max(Value1, Value2, ...) returns whichever of its arguments is the largest. Its arguments 

must be either integers or real numbers. The result will be a real number if any of the arguments is 

a real number. If all the arguments are integers, the result will be an integer. 
Formulas: Math 

24

MaxI(Integer_Value1, Integer_Value2, ...) returns whichever of its arguments is the 

largest. Its arguments must be integers. The result will be an integer. 

MaxR(Real_Value1, Real_Value2, ...) returns whichever of its arguments is the largest. Its 

arguments must be either integers or real numbers. The result will be a real number. 

Min(Value1, Value2, ...) returns whichever of its arguments is the smallest. Its arguments 

must be either integers or real numbers. The result will be a real number if any of the arguments is 

a real number. If all the arguments are integers, the result will be an integer. 

MinI(Integer_Value1, Integer_Value2, ...) returns whichever of its arguments is the 

smallest. Its arguments must be integers. The result will be an integer. 

MinR(Real_Value1, Real_Value2, ...) returns whichever of its arguments is the smallest. 

Its arguments must be either integers or real numbers. The result will be a real number. 

MultiInterpolate(Position, Value1, Distance1, [Value2, Distance2,] ...). If Position is less 

than or equal to Distance1, MultiInterpolate returns Value1. If Position is greater than or equal to 

DistanceN, MultiInterpolate returns ValueN. If Position is between any two adjacent distances, 

linear interpolation between the associated values will be used to determine the value that will be 

returned. Each distance after Distance1 must be greater than its predecessor. See also Interpolate. 

Odd(Value) returns True if Value is an odd number. Otherwise it returns False. Value must 

be an integer. 

Pi returns the ratio of the circumference of a circle to its diameter. 

Power(Base, Exponent) returns Base raised to the Exponent power. Base and Exponent are 

real numbers or integers. Power returns a real number. See also IntPower. 

Round(Value) converts Value to the nearest integer. In the case of a number that is exactly 

halfway between two integers, it converts it to whichever one is even. See also Trunc. 

Sqr(Value) returns Value squared. Value can be either an integer or a real number. The 

result of Sqr will be an integer if Value is an integer. Otherwise it will be a real number. 

SqrI(Integer_Value) returns Integer_Value squared. Integer_Value must be an integer. The 

result of SqrI will be an integer. 

SqrR(Real_Value) returns Real_Value squared. Real_Value can be either an integer or a 

real number. The result of SqrR will be a real number. 

Sqrt(Value) returns the square root of Value. 

Trunc(Value) truncates Value to an integer by rounding it towards zero. See also Round.

9.2.5 Object 

The object functions return values that are related to the properties of objects. (See 

“Objects” on p. 5 and “Creating, Selecting, and Editing Objects in GoPhast” on p. 28 for more 

information.) 

FractionOfObjectLength is intended for use with objects that are lines rather than points 

or polygons. If the object being evaluated does not intersect the cell or element being evaluated, 

FractionOfObjectLength returns zero. If the object being evaluated intersects the cell or element 

being evaluated, FractionOfObjectLength returns zero if the first vertex of the object is in the 

element or cell, and returns one if the last vertex of the object is in the element or cell. It returns a 

fraction between zero and one for all other elements or cells. The value that is returned represents 

the fraction of an object’s length between the start of the object and the midpoint of an object’s 

intersection with a cell or element (fig. 20). If an object intersects a cell or element more than once, 
Formulas: Object

25

the value that will be applied is the result of the last intersection between the object and the cell or 

element. 

Figure 20. FractionOfObjectLength returns 0.30. 

ObjectArea returns the two-dimensional area of an object. (It does not take into account 

the areas of any other objects that might be inside it.) 

ObjectCurrentVertexX is intended for use with points and polyline objects. If the object 

being evaluated does not intersect the cell or element being evaluated, ObjectCurrentVertexX 

returns zero. If one of the vertices of an object is in the element or cell, ObjectCurrentVertexX 

returns the X coordinate of that vertex. Otherwise, ObjectCurrentVertexX returns the X coordinate 

of the first place where the object intersects the cell or element. For objects drawn on the side view 

of the model, ObjectCurrentVertexX returns zero.

ObjectCurrentVertexY is intended for use with points and polyline objects. If the object 

being evaluated does not intersect the cell or element being evaluated, ObjectCurrentVertexY 

returns zero. If one of the vertices of an object is in the element or cell, ObjectCurrentVertexY 

returns the Y coordinate of that vertex. Otherwise, ObjectCurrentVertexY returns the Y coordinate 

of the first place where the object intersects the cell or element. For objects drawn on the front view 

of the model, ObjectCurrentVertexY returns zero.

ObjectCurrentVertexZ is intended for use with points and polyline objects. If the object 

being evaluated does not intersect the cell or element being evaluated, ObjectCurrentVertexZ 

returns zero. If one of the vertices of an object is in the element or cell, ObjectCurrentVertexZ 

returns the Z coordinate of that vertex. Otherwise, ObjectCurrentVertexZ returns the Z coordinate 

of the first place where the object intersects the cell or element. For objects drawn on the top view 

of the model, ObjectCurrentVertexZ returns zero.

ObjectCurrentSegmentLength returns the length of the segment that intersects the cell or 

element. If the object being evaluated does not intersect the cell or element being evaluated, 

ObjectCurrentSegmentLength returns zero. If two or more segments of the same object intersect the 

cell or element, ObjectCurrentSegmentLength returns the length of the last one to intersect the cell 

or element. 

ObjectIntersectArea({Column, Row, Layer}) returns the two-dimensional area of 

intersection between a cell or element and an object. The function has three optional arguments: 

Column, Row, and Layer. If these arguments are provided, they specify the cell or element for 

which the area should be calculated. If they are not provided, the function uses the column, row, 

and layer of the node or element for which the formula is being calculated. If any of the arguments 

has an invalid value, the function returns zero. If the object being evaluated intersects the cell or 

element being evaluated more than once, ObjectIntersectArea returns the sum of all the individual 

areas of intersection. 
Formulas: Object

ObjectIntersectLength({Column, Row, Layer}) returns the length of intersection between 

a cell or element and a 2D projection of the object. The function has three optional arguments: 

Column, Row, and Layer. If these arguments are provided, they specify the cell for which the 

length should be calculated. If they are not provided, the function uses the column, row, and layer 

of the node or element for which the formula is being calculated. If any of the arguments has an 

invalid value, the function returns zero. If the object being evaluated intersects the cell or element 

being evaluated more than once, ObjectIntersectLength returns the sum of all the individual lengths 

of intersection. 

ObjectLength returns the length of an object in the 2D projection in which it is created and 

edited. Formulas for the third dimension of an object are not taken into consideration when 

computing ObjectLength. 

ObjectName returns the name of the object that is currently being evaluated. ObjectName 

returns text.

ObjectVertexCount returns the number of vertices in the object. 

ObjectVertexDistance(VertexIndex) returns the distance along the length of the object 

from the beginning of the object to the vertex indicated by VertexIndex. Formulas for the third 

dimension of an object are not taken into consideration when computing ObjectVertexDistance. 

ObjectVertexX(VertexIndex) returns the X coordinate of the vertex in the object indicated 

by VertexIndex. For objects drawn on the side view, ObjectVertexX returns zero. 

ObjectVertexY(VertexIndex) returns the Y coordinate of the vertex in the object indicated 

by VertexIndex. For objects drawn on the front view, ObjectVertexY returns zero. 

ObjectVertexZ(VertexIndex) returns the Z coordinate of the vertex in the object indicated 

by VertexIndex. For objects drawn on the top view, ObjectVertexZ returns zero. 

VertexInterpolate(Value1, Value2, ...) is intended for use with objects that are polylines 

rather than points or polygons. If the object that is being evaluated does not intersect the cell or 

element that is being evaluated, VertexInterpolate returns zero. If the object that is being evaluated 

does intersect the cell or element that is being evaluated, VertexInterpolate assigns Values1 to 

ValueN to vertices 1 to N respectively, of the object where N is the smaller of the number of 

arguments in VertexInterpolate and the number of vertices in the object. If the number of vertices 

in the object is greater than the number of arguments, the value of the last argument will be 

assigned to each of the vertices in the object that would not otherwise have an associated value. If 

a vertex of the object is in an element or cell, the associated value will be assigned to the element or

cell. Otherwise, the values will be interpolated from the end points of the line segment that 

intersects the cell or element using linear interpolation based on the distance from the center point 

of the line segment within the cell or element to the adjacent vertices in the object (fig. 21). If more 

than one vertex of an object is in a cell or element or the object intersects a cell or element more 

than once, the value applied is the value for the last vertex or segment to intersect the cell or

element. VertexInterpolate returns a real number. 

1

1.6 2 2.33 2.67 3

Figure 21. VertexInterpolate(1,2,3) returns the values shown for each element.

26
Formulas: Text 

9.2.6 Text 

27

The Text functions are used for manipulating text. One way they can be used is to control 

which shapes from a Shapefile are imported. See “Import Shapefile Dialog Box” on p. 33. 

Copy(Text_Value, StartIndex, Count) returns a portion of Text_Value starting at the 

character indicated by StartIndex and extending for either Count characters or until the end of 

Text_Value is reached, whichever is smaller. 

FloatToText(Value) converts the real number Value to its text representation. 

IntToText(Value) converts the integer number Value to its text representation. 

Length(Text_Value) returns the number of characters in Text_Value. 

LowerCase(Text_Value) returns Text_Value with all its characters converted to lower 

case. See also: UpperCase. 

Pos(SubText, Text_Value) returns the position of the first instance of SubText within 

Text_Value. If SubText does not occur within Text_Value, Pos returns zero. 

PosEx(SubText, Text_Value, Offset) returns the position of the first instance of SubText 

within Text_Value that starts on or after Offset. If SubText does not occur within Text_Value, on 

or after Offset, PosEx returns zero. If Offset equals one, PosEx is equivalent to Pos. 

TextToFloat(Text_Value) converts Text_Value to a real number. If Text_Value cannot be 

converted, TextToFloat causes an error. 

TextToFloatDef(Text_Value, DefaultResult) converts Text_Value to a real number. If 

Text_Value cannot be converted, DefaultResult is returned instead. 

TextToInt(Text_Value) converts Text_Value to an integer. If Text_Value cannot be 

converted, TextToInt causes an error. 

TextToIntDef(Text_Value, DefaultResult) converts Text_Value to an integer. If 

Text_Value cannot be converted, DefaultResult is returned instead. 

Trim(Text_Value) removes spaces from the beginning and end of Text_Value. 

UpperCase(Text_Value) returns Text_Value with all its characters converted to upper 

case. See also LowerCase.

9.2.7 Trig 

The trig functions are used for trigonometric operations. All angles in the functions are 

expressed in radians unless otherwise noted. 

ArcCos(Value) returns the inverse cosine of Value. The return value is in the range from 

zero to Pi. 

ArcCosh(Value) returns the inverse hyperbolic cosine of Value. 

ArcSin(Value) returns the inverse sine of Value. The return value is in the range from -Pi/2 

to +Pi/2. 

ArcSinh(Value) returns the inverse hyperbolic sine of Value. 

ArcTan2(Y, X) returns the inverse tangent of Y/X in the correct quadrant. The return value 

is in the range from -Pi to +Pi. 

ArcTanh(Value) returns the inverse hyperbolic tangent of Value. 

Cos(Value) returns the cosine of Value. 

Cosh(Value) returns the hyperbolic cosine of Value. 
Formulas: Trig

28

DegToRad(Value) converts Value from degrees to radians. See also RadToDeg. 

RadToDeg(Value) converts Value from radians to degrees. See also DegToRad. 

Sin(Value) returns the sine of Value.

Sinh(Value) returns the hyperbolic sine of Value. 

Tan(Value) returns the tangent of Value. 

Tanh(Value) returns the hyperbolic tangent of Value.

10. Creating, Selecting, and Editing Objects in GoPhast 

There are five types of objects in GoPhast. These are: 

 Points, 

 Polylines, 

 Polygons, 

 Straight-Lines, and 

 Rectangles.

Each object consists of one or more vertices and has properties associated with it. The 

properties of an object determine how it is used to specify spatial properties of the model. Each 

object is associated with one of the three views of the model (top, front, or side). 

10.1 Creating Objects 

Objects are created by drawing them on the top, front or side Working Areas (p.10). The 

following sections describe how to create each type of object.

10.1.1 Points 

Point objects have only a single vertex. To create a point object, the user does the 

following: (1) The user either selects Object|Create Point or clicks on the Point button. (2) 

The user moves the cursor to the location on one of the views of the model where a point object is 

desired. (3) The user clicks the mouse button. A point object will be created at the cursor location. 

The Object Properties dialog box (p. 49) will appear. The Object Properties dialog box is used 

to specify the properties of the object. 

Typical uses for point objects are to define the elevations of the tops or bottoms of geologic 

units, point values for hydraulic properties that will be defined using interpolation, or well 

boundary conditions. 

10.1.2 Polylines 

Polyline objects have two or more vertices. To create a polyline object, the user does the 

following: (1) The user either selects Object|Create Line or clicks on the Polyline button. 

(2) The user moves the cursor to the location on one of the views of the model where the first 

vertex of the polyline object is desired. (3) The user clicks the left mouse button. The first vertex 
Creating, Selecting, and Editing Objects in GoPhast

of the polyline object will be created at the cursor location. (4) To create additional vertices, the 

user continues clicking on the same view of the model. (5) When all the desired vertices have been

created, the user double-clicks at the last vertex or presses the “Enter” key on the keyboard to 

complete the polyline. Pressing the escape or delete key while creating an object deletes the last 

created vertex of that object. As with points, the Object Properties dialog box (p. 49) is used to 

specify the properties of the object. 

Typical uses for polylines are to define linear features, such as rivers and boundary 

conditions at the edges of the model.

10.1.3 Polygons 

Polygon objects have four or more vertices. The last vertex is always at the same location 

as the first vertex, so a polygon with four vertices is a triangle. To create a polygon object, the user 

does the following: (1) The user either selects Object|Create Polygon or clicks on the Polygon

button. (2) The user continues adding vertices as described with Polylines. (3) When the 

polygon is complete, a final vertex will be added at the location of the first vertex to close the 

polygon. Pressing the escape or delete key while creating an object deletes the last created vertex 

of that object. As with points, the Object Properties dialog box (p. 49) is used to specify the 

properties of the object. 

Typical uses for polygons are to define zones with differing media properties. 

10.1.4 Straight-Lines 

Straight-line objects are a special case of polylines in which all the line segments in the

polyline are parallel to one of the edges of the grid. To create a Straight-line object, the user does 

the following: (1) The user either selects Object|Create Straight Line or clicks on the Straightline button. (2) The user continues adding vertices as described with Polylines. Pressing the 

escape or delete key while creating an object deletes the last created vertex of that object. As with

points, the Object Properties dialog box (p. 49) is used to specify the properties of the object. 

Typical uses of straight-line objects are the same as for polylines, that is to define linear 

features, such as rivers and boundary conditions at the edges of the model.

. 

10.1.5 Rectangles 

Rectangles are a special case of polygons that have four edges that are parallel to the grid. 

To create a rectangle, the user does the following: (1) The user either selects Object|Create 

Rectangle or clicks on the Rectangle button. (2) The user moves the cursor to the location on 

one of the views of the model where the first vertex of the rectangle object is desired. (3) The user 

clicks the mouse button again at the opposite corner of the rectangle. As with points, the Object 

Properties dialog box (p. 49) is used to specify the properties of the object. 

Typical uses of rectangle objects are the same as for polygons, that is to define zones with 

differing media properties. 

29
Creating, Selecting, and Editing Objects in GoPhast

10.2 Selecting Objects 

To edit, move, or delete an object, the object must first be selected. Selected objects can be 

distinguished from objects that are not selected, because the lines used to draw the selected objects 

are thicker and the vertices of the selected objects are shown as squares. However, point objects 

are also shown as squares even if they are not selected. Selected point objects are shown as solid

squares whereas point objects that are not selected are shown as hollow squares. In other types of

objects, the vertices are shown as solid squares when the whole object is selected. If an individual 

vertex is selected, it is shown as a hollow square. The object in figure 22A is selected; the object in 

figure 22B is not. The object in figure 22C has one of its vertices selected. 

A B C

Figure 22. Appearance of (A) selected object, (B) non-selected object, 

and (C) an object with a selected vertex. 

There are several ways to select objects. One way is to click on the Select objects

button and then click on the object. Another way is instead of clicking on an object, click and 

hold the left mouse button down somewhere on one view of the model that is not on any object and 

then drag the mouse. A rectangle will be drawn starting where the mouse was clicked down. 

When the mouse button is released, any objects that are entirely inside the rectangle will be 

selected. Another option is to click on the Lasso button . Then the user clicks down on one 

view of the model and moves the mouse. A line will follow the mouse. When the user releases the 

mouse, any objects that are entirely inside the line will be selected. 

Usually, selecting one object causes any object that was previously selected to become nonselected; however, if the Shift key is held down while selecting an object, then the objects that 

would normally be selected are toggled between selected and non-selected and other objects remain 

selected. 

The Ctrl key also modifies how selection occurs when the Select objects button is down 

but not when the Lasso button is down. The user can use the Ctrl key to select objects beneath 

another object. If several objects are on top of one another, the user can click on the objects with 

the Ctrl key down and if none of the objects is selected, the uppermost one will be selected. If the 

user clicks again with the Ctrl key down, the top object will be deselected and the next one down 

will be selected. If the user clicks again with the Ctrl key down, the object below that will be 

selected. The Shift and Ctrl key can be combined. 

Individual vertices of an object can be selected as well as whole objects. To select 

individual vertices, the user first selects an object and then clicks on the Select vertices button . 

Next, the user clicks on the desired vertex to select it. To select additional vertices, the user clicks

on them while holding down the Shift key. Vertices can only be selected on objects that are 

selected. The user can also click down away from any vertices of a selected object, drag the 

mouse, and then release it to select vertices that are inside the rectangle defined by the locations 

30
Creating, Selecting, and Editing Objects in GoPhast

where the user clicked down with the mouse button and where the user released it. All the vertices 

outside the rectangle will become non-selected (unless the Shift key is down). If the user holds 

down the Shift key while clicking on a vertex, the vertex will be toggled from selected to nonselected or the reverse. 

A number of dialog boxes also allow the user to select objects. See “Search for Objects 

Dialog Box” on p. 53, “Show or Hide Objects Dialog Box” on p. 53, “Select Objects by Name 

Dialog Box” on p. 54, and “Go To Dialog Box” on p. 56. 

10.3 Editing Objects 

There are a number of ways to edit objects. Objects can be deleted or moved. Individual 

vertices in objects can be inserted, moved, or deleted. Edges of objects can be deleted. The order 

of the objects can be changed. Finally, the properties of objects can be changed. 

To delete an object, select it and press the delete key on the keyboard. To delete individual 

vertices, select the vertices and press the delete key. To delete an edge of an object, click on the 

Delete segment button . Then click on an edge of an object to delete that edge. If deleting an 

edge will split the object into two separate pieces, one of the pieces will be a new object with the 

same properties as the original object except for its name. 

One way to move objects or vertices is to select them, hold down the mouse button with the 

mouse curser on or inside the object, and move the mouse before releasing the mouse button. 

Another way to move an object or individual vertices is to double click on the object. Then on the 

tab labeled Vertices in the Object Properties dialog box, type in new values for the coordinates of 

the vertices. 

To insert a vertex, first click on the Insert vertex button . Then click on the edge of an 

object to insert a vertex at the position where the mouse was clicked. If any object is selected, this 

procedure will only insert a vertex in the selected object. If no object is selected, this procedure 

will insert a vertex into whichever object on which the user clicks. 

To change the order of objects, select one or more objects and right-click on them. Select 

one of the options in the pop-up menu to change the order of the objects. It is also possible to 

select Object|Rearrange Objects... The Rearrange Objects dialog box (p. 49) will appear. In it, 

the user can drag objects to new positions. 

To edit the properties of one or more objects, select them and then double-click on one of 

them. The Object Properties dialog box (p. 49) will appear, and the properties can be edited. The 

user can also display the Object Properties dialog box to edit the properties of a single object by 

displaying the Show or Hide Objects dialog box (p. 53) and double-clicking on the name of the 

object.

11. Main Menu and Buttons 

The options in the following sections are provided in the GoPhast main menu. Each 

section starts with a table listing that briefly explains the menu items in the section. The buttons 

can be used to provide quick access to some of the menu items. In such cases, the picture on the 

button is shown next to the menu item both in the table and in the program. 

All of the menu items in GoPhast have menu accelerators associated with them. Menu 

accelerators allow the user to navigate the menu without using the mouse. An underlined letter in 

the name of a menu item indicates the menu accelerator for that menu item. Some menu items also 

31
Main Menu and Buttons 

32

have shortcuts. A shortcut is indicated by a key sequence following the menu item. Shortcuts call 

a particular menu item directly without displaying the menu. For example, the Edit|Undo menu 

item has a menu accelerator of U (because the U in Undo is underlined) and a shortcut of Ctrl+Z 

(because “Ctrl+Z” follows Undo in the menu). A menu item can be activated by holding down the 

Alt key and pressing the key on the keyboard corresponding to the menu accelerator. Menu items 

beneath the main menu can then be selected by typing the keys on the keyboard corresponding to 

their menu accelerators or using the arrow keys. For example, to use the menu accelerator for 

Edit|Undo, the user would hold down the Alt key while pressing to E key to activate the Edit main 

menu item and then would press the U key to activate Undo. To use the shortcut for Edit|Undo, 

the user would hold down the Ctrl key while pressing the Z key. This would call the Undo menu 

item but unlike an accelerator, the menu would never be displayed. 

For menu items or accelerators to work, the GoPhast window must have the input focus. 

On Linux, the method whereby a particular window can gain the focus can be set by the user. 

Some of these methods may be unfamiliar to users of other operating systems. For instance, a 

window may gain the focus when the mouse pointer is passed over it. In the KDE window 

manager on Linux, the method for setting the input focus can be changed by selecting 

System|Desktop Settings Wizard. In the Gnome window manager on Linux, the method for 

setting the input focus can be changed by selecting Programs|Settings|Sawfish window 

manager|Focus behavior. Clicking on a window with the mouse will generally give that window 

the focus on either Windows or Linux.

11.1 File 

The menu items under File are listed in table 3. Many of the choices under File|Import

refer to features of data sets and objects that are described under “Data Sets Dialog Box” (p. 42) 

and “Object Properties Dialog Box” (p. 49). 

Table 3. File Menu 

Menu Item Explanation 

New Creates a new model. 

Open Opens an existing model.

Save Saves the current model to disk using the current file name.

Save As Saves the current model to disk using a new file name.

Import|Shapefile... Import shapes from a Shapefile into GoPhast. See “Import Shapefile

Dialog Box” on p. 33.

Import|DXF File... Import a DXF file. See “Import DXF File Dialog Box” on p. 34.

Import|Points... Import point data into GoPhast. See “Import Points Dialog Box” on p. 35. 

Import|Distributed Data by Zone... Import a PHAST zone into GoPhast. See “Import Distributed Data by 

Zone Dialog Box” on p. 35.

Import|Bitmap... Import a background image into GoPhast. See “Import/Edit Bitmap Dialog 

Box” on p. 35.

Export PHAST Input File Creates the transport data file for PHAST.

<filename> The names of the four most recently opened files are displayed. Selecting

one of them will open that file. 

Exit Closes GoPhast.
Main Menu and Buttons: File 

33

11.1.1 Import Shapefile Dialog Box 

The Import Shapefile dialog box is used to import Shapefiles into GoPhast. To display the 

Import Shapefile dialog box, select File|Import|Shapefile... 

The Shapefile format (Environmental Systems Research Institute, Inc, 1998) is a commonly 

used file format in Geographic Information Systems. The Shapefile is imported as a series of 

objects on the top view of the model. These objects will set the values of data sets as specified by 

the user. The names of the imported objects are based on the name of the file from which the 

objects are imported. The “Select Objects by Name Dialog Box” (p. 54) can be used to select all 

these objects at a later time. 

After selecting the Shapefile to import, the attributes of the shapes are displayed in the 

Import Shapefile dialog box. The user chooses which attributes to import by checking the 

checkbox next to the name of the attribute. The user can then decide whether to create a new data 

set for each attribute that is imported or to assign values to existing, compatible data sets. Only 

data sets with an orientation of "2D Top" can be used for the imported shapes. If a new data set 

will be used, the user can choose an interpolation method for the new data set. (See “Interpolation 

Methods” on p. 16.) The user also decides whether to evaluate the objects at element or nodes and 

whether to set the values of enclosed elements or nodes, intersected elements or nodes, or to set 

values or elements or nodes by interpolation. 

Some Shapefiles store the coordinates of points as latitudes and longitudes. On the 

Coordinate Conversion tab, the user can choose to convert those coordinates to Universal 

Transverse Mercator (UTM) coordinates. If all the points in the Shapefile belong in the same UTM 

zone, that zone will be picked automatically. Otherwise, the user must specify the appropriate zone 

number in an edit box. The user also must specify the ellipsoid used as a basis for the conversion. 

Normally, the default ellipsoid is appropriate. More information about coordinate conversions and 

map projections can be found in Snyder (1987). 

Shapes in Shapefiles can contain holes inside polygons. GoPhast does not have a method of 

representing holes so such shapes are skipped when importing into GoPhast. 

In some cases, the user may not wish to import all the shapes in a Shapefile. The Import 

criterion can be used to determine which shapes are imported. The user can enter a formula which 

will be evaluated for each shape. Only those shapes for which the formula evaluates to True will 

be imported. The user can click the Edit F()... button to edit the formula for the import criterion 

using the Formula Editor (p. 44). The following example shows how coordinate conversions and 

the Import criterion can be used to advantage. 

In this example, only the shapes from Oklahoma will be imported from a Shapefile 

containing shapes for rivers throughout the United States. Oklahoma was selected for this example 

because example 4 from the PHAST documentation is set in Oklahoma. 

1. The National Atlas of the United States (http://nationalatlas.gov/atlasftp.html#hydrogm) has a 

Shapefile that represents the major streams and water bodies in the United States. Download 

the Shapefile version of that data (hydrogm020.tar.gz) and extract its contents. 

2. In GoPhast, select File|Import|Shapefile... and then select hydrogl020.shp which was 

extracted from hydrogm020.tar.gz. 

3. After the Shape geometry file has been read, the Import Shapefile dialog box will be 

displayed. Go to the Coordinate Conversion tab and check the checkbox labeled Convert 

coordinates from decimal degrees to UTM. Change the UTM zone number to 14. This is 

the appropriate UTM zone for Oklahoma.
Main Menu and Buttons: File

4. Go to the Data tab and change the Import criterion to 

Pos("OK", UpperCase(STATE)) > 0.

STATE is one of the attributes of the Shapefile. It holds abbreviations for the state or states in 

which each water body is present. This formula evaluates to true if the water body is in the 

state of Oklahoma (abbreviation = “OK”). Select any of the attributes you wish to import in the 

dialog box at the top of the Data tab and click the OK button. For an explanation of the 

attributes in the Shapefile, see the file hydrogm020.txt that came with the Shapefile. 

5. After the shapes have been imported, select View|Go To... and select the first imported shape. 

Then zoom out to see all the imported water bodies. Only shapes that are at least partially in 

Oklahoma will have been imported, and their coordinates will have been converted to UTM 

coordinates (fig. 23).

Figure 23. Imported Oklahoma water bodies. 

11.1.2 Import DXF File Dialog Box 

The Drawing Exchange Format (DXF) (Autodesk, Inc., accessed July 21, 2005) is a 

commonly used file format for Computer Aided Design (CAD) programs. The Import DXF File

dialog box is used to import DXF files into GoPhast as a series of objects on the top view of the 

model. The dialog box is displayed by selecting File|Import|DXF File... The DXF file is then 

read, and the Import DXF File dialog box is displayed. 

Objects in DXF files can contain a Z coordinate. The value of this coordinate is assigned to 

a data set. The data set can be either a new or an existing one; however, the orientation of the data

set must be "2D Top.” The user can determine whether the objects that are imported will set the 

values of enclosed or intersected cells or set values by interpolation. If the data are being used with 

a new data set, the user can choose an interpolation method for the new data set. (See 

“Interpolation Methods” on p. 16.) The names of the imported objects will be based on the name 

of the file from which the objects are imported. The Select Objects by Name dialog box (p. 54) 

can be used to select all these objects at a later time. 

Objects in DXF files may cross themselves. Such objects are invalid in GoPhast so such 

objects are skipped when importing into GoPhast. 

34
Main Menu and Buttons: File 

35

11.1.3 Import Points Dialog Box 

A common format for data are as a series of points with associated data. To import such 

data, the user selects File|Import|Import Points... to display the Import Points dialog box. The 

dialog box has two tabs: Controls and Data. Typically, the user sets the values on the Controls

tab before switching to the Data tab to specify the data that will be imported. At the top of the 

Controls tab is a list of data sets for which data can be imported. The data sets that are listed 

depend on where the data will be Evaluated at (elements or nodes), their View direction (top, 

front, or side) and the number of Associated third-dimension formulas. These three choices are 

specified with radio buttons below the list of data sets. The user also specifies whether the 

imported objects Set values of intersected nodes or elements or Set values of nodes or elements 

by interpolation. The names of the imported objects will be based on the Root name specified by 

the user. These options are explained in greater detail in the explanation of the Object Properties 

dialog box (p. 49). 

Once the user is satisfied with the Controls tab, the data to be imported are specified in the 

Data tab. The Data tab has a table in which the data to be specified are entered. The first two to 

four columns of the table are reserved for the coordinates of the data points. The remaining 

columns are used for the data to be imported. The columns for the imported data can be rearranged 

by clicking down on a column header and dragging the column to a new position. The user can 

enter the required data into the table manually. When entering data manually, the user specifies the 

number of rows in the table in the edit box near the bottom of the Data tab. Another way to enter 

the data is to read them from a tab-delimited file or to paste them from the clipboard. In a tabdelimited file, each value is separated from the next value by a tab character. Each line in the file 

represents a separate data point. To read the data from a tab-delimited file, the user clicks the 

Open File button and selects the file from which the data are to be imported. To paste the data 

from the clipboard, put the data in a spreadsheet program, select the cells that hold the data, and 

copy them to the clipboard. Then the user goes back to the Import Points dialog box and selects 

the cell in the upper left corner of the space where the data belong. Pressing Ctrl-V on the 

keyboard will paste the data. If required, the number of rows in the table will be increased to 

accommodate the data that are pasted from the clipboard. Once the data have been entered into the 

table, the user presses the OK button to import the data. Each row in the table will be imported as 

a separate point object in GoPhast. 

11.1.4 Import Distributed Data by Zone Dialog Box 

PHAST has an option whereby a different value is specified for each node or element in a 

zone. The zone is defined by a pair of lower and higher coordinates in each of the three coordinate 

directions. The Import Distributed Data by Zone dialog box is used to import such data into 

GoPhast. It is displayed by selecting File|Import|Distributed Data by Zone...

Importing data by zone is a good method for importing data when the data already exist in a 

zone format and when it is known that the grid will not be changed. If the grid will be changed or 

if the data are not already in a zone format, other methods such as importing point data are better 

because the data are specified in a grid-independent fashion. (See “Import Points Dialog Box” on 

p. 35.) 

The user specifies the boundaries of the zones and the names of files containing the data to 

be imported. The user can either type in the path or use the Browse button to select the file. The 

dialog box can be resized if needed to display the full path name of a data file. When the user 
Main Menu and Buttons: File 

36

clicks the OK button, the files will be read and the data will be imported. The format of the file is 

the same as that used by PHAST – a text file containing a list of data values. The values must be 

arranged so that all the values from lower layers precede values from high layers. Within the data 

for a layer, all values for lower rows precede values from higher rows. Within the data for a row, 

all values for lower columns precede values from higher columns. The data will be imported as a 

rectangular object with a formula for each data set for which the object sets the values. The 

formula will specify the value to apply to each node or element contained in the object. The 

coordinate system of the grid is used when specifying the coordinates. If the grid angle is not zero, 

the coordinate system of the grid is rotated relative to the global coordinate system. The user must 

select the view of the model to which the data will be imported (Top, Front, or Side). 

The user must not change the grid or move the imported objects once the data have been 

imported because the data read from the file must have the correct number of values for all the 

nodes or elements in the zone. If the grid is changed or the object is moved, the number of values 

may no longer be correct or the values may no longer be in the correct locations. If the grid must 

be changed, it is best to delete the imported objects and then import a new set of values that is 

correct for the modified grid. 

11.1.5 Import/Edit Bitmap Dialog Box 

It is often useful to display a bitmap in the background when working with a model. To 

import a bitmap, the user first selects File|Import|Bitmap... The same dialog box can be displayed 

by selecting Edit|Edit Bitmaps... The Import/Edit Bitmap dialog box will be displayed. The 

user clicks the Select Image button to select the bitmap to import. If a World (*.wld) file with the 

same file name as the selected bitmap exists, it will be read and used to specify the location of the 

bitmap. The user may also click the Import World File button to select a World file to read. The 

format of world files is described at the following URL: 

http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=16106 

The user can also specify the location of the bitmap without using a World file. To specify 

the location of the bitmap, the user clicks on the bitmap two or more times. For each point the user 

clicks, a dialog box will appear in which the user must specify the real world locations of the pixels 

that were clicked. The data will be entered in the table to the left of the image. To delete one of 

these points, delete one or more of the values for the point. If any of the values for a point is 

missing, the point will be ignored. The user must enter at least two points before the bitmap can be 

imported. The user also must specify a name for the image and whether the image will be visible 

from the top, front, or side of the model. By default, the image will be visible; however, the user 

can hide it by unchecking the Visible checkbox. 

Bitmaps can be in bmp, jpeg, or png formats; however, on computers using the Windows2000 operating system, GDI+ must be installed to use jpeg images. GDI+ is not required on 

Windows XP or Linux because support for jpegs is built into the operating system on those 

platforms. GDI+ can be downloaded from the following Microsoft web site: 

http://www.microsoft.com/downloads/details.aspx?familyid=6A63AB9C-DF12-4D41-933CBE590FEAA05A

GDI+ is distributed as a self-extracting compressed file. The dll it contains needs to be put 

in a location where GoPhast can find it before starting the program. The location where GoPhast is 

installed is a good place to put it. 

See also: “Show or Hide Bitmaps Dialog Box” on page 37.
Main Menu and Buttons: Edit

11.2 Edit 

37

The menu items under Edit are listed in table 4. 

Table 4. Edit Menu 

Menu Item Explanation 

Undo Reverses the last action. 

Redo Cancels undo. 

Edit Bitmaps... Allows the user to edit data related to bitmaps that have been imported into GoPhast. 

See “Import/Edit Bitmap Dialog Box” on p. 35.

Show or Hide Bitmaps... Allows the user to show or hide background images. See “Show or Hide Bitmaps 

Dialog Box” on p. 37.

11.2.1 Show or Hide Bitmaps Dialog Box 

The Show or Hide Bitmaps dialog box provides a quick way to show or hide the bitmaps 

that have been imported. It is displayed by selecting Edit|Show or Hide Bitmaps... Each bitmap is 

listed next to a checkbox. If the checkbox next to a bitmap is checked, the bitmap will be visible; 

otherwise, the bitmap will be hidden. Clicking the Show all and Show none buttons will show or 

hide all of the bitmaps. Clicking the Toggle button will show all the bitmaps that are hidden and

hide all those that are visible. 

See also “Import/Edit Bitmap Dialog Box” on p. 36.
Main Menu and Buttons: Grid

11.3 Grid 

38

The menu items under Grid are listed in table 5.

Table 5. Grid Menu 

Menu Item Explanation 

Delete Grid Line

Click on a grid line to delete it. See “Editing the Grid” on p. 38. 

Move Grid Line

Click and drag a grid line to move it. See “Editing the Grid” on p. 38. 

Add Vertical Grid Line

Click to add a vertical grid line. See “Editing the Grid” on p. 38. 

Add Horizontal Grid Line Click to add a horizontal grid line. See “Editing the Grid” on p. 38. 

Subdivide Grid Elements Click and drag to select elements to subdivide. See “Subdivide Columns, Rows, 

and Layers Dialog Box” on p. 39. 

Set Width Set the width of grid elements. See “Set Widths of Columns, Rows, and Layers

Dialog Box” on p. 39. 

Drag to Rotate

Click and drag to rotate the grid. See “Editing the Grid” on p. 38. 

Specify Grid Angle... Specify a precise grid angle. See “Grid Angle Dialog Box” on p. 39.

Generate Grid... Create a grid using objects. See “Using Objects to Specify the Grid” on p. 12 and 

“Generate Grid Dialog Box” on p. 40. 

Specify Grid Lines... Specify precise grid coordinates. See “Grid Spacing Dialog Box” on p. 40.

Smooth Grid... Adjust the grid spacing. See “Using Objects to Specify the Grid” on p. 12 and 

“Smooth Grid Dialog Box” on p. 41.

Set Selected Col, Row, Layer... Choose which column, row, or layer is selected. See “Select Column, Row, and 

Layer Dialog Box” on p. 41.

11.3.1 Editing the Grid 

Methods for editing the grid include deleting grid lines, moving grid lines, adding grid lines, 

subdividing elements, changing the grid angle, and “smoothing” the grid. 

To delete a grid line, the user selects Grid|Delete Grid Line or clicks the Delete grid line

button . Then the user moves the cursor over the grid line to be deleted. When the cursor is 

over a grid line, it will change from an arrow to an X. If the mouse button is clicked at that point, 

the grid line will be deleted. 

To move grid lines, the user first selects Grid|Move Grid Line or clicks on the Move grid 

line button . The user next moves the cursor over one of the views of the model. When the 

cursor is over a grid line, the cursor will change shape so that it resembles the picture on the Move

grid line button . Then the user clicks down the mouse button, moves the cursor, and releases 

the mouse button. The grid line that was under the cursor when the mouse button was pressed will 

be moved to the location where the mouse button was released. 

To add a grid line, the user selects either Grid|Add Vertical Grid Line or Grid|Add 

Horizontal Grid Line or clicks on the Add vertical grid line or Add horizontal grid line

buttons. Then the user moves the cursor over one of the views of the model. The cursor will 
Main Menu and Buttons: Grid

change to a line parallel to one of the edges of the grid. When the user clicks the mouse, a new grid 

line will be added at the position where the mouse was clicked. 

The grid angle can be changed in two ways. First, the user can choose Grid|Specify Grid 

Angle... The Grid Angle dialog box (p. 39) will appear in which the user can specify the grid 

angle. Another way is to choose Grid|Drag to Rotate or click on the Drag to rotate grid

button . Then the user clicks down on the top view of the model and moves the cursor before 

releasing the mouse button. 

Additional methods of editing the grid are described in “Subdivide Columns, Rows, and 

Layers Dialog Box” (p. 39), “Set Widths of Columns, Rows, and Layers Dialog Box” (p. 39), “Grid 

Angle Dialog Box” (p. 39), “Generate Grid Dialog Box” (p. 40), “Smooth Grid Dialog Box” (p. 

41), and “Grid Spacing Dialog Box” (p. 40). 

11.3.2 Subdivide Columns, Rows, and Layers Dialog Box 

The Subdivide Columns, Rows, and Layers dialog box is used to split columns, rows, and 

layers into two or more parts. The dialog box is shown by first selecting Grid|Subdivide Grid 

Elements or clicking the Subdivide grid elements button . Then the user clicks and drags on 

the grid with the mouse to select a range of elements. The elements over which the mouse moved 

with the mouse button pressed will be selected and shown in a gray color. When the mouse button 

is released, the Subdivide Rows, Columns, and Layers dialog box appears. In the dialog box, the 

rows columns and layers selected by the user are displayed. If desired, the user can edit the range of 

columns, rows and layers displayed. The user specifies how many columns, rows, and layers each 

selected column, row, and layer should be divided into and clicks the OK button to subdivide them. 

Each selected column, row, or layer will be split into the specified number of parts. The parts 

making up each former element will have a uniform width, and the total width of the parts will be 

equal to the total width of the selected columns, rows, or layers before they were subdivided. 

11.3.3 Set Widths of Columns, Rows, and Layers Dialog Box 

The Set Widths of Columns, Rows, and Layers dialog box is used for specifying the exact 

widths of columns, rows, and layers. To display the dialog box, the user selects Grid|Set Width or

clicks the Set width button . Next the user clicks and drags with the mouse to select one or more 

columns, rows, or layers on the top, front, or side view of the model. When the mouse is released, 

the dialog box will appear. The average width of the elements will be displayed. The user should 

decide whether to edit the columns, rows, or layers and check the corresponding checkboxes. The 

user may then edit the range of columns, rows, or layers to be edited and set the desired width. 

Clicking the OK button will cause the element size of the selected columns, rows, and layers to be

changed. 

11.3.4 Grid Angle Dialog Box 

The Grid Angle dialog box is used to change the angle of the grid. It is displayed by 

selecting Grid|Specify Grid Angle... The user then enters an angle (in degrees) in the edit box 

and clicks the OK button to change the angle of the grid as viewed from the top. The grid will be 

39
Main Menu and Buttons: Grid

rotated around its center. The grid angle is measured counterclockwise from the X-axis. The axis 

of rotation is always vertical. 

See also: “Specifying a Grid with Numbers” on p. 11 and “Editing the Grid” on p. 38. 

11.3.5 Generate Grid Dialog Box 

The Generate Grid dialog box is used to help control the generation of a grid using objects 

(p. 12). It is displayed by selecting Grid|Generate Grid... or clicking the Generate Grid

button . Before it can be used, there must be at least one polygon on the top view of the model 

for which Use to set element grid size is true and at least one polyline or polygon on the front or 

side views of the model for which Use to set element grid size is true. (See “Object Properties 

Dialog Box” on p. 49.) The Calculate grid angle automatically checkbox determines whether or

not GoPhast will calculate a grid angle or use an angle supplied by the user. If GoPhast calculates 

the angle automatically, it will specify the angle so that the area of the grid is minimized. If it is 

not calculated automatically, the user must specify the grid angle (in degrees) in the Grid angle

edit box. 

Some ground-water-modeling programs benefit from keeping the contrast in the width of 

adjacent cells less than a value of 1.5 (Anderson and Woessner, 1991). This can be achieved by 

checking the Smooth grid checkbox in the Generate Grid dialog box. If it is checked, the 

checkboxes for rows, columns, and layers determine whether grid smoothing will be applied in 

those directions. The Grid smoothing criterion determines the maximum ratio allowed between 

adjacent elements. 

11.3.6 Grid Spacing Dialog Box 

The Grid Spacing dialog box is used to specify the precise locations of grid lines. The 

Grid Spacing dialog box is displayed by selecting Grid|Specify Grid Lines... The dialog box has 

three tabs labeled Columns, Rows, and Layers. Each tab has a table with the positions of the 

relevant grid lines and an edit box that can be used to change the number of grid lines. The 

numbers in the tables represent the distance in the X′, Y′, or Z directions from the origin of the 

coordinate system. X′ and Y′ represent distances in a coordinate system aligned with the grid. If 

the grid angle is zero, X′ = X and Y′ = Y. The user can type new values in the table or copy them 

from a spreadsheet to the operating system clipboard and then paste them in the table. (Pressing the 

Ctrl and V keys simultaneously will paste the contents of the clipboard into the selected cell in the 

table and overwrite the existing contents.) The grid-line positions do not need to be in order; they 

will be sorted into the correct order when the user clicks on the OK button. The cells in the table 

can be dragged to different positions in the table by clicking-down in the area of the table where the 

row number is displayed and moving the mouse to a new position before releasing the mouse. 

The easiest way to delete a particular grid line in this dialog box is to make the cell where it 

is specified blank. The grid line will be deleted when the OK button is clicked. 

To add new grid lines, increase the number of nodes to the desired number. Each new grid 

line will be added at a position that is equal to the number in Default spacing further than the 

previous line in the grid. For example, if the last grid line is at 100 m and the default spacing is 20 

m, the next new grid line will be at a position of 120 m. 

40
Main Menu and Buttons: Grid 

41

11.3.7 Smooth Grid Dialog Box 

Some ground-water-modeling programs, benefit from keeping the contrast in the width of 

adjacent cells less than a value of 1.5 (Anderson and Woessner, 1991). The Grid|Smooth Grid...

menu item is designed to facilitate creating grids that meet this criterion. In PHAST, contrasts in 

element size are not an issue, but it still can be useful to have an area with a refined grid where 

results need to be more accurate. When the user selects this menu item, the Smooth Grid dialog 

box will appear in which the user can specify whether to adjust the row, column, or layer spacing to 

meet the criterion. The Grid smoothing criterion is the maximum ratio between adjacent rows, 

columns, or layers that will be accepted. The default value is 1.2, which is well below the usual 

limit. After making the desired selections, the user can click the OK button to adjust the grid 

spacing. Column, row, or layer boundaries will be moved to meet the grid smoothing criterion but 

no new columns, rows, or layers will be created. 

11.3.8 Select Column, Row, and Layer Dialog Box 

The Select Column, Row, and Layer dialog box can be used to change the selected 

column row or layer. To display the Select Column, Row, and Layer dialog box, select Grid|Set 

Selected Col, Row, Layer... Enter the desired values in the edit boxes and click OK to set them. 

There are two other ways to change the selected column, row, or layer that do not involve 

this dialog box. 

1. In the corner of the top, front, and side views of the model is a Selection Cube (see p. 9) that 

displays the column, row, or layer that is selected. Clicking on the Selection Cube changes the 

selected column row or layer. For more details see “The Selection Cube” on p. 9. 

2. The Page Up, Page Down, and arrow keys on the keyboard change the selected column row or 

layer. The left arrow key decreases the selected column by one. The right arrow key increases 

the selected column by one. The up arrow key increases the selected row by one. The down 

arrow key decreases the selected row by one. The Page Up key increases the selected layer by 

one. The Page Down key decreases the selected layer by one. If the “Shift” key on the 

keyboard is held down while pressing one of these keys, the selected column, row, or layer is 

changed by 10.

11.4 Data 

The menu items under Data are listed in table 6. This section also includes descriptions of 

the Formula Editor and the Data Type Problem dialog boxes. Both of these are accessed from 

the Data Sets dialog box. 

Table 6. Data Menu 

Menu Item Explanation 

Edit Data Sets... Edit the properties of data sets. See “Data Sets Dialog Box” on p. 

42.

Color Grid... Color the grid with the values of a data set or boundary condition. 

See “Color Grid Dialog Box” on p. 47.

Show Formula Errors... Display formulas that have been set to a default value because they 

were invalid. See “Formula Errors Dialog Box” on p. 47.
Main Menu and Buttons: Data 

42

11.4.1 Data Sets Dialog Box 

Data sets are managed through the Data Sets dialog box. To display the Data Sets dialog 

box, select Data|Edit Data Sets... 

Data sets have a two-dimensional or three-dimensional array of values, which correspond 

either to elements or to nodes in the grid or a projection of the grid in the top, front, or side views. 

(These values correspond to “properties” as used in section 4.2.1.3 of the PHAST manual 

(Parkhurst and others, 2004). In this report, “properties” do not necessarily refer to spatially 

distributed data.) This section describes each of the properties of a data set that the user can 

change. 

All of the data sets required by PHAST (table 7) are displayed in the Data Sets dialog box 

along with data sets that the user has created. If a data set is sometimes required by PHAST but is 

not being used in the current project, it is displayed in the dialog box in italics with a light gray 

background. Each data set has several properties: its name, whether or not it is visible, type, 

orientation (top, front, side, or 3D), where it is evaluated (nodes or elements), its units, its formula, 

and, for 2D data sets, its interpolation method. For data sets used directly by PHAST (table 7), the 

name, type, orientation, and where it is evaluated cannot be changed. For data sets created by the 

user, these properties can be changed. For some data sets that are used directly by PHAST, the user 

can use a special PHAST-style interpolation method (p. 16). 

To create a new data set, click the Add or Insert button in the Data Sets dialog box. 

Clicking the Add button, adds a new data set at the end of the table. Clicking the Insert button, 

inserts a new data set above the currently selected row in the table. To delete a data set, select the 

row in the table containing the data set and then click on the Delete button. (Users cannot delete 

data sets that are used directly by PHAST.) 

The Name of a data set is used to identify it in formulas for other data sets and when 

exporting the corresponding PHAST data set (if there is one). A name must begin with either the 

underscore character or one of the letters A through Z in either upper- or lower-case characters. 

Subsequent characters must be the underscore character, the letters A through Z in either upper- or 

lower-case characters, or the digits 0 through 9. Spaces are not allowed in the names of data sets. 

Data Set names are case insensitive. Thus, “A_NAME”, “a_name”, and “A_Name” are all 

equivalent. 

Each data set must have a Type that indicates what kind of data are stored in it. Valid types 

are "Real", "Integer", "Boolean", and "Text.” These types represent real numbers, integers, 

true/false values, and text, respectively. Most of the data sets built into GoPhast are "Real" or 

"Integer.” The "Active" data set is "True/False.” No built-in data sets are "Text.” 

The Orientation of a data set determines the shape of a data set. The possible choices are 

2D Top, 2D Front, 2D Side, and 3D. Most data sets have an Orientation of 3D. A data set with a 

2D Top orientation has a single layer but multiple columns and rows. A data set with a 2D Front 

orientation has a single row but multiple columns and layers. A data set with a 2D Side orientation 

has a single column but multiple rows and layers. A data set with a 3D orientation has multiple 

columns, rows, and layers. 

If Evaluated at (the evaluation location) is set to Elements, then the values in the data set 

correspond to elements in the model grid and are evaluated at the centers of elements. If 

Evaluated at is set to Nodes then the values in the data set correspond to nodes in the model grid. 

For orientations of 2D Top, the data set values correspond to the elements or nodes in a 2D 

projection of the model grid from above. Similarly for 2D Front and 2D Side, the data set values 
Main Menu and Buttons: Data 

43

correspond to the elements or nodes in a 2D projection of the model grid from the front or side, 

respectively. 

The Units of a data set are meant to serve as a reminder to the user. The units do not affect 

how values are computed. 

The Default formula of a data set is a mathematical expression that defines the value that 

will be applied to each location in a data set unless a value for that location is specified in some 

other way (such as being set by objects). A formula may be a simple numerical value or it can 

express much more complex relationships. See the section on “Formulas” for more information. 

(See p. 17.) 

If a data set is a two-dimensional data set, it can use one of the 2D Interpolation methods 

in conjunction with one or more objects to define the values of a data set. If an interpolation 

method is being used with a data set, the Anisotropy edit box related to that interpolation method 

becomes enabled in the bottom part of the dialog box when the data set is selected. Three 

interpolation algorithms are available in GoPhast: Nearest, Inv. Dist. Sq. (Inverse Distance 

Squared), and Nearest Point. See the section on “Interpolation Methods” for more information (p. 

16.) 

If the data set is one of the PHAST data sets with which PHAST-style interpolation can be 

used, the Use PHAST-style interpolation for all cells checkbox will be enabled when the data set 

is selected. If the user checks this checkbox, the other controls related to PHAST-style 

interpolation will become enabled. See “PHAST-Style Interpolation” on p. 16. 

In a new GoPhast project, the only data sets present are those required by PHAST (table 7). 

However, the user can create additional data sets for his or her own purposes. One reason to create 

a data set would be to use it in a formula for one of the data sets required by PHAST. For example, 

the user could create a 2D Top data set that represented the hydraulic conductivity of a particular 

geologic unit. It could then be used to assign Kx for just those elements that were part of that 

geologic unit. The Biscayne Bay aquifer example (p. 87) illustrates this process. 

Table 7. Data Sets required by PHAST 

Data Set Description PHAST equivalent When used 

Active Specifies whether an 

element in PHAST is 

active or not. 

MEDIA, active always 

Kx Specifies the hydraulic 

conductivity in the X 

direction. 

MEDIA, Kx always 

Ky Specifies the hydraulic 

conductivity in the Y 

direction. 

MEDIA, Ky always 

Kz Specifies the hydraulic 

conductivity in the Z 

direction. 

MEDIA, Kz always 

Porosity Specifies the porosity. MEDIA, porosity always 

Specific_Storage Specifies the specific 

storage. 

MEDIA, 

specific_storage 

always 

Longitudinal_Dispersivity Specifies the longitudinal 

dispersivity. 

MEDIA, longitudinal_-

dispersivity 

Use solute transport checked in 

Chemistry Options Dialog Box 

Horizontal_Transverse_-

Dispersivity 

Specifies the horizontal 

transverse dispersivity. 

MEDIA, horizontal_-

dispersivity 

Use solute transport checked in 

Chemistry Options Dialog Box 
Main Menu and Buttons: Data 

44

Table 7: continued 

Data Set Description PHAST equivalent When used 

Vertical_Transverse_-

Dispersivity 

Specifies the vertical 

transverse dispersivity. 

MEDIA, 

vertical_dispersivity 

Use solute transport checked in 

Chemistry Options Dialog Box 

Initial_Head Specifies the initial head. HEAD_IC, head Neither Use free surface nor Use 

water table for initial condition

checked in Free Surface Dialog 

Box 

Initial_Water_Table Specifies the initial water 

table. 

HEAD_IC, water_table Use free surface and Use water 

table for initial condition

checked in Free Surface Dialog 

Box 

Chemistry_Initial_-

Solution 

Specifies the initial 

solution. 

CHEMISTRY_IC, 

solution 

Use solute transport in 

Chemistry Options Dialog Box 

Chemistry_Initial_-

Equilibrium_Phases 

Specifies the initial 

equilibrium phases. 

CHEMISTRY_IC, 

equilibrium_phases 

Use solute transport and Use 

equilibrium phases checked in 

Chemistry Options Dialog Box 

Chemistry_Initial_Surface Specifies the initial 

surface properties. 

CHEMISTRY_IC, 

surface 

Use solute transport and Use 

surface assemblages checked in 

Chemistry Options Dialog Box 

Chemistry_Initial_-

Exchange 

Specifies the initial 

exchange properties. 

CHEMISTRY_IC, 

exchange 

Use solute transport and Use 

exchange checked in Chemistry 

Options Dialog Box 

Chemistry_Initial_Gas_-

Phase 

Specifies the initial gas 

phase properties. 

CHEMISTRY_IC, 

gas_phase 

Use solute transport and Use 

gas phases checked in Chemistry 

Options Dialog Box 

Chemistry_Initial_Solid_-

Solutions 

Specifies the initial solidsolution properties. CHEMISTRY_IC, 

solid_solution 

Use solute transport and Use 

solid solution checked in 

Chemistry Options Dialog Box 

Chemistry_Initial_-

Kinetics 

Specifies the initial 

kinetic properties. 

CHEMISTRY_IC, 

kinetics 

Use solute transport and Use 

kinetics checked in Chemistry 

Options Dialog Box 

Print_Chemistry Specifies the "Print 

Chemistry" distribution. 

PRINT_LOCATIONS, 

chemistry 

Use solute transport checked in 

Chemistry Options Dialog Box 

Print_XYZ_Chemistry Specifies the "Print XYZ 

Chemistry" distribution. 

PRINT_LOCATIONS, 

xyz_chemistry 

Use solute transport checked in 

Chemistry Options Dialog Box 

11.4.2 Formula Editor Dialog Box 

The Formula Editor dialog box is used to edit formulas (see p. 17). It can be displayed by 

clicking a button next to a formula in the Data Sets dialog box (p. 41), the Object Properties

dialog box (p. 49), or the Import Shapefile dialog box (p. 33). The Formula Editor dialog box 

has four main parts (fig. 24): 

• the formula text box in the upper left where the formula is composed, 

• the buttons in the lower left where numbers, operators, and dividers can be selected, 

• the list of data sets and functions on the right where data sets and functions can be selected 

(Data Sets is replaced by Attributes when the Formula Editor is used to edit the Import 

criterion in the Import Shapefile dialog box), and 
Main Menu and Buttons: Data

• the Select Matching Parenthesis, Function Help, and other buttons at the bottom of the dialog 

box. 

• the Select Matching Parenthesis, Function Help, and other buttons at the bottom of the dialog 

box. 

The relative size of the formula text box and the list of data sets and functions can be 

adjusted by clicking on the boundary between them and dragging with the mouse button held down. 

List of Data Sets 

and Functions

Formula 

text box 

Buttons 

Figure 24. Formula Editor. 

11.4.2.1 The Formula Text Box 

The formula text box is used to compose the formula. Three methods can be used to create 

the formula: (1) The formula can be typed in the formula text box directly; (2) the number and 

operator buttons can be used to insert items into the formula; or (3) the list of data sets and 

functions can be used to insert items into the formula. When the formula is complete, the user

clicks the OK button. If the formula is valid, the formula will be accepted, and the Formula

Editor will close. If it is invalid, an error message will be displayed, and the Formula Editor will 

remain open.

11.4.2.2 Number and Operator Buttons 

The number and operator buttons all work the same way: when the user clicks one of the 

buttons, the text displayed on the button will be inserted in the Formula text box at the position of 

the cursor. If any text in the formula is selected, it will be replaced. See “Operators” on p. 18 for 

more information on the meanings of the operators. 

11.4.2.3 List of Data Sets and Functions 

The data sets and functions that can be included in a formula are listed in the List of Data 

Sets and Functions on the right in the Formula Editor. For compactness, they are shown in a tree 

view. To see the available data sets or functions click the plus (+) sign to the left of Data Sets or 

Functions to expand the list. Within functions, there are additional lists that can be expanded by 

clicking the plus sign to their left. When the terminal branches of the tree are visible, the user can 

45
Main Menu and Buttons: Data 

46

double click on one of them to insert it into the formula at the location of the cursor. If any text in 

the formula is selected, it will be replaced by the data set or formula. See “Functions” on p. 19 for 

more information on the meanings of the functions. 

 Not all data sets will be listed in the data set list, because not all data sets can be included in 

a formula for all other data sets. For instance, a formula for a data set cannot include a reference to 

itself either directly or indirectly. For example, if the formula for Ky is "Kx", the formula for Kx

could not include Ky because that would make the formula for Kx depend on itself. Another 

example of a circular reference that is not allowed is to set the formula for Ky to "Kx", the formula 

for Kz to "Ky", and the formula for Kx to "Kz". Because Kx ultimately refers back to itself, this 

circular reference is not allowed. 

Another requirement for a data set to be included in a formula is that the data set used in the 

formula must be evaluated at the same locations as the data set or object for which the formula is 

being set up. For example, Kz can include a reference to Kx because both Kx and Kz are evaluated 

at elements; however, Kz cannot include a reference to Initial_Head because Kz is evaluated at 

elements and Initial_Head is evaluated at nodes. 

Finally, the formula for a two-dimensional data set can only include a reference to twodimensional data sets with the same orientation; however, the formula for three-dimensional data 

sets can include a reference to a two-dimensional data set of any orientation. 

11.4.2.4 Select Matching Parenthesis Button 

The Select Matching Parenthesis button helps the user determine which parenthesis in a 

formula goes with which other parenthesis. If an opening or closing parenthesis is selected in the 

formula, the button becomes enabled. Then if the button is clicked, the matching parenthesis will 

become selected. For example suppose the formula is ((A + B) * C) and the opening parenthesis 

just before "A" is selected. If the Select Matching Parenthesis button were clicked, the closing 

parenthesis just after B would be selected. The large, bold text in the two formulas below indicates 

what was selected before and after clicking the button. 

((A + B) * C) 

((A + B) * C) 

11.4.2.5 Function Help Button 

The Function Help button is used to obtain help on a particular function. If a function is 

selected in the List of Data Sets and Functions, the Function Help button will become enabled. 

Clicking the button will bring up a description of the function that was selected. The functions are 

also described in this report in “Functions” on p. 19. 

11.4.3 Data Type Problem Dialog Box 

The Data Type Problem dialog box appears when the user has entered a formula in the 

Data Sets dialog box (p. 41) whose result is of the wrong type for the data set in question. For 

user-created data sets, there are two ways of handling this. 

1. The type of the data set can be changed to match the type returned by the formula. For 

example, if the type of the data set is an integer, and the formula is "0.5", the type of the data set 

could be changed to real. 
Main Menu and Buttons: Data 

47

2. The formula could be adjusted to match the type of the data. For example, if the type of the 

data set is an integer, and the formula is "0.5", the formula could be changed to "Round(0.5).” 

(In this case, "Round(0.5)" would then be converted to "0" because Round(0.5) is a constant.) 

The built-in data sets for GoPhast cannot have their type changed because the type must 

match the type of the corresponding data set in PHAST. Thus, for these data sets, only the second 

option is available. 

11.4.4 Color Grid Dialog Box 

The Color Grid dialog box is used to color the grid according to the value of a data set or 

boundary condition. It is displayed by selecting Data|Color Grid...

The user chooses the data set or boundary condition used to color the grid in the combo box 

at the top of the dialog box. If the item chosen, such as Specified_Head, can vary with time, the 

user should also select the time in the edit box labeled Time. 

The user can select the range to be colored by checking the checkboxes labeled Lower limit

and Upper limit and then entering the desired limit in the edit box to the right of the corresponding 

checkbox. 

Different color schemes can be used to associate a given value of the data set or boundary 

condition with a color. The desired color scheme is selected in the combo box near the bottom of 

the dialog box. The range of colors in the selected color scheme is displayed below the combo box. 

To cycle through the range of colors for a color scheme more than one time, change the 

value in the edit box labeled Cycles. 

See Light and Bartlein (2004, 2005), and Stephenson (2005) for more information about 

color schemes. 

11.4.5 Formula Errors Dialog Box 

If the user has entered a formula that is invalid, the formula will be reset to a default value 

when an attempt is made to evaluate it. The Formula Errors dialog box shows what formulas 

have been reset. The Formula Errors dialog box is displayed by selecting Data|Show Formula 

Errors... It is also shown automatically if an invalid formula is detected. 

Normally, GoPhast prevents the user from entering an invalid formula; however, a formula 

that was valid can become invalid if the data type or evaluation location of a data set that is 

included in the formula is changed, or if the GoPhast project file is edited outside of GoPhast.
Main Menu and Buttons: Object

11.5 Object 

48

The menu items under Object are listed in table 8. 

Table 8. Object Menu 

Menu Item Explanation 

Select Objects Click or drag to select objects. See “Selecting Objects” on p. 30. Double click to

edit objects. See the “Object Properties Dialog Box” on p. 49. 

Select Vertices Click or drag to select individual vertices. See “Selecting Objects” on p. 30. 

Select With Lasso Drag to select objects. See “Selecting Objects” on p. 30. 

Edit Selected Object(s) Edit the properties of the selected objects. See the “Object Properties Dialog Box” 

on p. 49. 

Create Point Create a point object. See “Points” on p. 28 and the “Object Properties Dialog Box” 

on p. 49. 

Create Line Create a polyline object. See “Polylines” on p. 28 and the “Object Properties Dialog

Box” on p. 49.

Create Polygon Create a polygon object. See “Polygons” on p. 29 and the “Object Properties Dialog

Box” on p. 49.

Create Straight Line Create a polyline object whose segments are parallel to the grid. See “StraightLines” on p. 29 and the “Object Properties Dialog Box” on p. 49. 

Create Rectangle Create a rectangular polygon object. See “Rectangles” on p. 29 and the “Object 

Properties Dialog Box” on p. 49. 

Insert Vertex Insert a new vertex into the selected object by clicking the location on the object 

where a new vertex is desired. See “Editing Objects” on p. 31. 

Delete Segment Delete a segment from an object by clicking on it. See “Editing Objects” on p. 31. 

Rearrange Objects... Change the order of the objects. See “Rearrange Objects Dialog Box” on p. 53.

Search For Object... Search for objects based on the data sets or boundary conditions they affect. See 

“Search for Objects Dialog Box” on p. 53.

Show Selected Objects... Display the Selected Objects dialog box which shows which objects are selected. 

See “Selected Objects Dialog Box” on p. 53.

 Show or Hide Objects... Show or hide objects based on the data sets or boundary conditions they affect or

individually. See “Show or Hide Objects Dialog Box” on p. 53.

Select Objects by Name... Select objects based on their names. See “Select Objects by Name Dialog Box” on 

p. 54.
Main Menu and Buttons: Object

11.5.1 Object Properties Dialog Box 

To create an object, see “Creating, Selecting, and Editing Objects in GoPhast” (p. 28). 

When the object is complete, the Object Properties dialog box will appear (fig. 25). The Object 

Properties dialog box is also used to edit the properties of existing objects by double clicking on 

them or selecting Object|Edit Selected Object(s) or by using the Show or Hide Objects dialog 

box (p. 53). 

Figure 25. Object Properties dialog box. 

The Object Properties dialog box is a tabbed dialog box with 2 to 4 visible tabs. The 

Properties and Data Sets tabs are visible for all objects. If the object in question is evaluated at 

nodes and only one object is being edited, an additional tab, Boundary Conditions, is visible. If 

only one object is being edited, the Vertices tab will be visible. 

11.5.1.1 Properties Tab 

Evaluated at: When objects are used to assign values to data sets, the formula for the object 

can be evaluated either at the grid nodes or at the element centers. The choice partially determines

for which data sets the object can set values. If an object is evaluated at elements, it can be used to 

set the values of a data set that is evaluated at elements. If an object is evaluated at nodes, it can be 

used to set the values of a data set that is evaluated at nodes.

Name: Each object is assigned a name. By default, when an object is created, it is assigned 

a unique name; however, object names are not required to be unique. The user can edit the name of 

an object if only one object is being edited. Object names are useful for identifying particular 

objects. For example, The View|Go To... menu item (p. 55) allows the user to move the view of 

49
Main Menu and Buttons: Object

the model so that a particular object is visible in the field of view by selecting the name of the 

object. 

the model so that a particular object is visible in the field of view by selecting the name of the 

object. 

Names of selected objects: This displays the names of all the objects that are being edited. 

The names cannot be edited in the list. The list is only present if two or more objects are being 

edited simultaneously. 

Names of selected objects: This displays the names of all the objects that are being edited. 

The names cannot be edited in the list. The list is only present if two or more objects are being 

edited simultaneously. 

Use to set grid element size and Grid element size: If the Use to set grid element size

checkbox is checked, the value in the Grid element size edit box is used to help define the extent 

and node spacing of the grid. See “Using Objects to Specify the Grid” on p. 12 for more 

information.

Use to set grid element size and Grid element size: If the Use to set grid element size

checkbox is checked, the value in the Grid element size edit box is used to help define the extent 

and node spacing of the grid. See “Using Objects to Specify the Grid” on p. 12 for more 

information.

Color object line, Color object interior, Set object line color, and Set object fill color: 

If desired, the lines and interiors of objects can be colored. These checkboxes and buttons allow 

the user to specify how the object will be colored. If one of the checkboxes is checked, the 

corresponding button becomes enabled. The user can then click the button to select the color used 

for the boundary line or interior of the object.

Color object line, Color object interior, Set object line color, and Set object fill color: 

If desired, the lines and interiors of objects can be colored. These checkboxes and buttons allow 

the user to specify how the object will be colored. If one of the checkboxes is checked, the 

corresponding button becomes enabled. The user can then click the button to select the color used 

for the boundary line or interior of the object.

Set values of enclosed elements\nodes, Set values of intersected elements\nodes, and Set 

values of elements\nodes by interpolation: An object can be used to assign the values to a data set 

in any of the three ways indicated by these three checkboxes. If none of these checkboxes is 

checked and the Use to set grid element size checkbox is also not checked, the object cannot affect 

the model in any way. The user is warned of this problem when clicking the OK button and given 

a chance to check one of the checkboxes. 

Set values of enclosed elements\nodes, Set values of intersected elements\nodes, and Set 

values of elements\nodes by interpolation: An object can be used to assign the values to a data set 

in any of the three ways indicated by these three checkboxes. If none of these checkboxes is 

checked and the Use to set grid element size checkbox is also not checked, the object cannot affect 

the model in any way. The user is warned of this problem when clicking the OK button and given 

a chance to check one of the checkboxes. 

The Set values of enclosed elements\nodes checkbox is used to specify that the object will 

be used to set the values of data sets or boundary conditions of nodes or of elements whose centers 

are inside the object. In the case of objects with a single associated third-dimension formula, a 

node or element is considered to be in the interior of the object if its center is inside the plan view

of the object and the cell around the node or the element is intersected by the object in the third 

dimension (fig. 26). 

The Set values of enclosed elements\nodes checkbox is used to specify that the object will 

be used to set the values of data sets or boundary conditions of nodes or of elements whose centers 

are inside the object. In the case of objects with a single associated third-dimension formula, a 

node or element is considered to be in the interior of the object if its center is inside the plan view

of the object and the cell around the node or the element is intersected by the object in the third 

dimension (fig. 26). 

Figure 26. Elements affected by object with Set values of enclosed 

elements checkbox (shown in red) in top and front views. 

The Set values of intersected elements\nodes checkbox is used to specify that the object 

will be used to set the values of data sets or boundary conditions of elements intersected by the 

object or of nodes whose cells are intersected by the object. 

Top View 

Front View

50
Main Menu and Buttons: Object 

51

The Set values of elements\nodes by interpolation checkbox is used to specify that the 

object will be used to set the values of data sets (but not boundary conditions, p. 52) of elements or 

nodes by interpolation. The interpolation method is specified in the Data Sets dialog box (see p. 

41). Interpolation only applies to two-dimensional data sets. 

Associated third-dimension formulas: An object can have zero, one, or two associated 

third-dimension formulas. If an object has zero associated third-dimension formulas, it is a 2D 

object and can only be used to set the values of 2D data sets. If it has one or two associated thirddimension formulas, it is a 3D object and can be used to set the values of both 2D and 3D data sets. 

The third-dimension formulas set the position of the object in the dimension perpendicular to the 

one in which the object has been drawn. For example, if an object is drawn on the top view of the 

model, its third-dimension formula(s) set its position on the Z axis. An example of using the thirddimension formula for defining the properties of a geologic unit with an irregular upper and lower 

surface has been presented earlier in “Assigning Values to Data Sets” on p. 5. 

X-, Y-, or Z-coordinate: The Z-coordinate formula sets the Z coordinate of the object as a 

function of position for objects that have one associated third-dimension formula. For objects 

drawn on the side and front views of the model, the corresponding formula sets the X or Y 

coordinate respectively. 

Higher X-, Y-, or Z-coordinate and Lower X-, Y-, or Z-coordinate: The Higher Zcoordinate and Lower Z-coordinate formulas sets the Z coordinates of the object as a function of 

position for objects that have two associated third-dimension formula. For objects drawn on the 

side and front views of the model, the corresponding formulas set the X or Y coordinates 

respectively. 

11.5.1.2 Data Sets Tab 

The Data Sets tab is used to specify which data sets will be affected by an object and the 

formulas used to set the value for each data set. Alternatively, the interpolation mechanism built 

into PHAST can be used to specify the values that will be assigned for a particular object. 

The main part of the Data Sets tab is made up of a table with three columns: Name, 

Affects, and Formula. Each row of the table represents a separate data set. If a data set is not 

being used in the current model, its name is written in italics and a light gray background is used 

for its cells. Under the Affects column, there is a checkbox for each data set. Only those data sets 

whose values can be set by the current object have their checkboxes enabled. The user can change 

which data sets can have their values set by changing their choices for Evaluated At and 

Associated third-dimension formulas on the Properties tab. Once the user has checked the 

checkbox for a data set under the Affects column, the user can enter a formula for the object or 

check the checkbox near the bottom of the tab labeled Use PHAST-style interpolation. PHASTstyle interpolation is only applied to cells or elements enclosed or intersected by an object, not to 

cells or elements that are assigned by interpolation among objects. When interpolating among 

objects, the formula for the object is always used even if PHAST style interpolation is used when 

assigning values to enclosed or intersected cells. This is because only two values can be used for 

PHAST-style interpolation. That limitation prevents PHAST-style interpolation from being used 

when interpolating among several objects. The only Data Set for which both the GoPhast 

interpolation methods and the PHAST-style interpolation methods can be used is 

Initial_Water_Table. See “PHAST-Style Interpolation” (p. 16) for more information. 
Main Menu and Buttons: Object 

52

11.5.1.3 Boundary Conditions Tab 

The Boundary Conditions tab is used to assign boundary conditions with an object. 

Because all the boundary conditions in PHAST are assigned at nodes, the Boundary Conditions

tab is only visible when the object is evaluated at nodes. In addition, the Boundary Conditions tab 

is only visible if a single object is being edited. To apply a boundary condition using an object, 

select the type of boundary condition to apply from the list of radio buttons. The choices are None,

Specified head, Flux boundary, Leaky boundary, River boundary, and Well boundary. River

and Well boundary conditions can only be used with objects drawn on the top view of the model. 

In addition Rivers can only be used with polyline objects and Wells can only be used with point 

objects. If the boundary applies to only one face of a cell such as a flux boundary, it will be applied 

to the face of the cell on which the object is drawn. For example, if an object was drawn on the top 

view of the model, any boundaries associated with that object will be on a horizontal cell surface. 

All of the different types of boundary conditions include a table that specifies how the 

boundary varies with time. For each boundary, the user specifies the number of times that the 

boundary condition values are specified in the edit box labeled Number of times. On the right side 

of the dialog box, the user can specify data related to the type of boundary condition that is being 

specified. One of the columns in the table specifies when the boundary condition changes. The first 

time is required to be zero so it cannot be edited. The user must specify each of the other times 

when the boundary condition changes. The times that are specified do not need to be the same as 

those specified elsewhere in GoPhast. GoPhast synthesizes all the times throughout the model and 

combines them to create the PHAST input file. 

All of the boundary conditions have parameters that may vary with time. These timevarying parameters are specified in the table. The user can specify a formula for any of these 

parameters. If PHAST allows PHAST-style interpolation (see p. 16) to be used with the a 

parameter, a column of checkboxes will be next to the parameter in the table with a heading 

indicating that the parameter can be interpolated. To use PHAST-style interpolation, check the 

checkbox for PHAST-style interpolation for the parameter and specify the interpolation direction 

distances and values using the radio buttons and edit boxes on the left side of the dialog box. If a 

boundary condition has more than one parameter that varies with time and the parameters do not 

change at the same times, the user may leave some values blank. A value may be left blank if 

PHAST-style interpolation is not used and the parameter has been specified at an earlier time. A 

time-varying parameter must always be specified for time zero. 

For Leaky, River, and Well boundaries, additional non-time-varying information is 

required by PHAST. This information is specified on the right side of the dialog box. For a Leaky

boundary, Hydraulic conductivity and Thickness must be specified. For a River boundary, a 

River name, Hydraulic conductivity, Width, Depth, and Bed thickness must be specified. For a 

Well, a Name, Diameter, the open intervals in the well, and the method of allocating pumpage 

among the open intervals must be specified. In addition, if the open intervals are specified by using 

depths rather than elevations, a Land surface datum must be specified. Some of these data can be 

specified by using formulas. If so, a button (labeled Edit F()...) is provided next to the edit box in 

which the formula is specified. Clicking the button will call up the Formula Editor (see p. 44).

11.5.1.4 Vertices Tab 

If only one object is being edited, the Vertices tab will be visible. On it, the user can adjust 

the positions of vertices of the object by entering new values for their X and Y coordinates. If the 
Main Menu and Buttons: Object

coordinates that are entered in the Vertices tab are invalid in some way, all changes to the vertex 

coordinates will be ignored. The coordinates are invalid if they cause the object to cross itself. It is 

impossible to add or delete vertices on the Vertices tab. Tools described in the section entitled 

“Editing Objects” on p. 31 allow the user to add and delete vertices. 

11.5.2 Rearrange Objects Dialog Box 

When values are assigned to a data set, each object overwrites any previous values so the 

last object that sets the value at any particular location is the one that determines the value at that 

location. (See “Assigning Values to Data Sets” on p. 5.) The Rearrange Objects dialog box can 

be used to change the order of the objects. To display the Rearrange Objects dialog box, select 

Object|Rearrange Objects... All of the objects will be listed in order in the table in the dialog 

box. The objects that are selected will be shown in bold type. To change the order of the objects, 

click to the left of an object and drag with the mouse to move the object to a new position in the 

table. Objects can be renamed in this dialog box too. To rename an object, type its new name in 

the table. 

The order of the objects can also be changed without using the Rearrange Objects dialog 

box. The user can select one or more objects in the main window, right click and select To Front, 

To Back, Forward One, or Back One from the popup menu. 

11.5.3 Search for Objects Dialog Box 

The Search for Objects dialog box is used to select objects based on which data sets they 

affect. To display the dialog box, select Object|Search for Objects... Next the user checks the 

checkboxes next to the data sets and clicks the OK button. If any objects set that data set directly 

by specifying a formula for it, they will be selected. 

See also: “Selected Objects Dialog Box” on p. 53 and “Show or Hide Objects Dialog Box” 

on p. 53. 

11.5.4 Selected Objects Dialog Box 

The Selected Objects dialog box displays a list of the objects that are currently selected. 

The user can continue to work with the model while this dialog box is visible. To display the 

Selected Objects dialog box, select Object|Show Selected Objects...

11.5.5 Show or Hide Objects Dialog Box 

The purpose of the Show or Hide Objects dialog box is to allow the user to change which 

objects (points, lines, and polygons) are visible in the main Working Area. It can also be used to 

select and edit objects. The Show or Hide Objects dialog box is displayed by selecting 

Object|Show or Hide Objects... or by clicking on the Show or Hide Objects button . The user 

can continue to work with the model while this dialog box is visible. The names of the objects are 

displayed on the terminal branches of a tree control. Before the name of each object is a checkbox. 

The checkbox will be checked if the object is visible and unchecked if the object is hidden. The

user can check or uncheck a checkbox next to an object’s name to show or hide that object. 

53
Main Menu and Buttons: Object 

54

Hiding objects does not deactivate them; it just makes the Working Area less cluttered. A 

typical reason to show some objects but not others would be to display only the objects that affect a 

particular data set. For example, to display only the objects that affect the Kx data set, the user 

would uncheck the checkbox next to All Objects to hide all the objects and then check the 

checkbox for Kx under Data Sets to show all the objects that directly affect Kx. 

In addition to a checkbox, the main branches of the tree also have a plus or minus sign. The 

symbol will be a plus if the branch is open to display its subbranches or a minus if the branch is 

closed so that its sub branches are hidden. If the user clicks on this symbol, the branch will switch 

between the opened and closed state. 

The checkboxes before the main branches will either be checked, unchecked or grayed. A 

checkbox will be checked if all the branches beneath it are checked. It will be unchecked if all the 

branches beneath it are unchecked. It will be grayed if some of the branches beneath it are checked 

and others are unchecked. If the user checks or unchecks the checkbox for one of the main 

branches, it will show or hide respectively all of the objects for the branches beneath it. If all of the 

objects beneath it are already visible, they all will be hidden. If any of the objects beneath it are 

hidden, they all will be made visible. 

The main branches are labeled 

• All Objects, 

• Set Grid Cell Size, 

• Data Sets, 

• Boundary Conditions, and 

• Unused Objects. 

All the objects are listed under All Objects. All the objects used to set the size of the grid 

cells are listed under Set Grid Cell Size. In addition, the value the user has specified for the cell 

size will be displayed in parentheses after the name of the object. All the data sets are listed under 

Data Sets. Beneath each data set in Data Sets are listed all the objects that directly set the values 

of the data set. The formula used for each data set will be displayed in parentheses after the name 

of the object. All the boundary conditions are listed under Boundary Conditions. Beneath each 

boundary condition in Boundary Conditions are listed all the objects that directly set the values of 

that boundary condition. Any objects that are not used to set the size of grid cells, or to set the 

value of one or more data sets or boundary conditions are listed under Unused Objects. 

The user can select or edit objects by right-clicking on the name of the object and selecting 

Select or Edit from the popup menu. The user can also edit an object by double-clicking on its 

name. When the user selects Select, the object will become selected in the main GoPhast window 

and all other objects will be deselected. If the user selects Edit or double-clicks on an object’s 

name, the Object Properties dialog box (p. 49) will be displayed so the user can edit the object. 

See also: “Select Objects by Name Dialog Box” on p. 54 and “Search for Objects Dialog 

Box” on p. 53. 

11.5.6 Select Objects by Name Dialog Box 

The Select Objects by Name dialog box is used to select objects by their names. To show 

the Select Objects by Name dialog box, select Object|Select Objects by Name... The dialog box 

has three tabs; one each for the top, front, and side views of the model. If a particular model has no 

objects on a particular view of the model, the tab for that view of the model will be hidden. All the 

objects on each view of the model will be listed in their respective tabs including hidden objects. 

To suppress the listing of hidden objects, uncheck the Include hidden objects checkbox. 
Main Menu and Buttons: Object

To select objects, check the checkboxes next to their names and then click the OK button. 

Only objects on one view of the model can be selected at a time. The Select All, Select None, and 

Toggle buttons can be used to change which checkboxes are checked. Clicking the Select Names 

Containing: button will check all the boxes for objects contain the search term in the edit box next 

to the Select Names Containing: button. 

See also: “Search for Objects Dialog Box” on p. 53 and “Show or Hide Objects Dialog 

Box” on p. 53.

11.6 View 

The menu items under View are listed in table 9.

Table 9. View Menu 

Menu Item Explanation 

Zoom Drag to zoom in to a specific area. See “Changing the Magnification” on p. 55 for 

more information.

Zoom In Zoom in by a factor of two. See “Changing the Magnification” on p. 55 for more

information.

Zoom Out Zoom out by a factor of two. See “Changing the Magnification” on p. 55 for more

information.

Pan Move the displayed area that is shown on the top, front, or side view of the model by

clicking with the mouse and dragging while holding the mouse down. 

Go To... Go to a location, element, or object. See “Go To Dialog Box” on p. 56.

Vertical Exaggeration... Change the vertical exaggeration. See “Vertical Exaggeration Dialog Box” on p. 57.

Show Grid Shell Show or hide the grid shell in the 3D view of the model.

Show Top Grid Show or hide the grid lines for a horizontal cross section of the model in the 3D view 

of the model. The selected layer determines where the grid lines are drawn.

Show Front Grid Show or hide the grid lines for a vertical cross section parallel to the front view of the

model in the 3D view of the model. The selected row determines where the grid lines 

are drawn. 

Show Side Grid Show or hide the grid lines for a vertical cross section parallel to the side view of the 

model in the 3D view of the model. The selected column determines where the grid 

lines are drawn. 

Show 3D Colored Grid Show or hide colored cells or elements in the 3D grid. This control is disabled, if the 

grid is not being colored.

Show 3D Objects Show or hide objects in the 3D view of the model.

Restore Default 3D View Position the 3D view of the model so that it is viewed from above at a default 

magnification and without rotation.

3D Lighting... Change the lighting for the 3D view. See “3D Lighting Controls Dialog Box” on p.

57.

11.6.1 Changing the Magnification 

The magnification of the top, front, and side views of the model can be changed in several 

ways. To zoom in by a factor of two, select View|Zoom In or click on the Zoom In button . 

While the cursor is over the model, it will change to a magnification glass with a plus sign in the 

55
Main Menu and Buttons: View

middle if the magnification can be increased. The user then clicks at the location that is desired to 

be directly under the cursor after zooming in. 

To zoom out by a factor of two, select View|Zoom Out or click on the Zoom Out

button . While the cursor is over the model, it will change to a magnification glass with a minus 

sign in the middle if the magnification can be decreased. The user then clicks at the location that is 

desired to be directly under the cursor after zooming out. 

To zoom in to a specific region select View|Zoom or click on the Zoom button . While 

the cursor is over the model, it will change to a magnification glass if the magnification can be 

increased. The user clicks down on one corner of the desired region, moves the mouse to the other 

corner and releases the mouse button. The selected region will be displayed at a higher 

magnification. 

To change the magnification of the 3D view of the model, hold down the right mouse 

button. Then click on the 3D view and move the mouse either up or down. Moving it up will 

increase the magnification. Moving it down will decrease the magnification. 

11.6.2 Go To Dialog Box 

The Go To dialog box is used to change one or more of the views of the model so that a 

particular location, element, or object is visible. It can also be used to select a particular object. To

show the Go To dialog box, select View|Go To...

The Go To dialog box has three tabs. However, some of those tabs are hidden when they 

cannot be used. The three tabs are 

• The Position Tab, 

• The Element Tab, and 

• The Object Tab. 

The user selects one of the tabs, chooses what is to be made visible and clicks on the OK

button to change what is visible. 

11.6.2.1 The Position Tab 

The Position tab is always visible. In it, the user specifies the coordinates of the location to 

be made visible. The user also specifies the views of the model to be changed. Depending on 

which view of the model the user selects, some of the edit boxes in which the coordinates are 

specified will be enabled or disabled.

11.6.2.2 The Element Tab 

The Element tab is visible when a grid has been created. In it, the user specifies the 

column, row, and layer number to be made visible. The user also specifies the views of the model 

to be changed. Depending on which views of the model the user selects, some of the edit boxes in

which the column, row, and layer numbers are specified will be enabled or disabled. 

11.6.2.3 The Object Tab

The Object tab is visible when one or more objects have been created. In it, the user selects 

the object to be displayed on the screen. Because objects are associated with particular views of the 

56
Main Menu and Buttons: View 

57

model, the user does not specify the view of the model to be changed. If the user checks the Select 

object checkbox, the object will become selected as well as being brought into view when the OK

button is clicked. 

11.6.3 Vertical Exaggeration Dialog Box 

The Vertical Exaggeration dialog box is used to change the ratio of the horizontal to the 

vertical scale as displayed on the screen. The vertical exaggeration only affects how the model is 

displayed. It does not change the model itself. The Vertical Exaggeration dialog box is displayed 

by selecting View|Vertical Exaggeration... The front, side, and 3D views of the model are 

affected by the vertical exaggeration. 

11.6.4 3D Lighting Controls Dialog Box 

The 3D Lighting Controls dialog box helps control the appearance of the 3D image of the 

model in the lower right corner of the Working Area. The 3D Lighting Controls dialog box is 

displayed by selecting View|3D Lighting... There are six controls in the dialog box. The three 

controls on the left set the position of the light. The other three set different aspects of the light 

intensity. 

11.6.4.1 Light Position 

The coordinate system for the light has its origin in the center of the screen. X increases to 

the right. Y increases toward the top of the screen. Z increases out from the screen toward the 

viewer. The units of the coordinate system are arbitrary. They merely control the direction of the 

light. 

11.6.4.2 Light Intensity 

The light is considered to have three components: Ambient light, Diffuse light and Specular 

light. Ambient light is light that does not come from any particular direction. For instance, light 

from the sky would be considered ambient light. Diffuse light comes from a particular direction 

but is reflected evenly off a surface. However, surfaces directed at the light will receive more light 

than those directed away from the light. Specular light, like diffuse light is directional. However, it 

causes a bright spot on the surface on which it is shining.
Main Menu and Buttons: Customize 

11.7 Customize 

58

The menu items under Customize are listed in table 10. 

Table 10. Customize Menu 

Menu Item Explanation 

Font... Change the font used throughout GoPhast.

Color... Change the background color of the windows used throughout GoPhast.

Hint Display Time... Change how long “hints” are displayed. See “Hint Display Time Dialog Box” on p. 58.

Ruler Format... Change the numeric format of the Rulers. See “Ruler Format Dialog Box” on p. 58.

Change Style... Change the style used for controls. See “Choose Style Dialog Box” on p. 58.

11.7.1 Hint Display Time Dialog Box 

When the mouse is held over a control in the GoPhast main window, a small "hint" box will 

appear in which the purpose of that control is briefly described. A longer hint will also appear on 

the status bar. The Hint Display Time dialog box is used to specify how long the small "hint" box 

is displayed (in seconds). By default, the hint box is displayed for 2.5 seconds. To display the 

Hint Display Time dialog box, select Customize|Hint Display Time...

11.7.2 Ruler Format Dialog Box 

The top, front, and side views of the model each have a pair of Rulers (see p. 9) that show 

the coordinates of the model. If the numbers to be displayed on these Rulers become too large or 

too small, numbers might not be displayed with enough precision. The Ruler Format dialog box 

can be used to change the number of digits displayed on the Rulers. To display the Ruler Format

dialog box, either double-click on a Ruler or select Customize|Ruler Format... To change the 

precision of a particular Ruler, change to the tab for that Ruler and change the precision in the edit 

box. To see what effect this will have, type a number in the Sample number edit box and see how 

it is displayed in the preview area. 

11.7.3 Choose Style Dialog Box 

GoPhast allows the user to configure its appearance in a number of different styles. Each 

style will affect the appearance of different controls such as checkboxes and radio buttons. To 

choose a style, select Customize|Choose Style... and the Choose Style dialog box will appear. 

When the user chooses a style in the Choose Style dialog box, the dialog box will display a 

preview of the changed appearance of the controls. Preview controls can be tested but have no 

other effect.
Main Menu and Buttons: PHAST Options 

11.8 PHAST Options 

59

The menu items under PHAST Options are listed in table 11. 

Table 11. PHAST Options Menu 

Menu Item Explanation 

Title and Units... Display the “Title and Units Dialog Box” (p. 59).

Grid Options... Display the “Grid Options Dialog Box” (p. 59).

Chemistry Options... Display the “Chemistry Options Dialog Box” (p. 59).

Solution Method... Display the “Solution Method Dialog Box” (p. 60).

Steady Flow... Display the “Steady Flow Dialog Box” (p. 60).

Time Control... Display the “Time Control Dialog Box” (p. 61).

Free Surface... Display the “Free Surface Dialog Box” (p. 61).

Print Initial... Display the “Print Initial Conditions Dialog Box” (p. 61).

Print Frequency... Display the “Print Frequency Dialog Box” (p. 62).

11.8.1 Title and Units Dialog Box 

The Title and Units dialog box is used to specify the title and the default units for the 

model. It is displayed by selecting PHAST Options|Title and Units... The entire title will be 

included in the input, but PHAST only prints the first two lines of the title in the “*.o” output file. 

11.8.2 Grid Options Dialog Box 

The Grid Options dialog box is used to change certain options related to the grid in 

PHAST. To display the dialog box, select PHAST Options|Grid Options...

If the model is logically a one- or two-dimensional model, the user can use the Chemistry 

dimensions checkboxes to choose which dimensions should be used for the chemistry calculations. 

If the model is a vertical cross sectional model, the user may wish to have the output from 

the model printed in the “*.o” output file in XZ orientation rather than the default XY orientation. 

The user can make that selection in the Grid Options dialog box. 

11.8.3 Chemistry Options Dialog Box 

The purpose of the Chemistry Options dialog box is to specify whether solute transport 

will be used and, if so, which reactants will be used as well as the diffusivity. The Chemistry 

Options dialog box is displayed by selecting PHAST Options|Chemistry Options... The options 

that are available are 

• Use solute transport, 

• Use equilibrium phases, 

• Use surface assemblages, 

• Use exchange, 

• Use gas phases, 

• Use solid solution, and 

• Use kinetics. 
Main Menu and Buttons: PHAST Options 

60

To use solute transport in a model, the checkbox labeled Use solute transport must be 

checked. If it is checked, the other options become enabled. A particular reactant will be used in 

the model if the checkbox next to it is checked. Note however, that even if a checkbox is 

unchecked, data sets related to that option still will be present in the Data Sets dialog box. (See p. 

41.) However, the data sets that are not used directly in the model will be shown in italics and with 

a light gray background. Data sets that are not used directly in the model can still be used in the 

formulas for other data sets and thus may still have an influence on the model. The user must 

define the reactants to be used in the chemistry data file and define their initial conditions in the 

appropriate data set for each type of reaction. 

The diffusivity in the model is specified in the edit box labeled Diffusivity. 

11.8.4 Solution Method Dialog Box 

The Solution Method dialog box is used to control which solver is used and to set the 

parameters for the solver. The Solution Method dialog box is displayed by selecting PHAST 

Options|Solution Method...

The user can select either the direct or iterative solver. For large problems, the iterative 

solver is more efficient. 

The user can choose to include cross dispersion terms by checking the appropriate 

checkbox. For problems where there is flow at an angle to the grid, including the cross-dispersion 

terms can lead to a more accurate solution at the cost of an increased execution time. However, the 

cross-dispersion terms can also lead to negative concentrations. These will be set to zero in the 

chemical calculations, which leads to global mass-balance errors. 

Edit boxes are available to set the space-differencing and time-differencing weighting. 

Space-differencing weighting and time-differencing weighting are important parameters because 

they help control the oscillation and numerical dispersion in the numerical solution. In general, 

centered-in-space and centered-in-time weightings (when both parameters are 0.5) reduces 

numerical dispersion, but can lead to oscillation of the solution. Upstream-in-space (space 

differencing = 0) and backwards-in-time (time differencing = 1) does not produce oscillations, but 

has more numerical dispersion (Parkhurst and others, 2004). 

If the iterative solver is used, a tolerance must be specified in the related edit box. The 

tolerance determines when the solver has converged to a solution to the difference equations. The 

tolerance must be sufficiently small to obtain an accurate solution. 

If the iterative solver is used, the number of search directions to be saved (Save Directions) 

between restarts of the iterative solver must be specified in the Save directions edit box. 

Sometimes iterative solvers cannot converge for a particular problem. The user specifies 

the maximum number of iterations that will be allowed before the solver quits in the Maximum 

iterations edit box. 

11.8.5 Steady Flow Dialog Box 

Some aquifer systems can be treated as being at steady state with regard to flow. In 

modeling such systems, a single flow-only simulation is performed at the beginning of the 

simulation and the flows from that simulation are used for all the transport simulations. The 

Steady Flow dialog box is used to specify this option and its associated parameters as listed below. 

The dialog box is shown by selecting PHAST Options|Steady Flow... 

• The steady-flow option is selected by checking the Steady flow checkbox. 
Main Menu and Buttons: PHAST Options 

61

• The user also specifies the Head tolerance in the Steady Flow dialog box. The Head tolerance 

is the maximum change in head for determining when flow is at steady state. 

• The user also specifies the Flow balance tolerance. The fractional flow balance must be less 

than the flow balance tolerance for the flow system to be at steady state. The fractional flow 

balance is the difference between the inflow and outflow rates divided by the average of the 

inflow and outflow rates for the current time step. 

• In the Iterations edit box, the user specifies the maximum number of time steps that will be 

used in attempting to attain a steady-flow condition. 

• The user also specifies the Minimum time step size. It is the initial time step used in 

calculating steady-state flow and also is the minimum time step allowed for automatic time 

stepping in the steady-state flow calculation. The default is the time-step length defined in the 

Time Control dialog box (see p. 61) divided by 1,000. 

• The user specifies the Maximum time step size in the related edit box. The maximum time 

step is the maximum time step used in the steady-state flow calculation. The default value is the 

time-step length defined in the Time Control dialog box (see p. 61) times 1,000. 

• The user specifies the Head change target in the related edit box. The head change target is 

the amount by which it is desired that the head will change during a single time step in the 

steady-flow calculation. The time step will be decreased or increased during the steady-flow 

calculation to try to achieve head changes of target over each time step. The default value is 0.3 

times the thickness of the grid region. 

11.8.6 Time Control Dialog Box 

The Time Control dialog box is used to specify how the time step size varies period-byperiod during the simulation. The Time Control dialog box is displayed by selecting PHAST 

Options|Time Control... The user species a Time step length and the Ending time when the 

time step length changes to another value or the simulation ends. The times entered in the Time 

Control dialog box do not need to be the same as the times entered in other parts of the model. 

GoPhast synthesizes all the times throughout the model and combines them to create the PHAST 

input file. 

11.8.7 Free Surface Dialog Box 

The Free Surface dialog box is used to specify whether or not a free surface (water table) is 

used in the model. The Free Surface dialog box is displayed by selecting PHAST Options|Free 

Surface... If a free surface will be used, the user can check the Use free surface checkbox to use 

the water table to define the initial head. If the free surface is used and the water table is used to 

define the initial head, the Initial_Water_Table data set is used to define the initial head. If a free 

surface is not used or if the water table is not used to define the initial head, the Initial_Head data 

set is used to define the head at each node. 

11.8.8 Print Initial Conditions Dialog Box 

The Print Initial Conditions dialog box is used to control printing of initial condition data 

to various output files. It is displayed by selecting PHAST Options|Print Initial... The data 

corresponding to each checkbox will be printed if the checkbox is checked. The files to which the 
Main Menu and Buttons: PHAST Options 

62

data will be saved are the same ones in which the corresponding data in the Print Frequency

dialog box (see “Print Frequency Dialog Box” on p. 62) are saved except for the following items 

that have no corresponding items in the Print Frequency dialog box. 

• The Echo input data are saved in the *.log file. (This option writes data from the flow and 

transport input file to the *.log file as each line is processed.) 

• The Fluid properties data are saved in the *.O.probdef file. 

• The Media properties data are saved in the *.O.probdef file. 

• The Solution method data are saved in the *.O.probdef file. 

11.8.9 Print Frequency Dialog Box 

The Print Frequency dialog box is used to specify the simulation times at which PHAST 

will generate output. To display the Print Frequency dialog box, select PHAST Options|Print 

Frequency...

The main part of the dialog box is occupied by a table listing the items that can be printed, 

the files to which they are printed, and the frequency with which they are printed. The Add, Insert, 

and Delete buttons are used to add, insert, or delete columns in the table. The Add button adds a 

new column at the end of the table. The Insert button inserts a new column before the selected 

column. The Delete button deletes the selected column. When a column is added to the table, the 

values in the new column will be the same as in the preceding column. When a column is inserted 

into the table, the values in the new column will be the same as in the column before which it was 

inserted. 

To enter a frequency, the user selects one of the choices for units from the drop down list of 

units for each type of output at each time. One of the choices for units is default. If that choice is 

selected, the units on the Title and Units dialog box (p. 59) will be used. If the units are set to end, 

the data will be saved at the end of the simulation period and no numeric value can be entered for 

time. If a numeric value is required, it is entered in the edit box before the units. 

At the bottom of the dialog box is the Save final heads checkbox. If this checkbox is 

checked, heads will be saved to the file *.head.dat at the end of the simulation. The file *.head.dat 

is an ASCII file that can be used for initial head conditions in subsequent simulations. Initial heads 

can be imported into GoPhast from the file using the File|Import|Distributed Data by Zone...

menu item (p. 35). 

The items specified in each row of the table are as follows. 

• Time represents the simulation time at which the remaining items in the column take effect. 

No units are specified for time. It is not required that a time match the times specified in other 

parts of the model. All the specified times in all parts of the model will be combined properly 

when preparing the PHAST input file. 

• Flow rates in boundary condition cells determines the frequency with which flow rates in 

boundary conditions cells are save to the *.O.bcf file. By default, they are not saved. 

• Components determines the frequency with which total chemical element (component) data for 

each cell are written to the *.O.comps file. 

• Conductance determines the frequency with which static fluid and transient solute dispersive 

conductances for each cell face are written to the *.O.kd file. 

• Flow balance determines the frequency with which flow-balance information is written to the 

*.O.bal file. 
Main Menu and Buttons: PHAST Options 

63

• Force chemistry print determines the frequency with which detailed chemical descriptions of 

the composition of the solution and all reactants for each cell are written to the *.O.chem file. 

Warning: this file could exceed file-size limits of the operating system because a long 

description of the chemistry in each cell is written for each selected time step. Writing this 

information may be useful for debugging, for small problems, or if the Print_Chemistry data 

set is used to limit the set of cells for which data are written. Data written to the file *.O.chem 

also can be limited by the options of the PRINT data block of the chemistry data file. 

• HDF chemistry determines the frequency with which chemistry data are written to the *.h5 

file. Chemistry data to be written to the file *.h5 are defined in the SELECTED_OUTPUT and 

USER_PUNCH data blocks of the chemistry data file. The *.h5 file is used by Model Viewer 

(Hsieh and Winston, 2002) when displaying data from PHAST models. 

• HDF heads determines the frequency with which heads are written to the *.h5 file. The *.h5 

file is used by Model Viewer when displaying data from PHAST models. 

• HDF velocities determines the frequency with which X, Y, and Z velocities are written to the 

*.h5 file. The *.h5 file is used by Model Viewer when displaying data from PHAST models. 

• Heads determines the frequency with which potentiometric heads are written to the *.O.head 

file. 

• Progress statistics determines the frequency with which solver statistics, including solutionmethod information, number of iterations, and maximum changes in head and component 

concentrations (due to transport) are written to the *.log file and to the screen. 

• Velocities determines the frequency with which interstitial velocities at cell boundaries and 

interpolated velocities at nodes are written to the *.O.vel file. 

• Wells determines the frequency with which transient well information, including fluid and 

solute flow rates, cumulative fluid and solute flow amounts, and solute concentrations, are 

written to the *.O.wel file. Data are written in the order of the well sequence numbers. 

• XYZ chemistry determines the frequency with which selected chemical data are written to the 

*.xyz.chem file. The SELECTED_OUTPUT and USER_PUNCH data blocks of the chemistry 

data file are used to select data that are written to the file prefix.xyz.chem. Cells for which 

results are to be written can be restricted with the Print_XYZ_Chemistry data set. 

• XYZ components determines the frequency with which component (chemical element) 

concentrations are written to the *.xyz.comps file. 

• XYZ heads determines the frequency with which heads are written to the *.xyz.head file. 

• XYZ velocities determines the frequency with which interpolated velocities at cell nodes are 

written to the *.xyz.vel file. 

• XYZ wells determines the frequency with which a time-series of concentrations for each well 

are written to the *.xyz.wel. 

• Boundary conditions determines whether heads, component concentrations, fluxes, and other 

boundary-condition information are written to the *.O.probdef file. The *.O.probdef file can be 

used to document the boundary conditions in a way that is easier for humans to read than are 

the model input files. 

See also: “Print Initial Conditions Dialog Box” on p. 61.
Main Menu and Buttons: PHAST Options 

64

11.9 Help 

The menu items under Help are listed in table 12. 

Table 12. Help Menu 

Menu Item Explanation 

Contents Show the contents page of the help system for GoPhast.

Help On Main Window Show help for the main window of GoPhast. 

Topic Search Search for a word in the GoPhast help.

Examples Show instructions for recreating examples. 

About... Shows the About box for GoPhast.

12. Examples 

The PHAST documentation (Parkhurst and others, 2004) includes four examples. This 

section describes how to create the transport input files for all but the third of those examples. This 

section also includes an example not represented among the examples distributed with PHAST. 

(The third example from the PHAST documentation does not show any features of GoPhast not 

illustrated with the other examples.) The complete GoPhast project files for the examples are 

included with GoPhast. In addition other GoPhast files are included. These example project files 

can be used to create the transport input files for the other examples included with PHAST. 

Some users may choose to use this manual be starting with this section. Such users would 

benefit from reading the “Basic Concepts” section on p. 3 first. 

12.1 Example 1 

Example 1 is described beginning on p. 85 of the PHAST documentation (Parkhurst and 

others, 2004). The flow and transport data file itself begins on p. 88. If PHAST is installed on a 

Windows computer at the default location, this file can be found at C:\Program Files\USGS\phast1.2\examples\ex1\ex1.trans.dat. To follow this example, the user should open this file in a text 

editor. For the most part, the various data sets will be specified in the same order in which they 

appear in the original input file. The one exception will be the grid. It will be specified before 

anything else.

The goals of this example are to: 

1. Create a simple model using GoPhast. 

2. Introduce setting default formulas for Data Sets in the Data Sets dialog box. 

3. Introduce creating objects. 

4. Introduce using objects to specifying boundary conditions. 

5. Introduce zooming in and out. 

6. Introduce visualizing data. 
Examples: Example 1

12.1.1 Creating the Grid 

1. Start GoPhast by double-clicking on its icon. The Start-Up dialog box shown in figure 27 will 

appear. If it is not already selected, select Create new model. Then click the Next button. 

Figure 27. GoPhast Start-Up dialog box. 

2. The Initial Grid dialog box will appear. Fill it in as illustrated in figure 28 and click the Finish

button. This will create the grid illustrated in the GoPhast main window (fig. 29). 

Figure 28. Initial Grid dialog box. 

65
Examples: Example 1

Figure 29. Initial appearance of GoPhast main window in Example 1. 

12.1.2 Phast Options 

3. Next, select PHAST Options|Title and Units... With ex1.trans.dat in a text editor, copy the 

title section to the clipboard and paste it into the Title section of the Title and Units dialog box 

(fig. 30). The title can be edited to remove the blank spaces, “#”and quote characters at the 

beginnings of the lines. If desired, a different title of the user’s choice can be specified. The 

dialog box can be resized so that more of the title is visible. Click OK to close the dialog box. 

Figure 30. Top section of the Title and Units dialog box showing the title for example 1. 

4. The next steps are to activate steady flow and solute transport. To do so, select PHAST 

Options|Steady Flow... and check the Steady flow checkbox. Then click OK and select 

PHAST Options|Chemistry Options... and check the Use solute transport checkbox. Click 

OK to close the dialog box. 

66
Examples: Example 1

5. Next change some of the default units. Select PHAST Options|Title and Units... again and 

this time specify the units as follows. (Those that are not listed can be ignored.) Click OK to 

close the dialog box. 

Item Units

Time units sec 

Horizontal grid units cm 

Vertical grid units cm 

Head units cm 

Hydraulic conductivity units cm/s 

Specific storage units 1/cm 

Dispersivity units cm 

6. The grid is one-dimensional so the model will be more efficient if the chemistry dimension is 

specified as X. Select PHAST Options|Grid Options... and change the chemistry dimensions 

to just X (fig. 31). Click OK to close the dialog box. 

Figure 31. Grid Options dialog box 

showing selection of just the X 

Chemistry dimensions. 

12.1.3 Data Sets 

7. The aquifer properties are constant so it is possible to use the default formulas for the data sets 

to specify those properties (fig. 32). Select Data|Edit Data Sets... to edit the data sets. Click 

the Help button and read about this dialog box. The default formulas should be as follows. 

When they have been entered, click OK to close the dialog box. 

Data Set Default 

Formula 

Kx 0.12

Ky 0.12

Kz 0.12

Porosity 0.1

Specific_Storage 0

Longitudinal_Dispersivity 0.1

Horizontal_Transverse_Dispersivity 0.1

Vertical_Transverse_Dispersivity 0.1

67
Examples: Example 1

Figure 32. Data Sets dialog box showing specifications of the aquifer properties. 

8. This model does not use a free surface. Select PHAST Options|Free Surface... and verify 

that a free surface is not used. Click OK to close the dialog box. 

12.1.4 Boundary Conditions 

There are two specified head boundaries. One is on the left end of the model and the other 

is on the right. The one on the left has a head of 1 and an associated solution with an index of 2 

from time 0 to time 60. For the rest of the duration of the model, it has an associated solution with 

an index of 1. The boundary on the right side has a head of 0.0 and an associated solution of 1. 

9. First zoom in on the left side of the model by selecting View|Zoom In and then clicking on the 

left side of the top view of the model (fig. 33). 

68
Examples: Example 1

Figure 33. Appearance of model in example 1 after zooming in on the 

left side of the top view of the model. 

10. The next step is to create the boundary condition on the left side of the model. Select 

Object|Create Straight Line. Click on the top view of the model and then click again to draw 

a line near the left end of the model (fig. 34). Double-click or push the Enter key on the 

keyboard to finish drawing the line. 

Figure 34. Drawing a line near the left side of the top view of the model. 

11. At this point the Object Properties dialog box will appear. Click the Help button and read 

about this dialog box. On the Properties tab, check the Nodes radio button. Then change to 

the Boundary Conditions tab and select the Specified head radio button. Change the Number 

of times (near the bottom left) to 2. Then fill in the table for the specified head boundary 

condition as illustrated in figure 35. This specified head boundary will have a Head of 1 for the 

duration of the model but its Associated solution will change from 2 to 1 after 60 seconds. The 

value for Head only needs to be specified once. 

69
Examples: Example 1

Figure 35. Object Properties dialog box showing how to set 

up the specified head boundary for the left side of the model. 

12. Click the OK button. A warning message will appear. Read the message and click the No

button. Then on the Properties tab, check the Set values of intersected nodes checkbox. Also 

check that the Higher Z-coordinate is 1 and the Lower Z coordinate is 0. This means that the 

line is a vertical surface with a top of 1 and a bottom of 0. Click the OK button again. That 

completes setting up the specified head boundary for the left side of the model. 

13. Click with the mouse on the 3D view of the model and drag with the mouse button held down 

to rotate the 3D view. Note that on the left side there is a black rectangle representing the 3D 

vertical surface (fig. 36).

Figure 36. Three dimensional view of model showing 

object on left side of model. 

14. The next step is to create the specified head boundary on the right side of the model (fig. 37). 

Select View|GoTo... and change to the Element tab. Uncheck the checkboxes for Front and 

Side. Change Column to 60 and click the OK button. The right end of the model should now 

be visible in the top view of the model. Again select Object|Create Straight Line and draw a 

70
Examples: Example 1

line on the right side of the top view of the model. Again select the Nodes radio button and 

check the Set values of intersected nodes checkbox. On the Boundary Conditions tab, select 

a Specified head boundary and set the Head to 0 for time 0 and the Associated solution to 1. 

Click the OK button. This Specified head boundary will have a Head of 0 for the duration of

the model and an Associated solution of 1. 

Figure 37. Drawing a line to represent a specified 

head boundary on the right side of the top view of the 

model. 

12.1.5 Initial Head 

15. The next step is to set the initial heads. The heads will vary uniformly from 1 on the left to 0 on 

the right. Select Data|Edit Data Sets... Select the row for Initial_Head. Note that the Use 

PHAST-style interpolation for all cells checkbox becomes enabled. Check this checkbox. 

Leave the Interpolation direction set to X. Set Distance 1 and Distance 2 to 0 and 12 

respectively. Set Value 1 to 1 and Value 2 to 0 (fig. 38). 

Figure 38. Data Sets dialog box showing how to set up a gradient in initial head. 

16. The next step is to set the initial conditions for chemistry. The solution, surface and kinetics 

will all have an initial index of 1. With the Data Sets dialog box still visible, set the formula for 

Chemistry_Initial_Solution, Chemistry_Initial_Surface, and Chemistry_Initial_Kinetics

each to 1. Click the OK button. 

71
Examples: Example 1

12.1.6 More PHAST Options 

17. To deactivate the other chemistry options, select PHAST Options|Chemistry Options... and 

uncheck the checkboxes for Use equilibrium phases, Use exchange, Use gas phases, and Use 

solid solution. Leave the other three checkboxes checked. Click OK to close the dialog box. 

Then select Data|Edit Data Sets... again. Note that the data for 

Chemistry_Initial_Equilibrium_Phases, Chemistry_Initial_Exchange, 

Chemistry_Initial_Gas_Phase, and Chemistry_Initial_Solid_Solutions are all now in italics 

with a light gray background indicating that they are not being used. Click OK to close the 

dialog box. 

18. The next step is to set up the solution method. Select PHAST Options|Solution Method... 

Click the Direct radio button and set the Space differencing and Time differencing both to 0.5 

(fig. 39). Click OK to close the dialog box. 

Figure 39. Solution Method dialog boxes showing how 

to set up the solution method for example 1. 

19. The model has a duration of 120 seconds with time steps lasting 0.4 seconds. Select PHAST 

Options|Time Control... and set the Time step length to 0.4 and the Ending time to 120 

(fig. 40). Click OK to close the dialog box. 

72
Examples: Example 1

Figure 40. Time Control dialog box showing how to 

set up the time control for example 1.

20. The final step in setting up the model is to set up the print frequency. Select PHAST 

Options|Print Frequency... The units of all the items that will be changed are seconds. For 

time 0 set HDF chemistry to 10 seconds and XYZ chemistry to 0 seconds. (The frequency 

edit box for HDF chemistry is initially disabled because the default unit is end. Changing the 

units to seconds will enable the frequency edit box.) Click the Add button to add another time 

at which to specify the print frequency. Resize the dialog box to completely show the new 

column. In the new column set the time to 60. Also set Force chemistry print to 60 seconds, 

Velocities to 60 seconds and XYZ chemistry to 60 seconds. Note that HDF chemistry for 

time = 60 has a value of 10 seconds. This value was copied from the previous time when the 

Add button was clicked. Click OK to close the dialog box. Select File|Save to save the model. 

12.1.7 Visualizing Data

21. The model is now ready to run. However, before running it, it is worthwhile to color the grid 

with some of the data sets to make sure the data have been applied properly. Select Data|Color 

Grid... and select the Initial_Head data set. Click the OK button. The model should appear 

similar to figure 41. Try using the Selection Cube for the side view of the model to change the 

selected column progressively from 1 to 61. The color displayed on the side view should 

change from red to blue. (See “The Selection Cube” on p. 9.) If the mouse cursor is over a 

colored cell or element on the top view of the model, the value of the data set for the colored 

element or cell will be displayed in the third panel of the status bar along with an explanation of 

how the value was assigned. It is possible to color the grid using the Specified_Head_Solution

data set at time 0 and time 60. 

73
Examples: Example 1

Figure 41. Main window showing the grid being colored by the Initial_Head data set. 

22. Now that the model has been set up, it is possible to run it. Select File|Export PHAST Input 

File. In the Save File dialog box, save the file as ex1.trans.dat. Then copy phast.dat and 

ex1.chem.dat from the examples distributed with PHAST to the location where ex1.trans.dat 

was saved. Open up a command prompt and change the directory to the location where 

ex1.trans.dat was saved. (On Windows, an easy way to do this is to type “cd ” in the command 

prompt window and then drag the directory from Windows Explorer. The directory name will 

be copied into the command prompt window. Then push the Enter button on the keyboard.) 

Run PHAST by typing “Phast ex1” in the command prompt window. When it is finished 

running, Model Viewer (Hsieh and Winston, 2002) can be used to display the results. (The 

capability of displaying PHAST results in Model Viewer was added by Scott R. Charlton.)

12.2 Example 2 

Example 2 is described beginning on p. 91 of the PHAST documentation (Parkhurst and 

others, 2004). The flow and transport data file itself is reproduced beginning on p. 94. If PHAST 

is installed on a Windows computer at the default location, this file can be found at 

C:\Program Files\USGS\phast-1.2\examples\ex2\ex2.trans.dat. 

The goals of this example are to: 

1. Introduce using objects to define the grid. 

2. Introduce PHAST-style interpolation. 

3. Introduce showing and hiding objects to reduce clutter. 

74
Examples: Example 2 

75

12.2.1 Initial Set Up 

1. Start GoPhast by double-clicking its icon. The Start-Up dialog box will appear. If it is not 

already selected, select Create new model. Click the Next button. 

2. The Initial Grid dialog box will appear. The grid in this example is too complex to create 

through Initial Grid dialog box so click the Do not create initial grid button. The grid will be 

created in a different way. 

3. In the main GoPhast window select PHAST Options|Title and Units... Copy the title from 

ex2.trans.dat to the clipboard and paste it in the title section or enter an appropriate title. Assign 

the following units. Then click the OK button to close the dialog box. 

Data Set Units 

Time units days 

Horizontal grid units meters 

Vertical grid units meters 

Head units meters 

Hydraulic conductivity units meters/day 

Specific storage units 1/meters 

Dispersivity units meters 

4. Activate solute transport by selecting PHAST Options|Chemistry Options... and checking the 

Use solute transport checkbox. Uncheck all the other checkboxes except for Use kinetics and 

click the OK button. 

12.2.2 Create the Grid with Objects 

The next step is to define the grid. In this case, objects will be used to define where the grid 

should be and the grid element sizes. (See “Using Objects to Specify the Grid” on p. 12.) The grid 

should be 100 m long in the X direction, 20.5 m wide in the Y, direction and 12.5 m high in the Z 

direction. The elements will be 4 m long in the X direction. The first row of elements will be 0.5 

m wide in the Y direction. The rest will be 1 m wide in the Y direction. The first layer will be 0.5 

m high in the Z direction. The rest will be 1 m high in the Z direction. 

The default view of the top view is zoomed out too far to draw an object of this size 

conveniently. Therefore select View|Zoom In and click on the top view until the size of the top 

view is appropriate. It is possible to use the menu items View|Go To... or View|Pan to position 

the top view so that the origin is included in the top view. 
Examples: Example 2

5. Select Object|Create Rectangle and click twice on the top view of the model to create a 

rectangle whose opposite corners are close to (0, 0) and (100, 20.5) (fig. 42). The locations do 

not need to be precise because they will be edited later. 

Figure 42. Creating a rectangle object in GoPhast. 

6. Change the Name of the object to “Domain_Outline” in the Object Properties dialog box 

(p. 49), check the Use to set grid element size checkbox, set the Grid element size to 4. 

Switch to the Vertices tab. On the Vertices tab, set the corners of the rectangle to be at (0, 0), 

(100, 0), (100, 20.5), (0, 20.5) and (0, 0). (The last vertex is a duplicate of the first one so that 

the object will be a closed polygon.) This object will be used to define the horizontal extent of 

the grid and set the size of grid elements in the X direction to 4 meters. However, more needs 

to be done to define the grid. Click OK to close the dialog box. 

7. It will be easier to see the grid on the front and side views of the model if the vertical 

exaggeration is decreased. Change the vertical exaggeration from 20 to 1. (Select 

View|Vertical Exaggeration... and enter “1.”) Then, on the front view of the model, zoom in 

and draw a line object from approximately (-1, 0.5) to (-1, 12.5). In the Object Properties

dialog box, change its name to “Z_Discretization”, check the Use to set grid element size

checkbox, and set the Grid element size to 1. On the Vertices tab, edit the position of the 

vertices so that the Z-coordinates are exactly 0.5 and 12.5. This object will help define the 

vertical extent of the grid and set the height of the layers to 1 m. Click OK to close the dialog 

box. 

8. Draw another line object on the front view from about (-2, 0) to (-2, 0.5). In the Object 

Properties dialog box, change its name to “Z_Discretization_Bot_Layer”, check the Use to set 

grid element size checkbox, and set the Grid element size to 0.5. On the Vertices tab, edit the 

position of the vertices so that the Z-coordinates are exactly 0 and 0.5. This object will define 

the position of the bottom layer of the grid. Click OK to close the dialog box. 

9. Draw another line object on the top view. It should extend from approximately (105, 0) to 

(105, 0.5). In the Object Properties dialog box, change its name to 

“Y_Discretization_First_Row”, check the Use to set grid element size checkbox, and set the 

Grid element size to 0.5. On the Vertices tab, edit the position of the vertices so that the Ycoordinates are exactly 0 and 0.5. This object sets the width of the first row in the Y direction. 

Click OK to close the dialog box. 

10. Draw another line object on the top view. It should extend from approximately (110, 0) to 

(110, 20.5). In the Object Properties dialog box, change its name to “YDensity” check the 

Use to set grid element size checkbox, set the Grid element size to 1. On the Vertices tab, 

edit the position of the vertices so that the Y-coordinates extend at least from 0 to 20.5. This 

76
Examples: Example 2 

77

object defines the width of the rows in the Y direction. Because it is not a polygon, and it is on 

the top view of the model, it does not define the location of the grid but only the grid element 

size. (Polylines on the front view of the model do define the vertical extent of the grid. This 

object overlaps in the Y direction with the previous object (step 9). They both set the grid 

element size but because the previous object sets a smaller value, the previous object wins out. 

Click OK to close the dialog box. 

11. There are now a sufficient number of objects to define the desired grid. Choose Grid|Generate 

Grid... and click the OK button to create the grid. Note that the first row and bottom layer are 

smaller than the others. They are smaller than the other rows and layers because the 

“Z_Discretization_Bot_Layer” (step 8) and “Y_Discretization_First_Row” (step 1) objects 

specified smaller element sizes than the “Z_Discretization” (step 7) and “YDensity” (step 10) 

objects respectively. Also note that all the elements are longer in the X direction than in the Y 

direction. This is because the “YDensity” object (step 10) specified a smaller element size than 

the “Domain_Outline” (step 6) object. To check that the grid has the correct dimensions, select 

Grid|Specify Grid Lines... and compare the grid line positions to what they should be based on 

the description at the start of this section. 

12.2.3 Data Sets 

12. Select Data|Edit Data Sets... and enter the follow for the default formulas. Leave the Data 

Sets dialog box (p. 42) open. 

Data Set Default 

Formula 

Kx 2 

Ky 2 

Kz 2 

Porosity 0.1 

Specific_Storage 0 

Longitudinal_Dispersivity 1.5 

Horizontal_Transverse_Dispersivity 0.45 

Vertical_Transverse_Dispersivity 0.15 

Chemistry_Initial_Solution 1 

Chemistry_Initial_Kinetics 1 

13. The next step is to set the initial heads. The heads will vary uniformly from 1 on the left to 0 on 

the right. Select the row for Initial_Head. Note that the Use PHAST-style interpolation for 

all cells checkbox becomes enabled. Check this checkbox. Leave the Interpolation direction 

set to X. Set Distance 1 and Distance 2 to 0 and 100 respectively. Set Value 1 to 1 and 

Value 2 to 0. Click OK to close the dialog box. 

12.2.4 Boundary Conditions 

14. The next step is to define the specified head boundaries. On the side view of the model, draw a 

polygon completely surrounding the grid. In the Object Properties dialog box, select the 

Nodes radio button. Set the Name of the object to “Left_Specified_Head_Boundary”, and 

check the Set values of intersected nodes checkbox. Set Associated third dimension 

formulas to One. Leave X-coordinate set at 0. On the Boundary Conditions tab, select a 

Specified head boundary. Change the Type of solution to Specified solution. In the table 
Examples: Example 2

enter a value of 1 for both Head and Specified solution (fig. 43). Click OK to close the dialog 

box. 

Figure 43. Object Properties dialog box. Specified head boundary condition. 

15. Now color the grid (Data|Color Grid...) with the specified head. The left end of the model 

should be specified head cells. 

16. Right-click on the side view of the model and select Hide from the popup menu to hide the 

previous object. (The object must be selected.) Hiding an object does not deactivate it; it just 

makes the Working Area less cluttered. On the side view of the model, draw another polygon 

completely surrounding the grid. In the Object Properties dialog box, select the Nodes radio 

button. Set its name to “Right_Specified_Head_Boundary.” Check the Set values of 

intersected nodes checkbox. Set Associated third dimension formulas to One. Set Xcoordinate to 100. On the Boundary Conditions tab, select a Specified head boundary. 

Leave the Type of solution at Associated solution. In the table enter a value of 0 for Head

and 1 for Associated solution. Click OK to close the dialog box. Now both the left and right 

ends of the model should be specified head boundaries. 

17. Hide all the objects created so far by selecting Object|Show or Hide Objects... Then in the 

dialog box, uncheck the checkbox for All Objects. If desired, click Close to close the dialog 

box. 

18. The next step is to create a specified concentration boundary on the left end of the model. On 

the side view of the model, draw another polygon. This should enclose only part of the grid. It 

should extend from approximately (Y’, Z) = (15, 10) to (21, 13) (fig. 44). In the Object 

78
Examples: Example 2

Properties dialog box, select the Nodes radio button. Set its name to 

“Specified_Concentation_Boundary.” Check the Set values of enclosed nodes checkbox. Set 

Associated third dimension formulas to One. Leave the X-coordinate set to 0. On the 

Boundary Conditions tab, select a Specified head boundary. Change the type of solution to 

Specified solution. In the table enter a value of 1 for Head and 2 for Specified solution. Click 

OK to close the dialog box. Now color the grid with the Specified_Head_Solution (fig. 44). 

The left end of the model should be specified head cells. The cells with a specified head 

solution of 1 will be colored red and those with a specified head solution of 0 will be colored 

blue. 

Figure 44. Location of the specified concentration 

boundary. The grid has been colored by the specified 

head solution. 

12.2.5 PHAST Options 

19. Set the following options for the solution method (PHAST Options|Solution Method...). 

Solution Option State

Solver Iterative

Use cross dispersion unchecked 

Space Differencing 0.5 

Time Differencing 0.5 

Tolerance 1e-14

20. Set the following options for print frequency (PHAST Options|Print Frequency...). 

Print Frequency Option Value

HDF chemistry 400 days 

Velocities 400 days

XYZ chemistry 400 days 

XYZ heads 400 days 

XYZ velocities 400 days

79
Examples: Example 2 

80

21. Set the time control to a time step size of 10 and ending time of 400 (PHAST Options|Time 

Control...). 

22. Save the project by selecting File|Save. Then run the model in the same way as in example 1 

except that the file name should be ex2.trans.dat and the other files should come from the ex2 

folder.

12.3 Example 3 (Example 4 in PHAST) 

Example 4 in PHAST is described beginning on p. 103 of the PHAST documentation 

(Parkhurst and others, 2004). The flow and transport data file itself is reproduced beginning on p. 

107. If PHAST is installed on a Windows computer at the default location, this file can be found at 

C:\Program Files\USGS\phast-1.2\examples\ex4\ex4.trans.dat. 

The goals of this example are to: 

1. Create a model using more complex boundary conditions including rivers and wells. 

2. Introduce using objects to specify the spatial distribution of data sets. 

3. Introduce the use of the Formula Editor. 

4. Illustrate use of GoPhast for displaying the spatial distribution of values in data sets and 

boundary conditions. 

12.3.1 Initial Set Up 

1. Start GoPhast as before. In the Initial Grid dialog box, set the number of nodes in the X, Y, 

and Z directions to be 16, 9, and 5 respectively. Set the distance between nodes in the X, Y, 

and Z directions to be 6000, 6000, and 100 respectively. Click the Finish button to close the 

dialog box. 

2. In the main GoPhast window select PHAST Options|Title and Units... Copy the title from 

ex4.trans.dat to the clipboard and paste it in the title section. Assign the following units. Then 

click the OK button. 

Option Units 

Time units years 

Horizontal grid units meters 

Vertical grid units meters 

Head units meters 

Hydraulic conductivity units meters per second 

Specific storage units 1/meters 

Dispersivity units meters 

Flux units meters per year 

Leaky hydraulic conductivity units meters per second 

Leaky thickness units meters 

Well diameter units inches 

Well flow rate units liters/day 

River bed hydraulic conductivity units meters per second 

River bed thickness units meters 

3. The next step is to activate the chemistry options. Select PHAST Options|Chemistry 

Options... Check the Use solute transport checkbox. Uncheck the Use gas phases, Use solid 

solution, and Use kinetics checkboxes. Click the OK button. 
Examples: Example 3 (Example 4 in PHAST) 

81

4. Set the Steady Flow options by selecting PHAST Options|Steady Flow... and checking the 

Steady flow checkbox. Change the Head tolerance to 1E-6 and click the OK button. 

5. Select PHAST Options|Free Surface... and check the Use free surface checkbox. Click the 

OK button to close the dialog box. 

12.3.2 Data Sets 

6. Select Data|Edit Data Sets... and enter the following values for the default formulas. 

Data Set Default 

Formula 

Kx 1.5E-5 

Ky 1.5E-5 

Kz 1.5E-7 

Porosity 0.22 

Specific_Storage 0 

Longitudinal_Dispersivity 2000 

Horizontal_Transverse_Dispersivity 50 

Vertical_Transverse_Dispersivity 50 

Initial_Head 380 

Chemistry_Initial_Solution 2 

Chemistry_Initial_Equilibrium_Phases 2 

Chemistry_Initial_Surface 2 

Chemistry_Initial_Exchange 2 

7. In this example, the bottom layer to the right of an X coordinate of 48000 is inactive. To set 

this, first draw an object on the top view of the model enclosing this area (fig. 45). In the 

Object Properties dialog box, leave the Elements radio button checked, set the object’s Name

to “Inactive_Area”, check the Set values of enclosed elements checkbox and set the Higher Zcoordinate to 100. On the Data Sets tab, check the checkbox for Active and set the formula to 

“False.” After closing the Object Properties dialog box, color the grid with the Active data set 

and set the selected layer to the bottom layer. Check that the inactive area is restricted to the 

bottom layer (fig. 45). Using the mouse cursor, right click on the top view of the model and 

select Hide to hide the “Inactive_Area” object. 
Examples: Example 3 (Example 4 in PHAST)

Figure 45. Active (blue) and inactive (red) areas in example. 

12.3.3 Rivers 

8. This model has three rivers: the Little River, the North Fork River and the North Canadian 

River. The Little River is defined by a polyline object with vertices at (44000., 15000.), 

(44000., 0.), and (90000., 0.). Draw a polyline object on the top view of the model at 

approximately those locations. (When drawing the object, it is possible to see the current 

location of the cursor in the status bar.) In the Object Properties dialog box, select the Nodes

radio button. Change the Name of the object to “Little_River.” Check the Set values of 

intersected nodes checkbox. Then go to the Vertices tab and correct the locations of the 

vertices to be exactly correct. 

On the Boundary Conditions tab, select a River boundary, and set the following 

properties. 

River Property Value 

Name Little River

Hydraulic Conductivity 1

Width 200

Depth 1

Bed Thickness 1 

9. In the table for the river boundary set the Associated solution to 1. The head must vary along 

the length of the river. A formula can be used to accomplish this. Click on the cell in the table 

for head and observe the F() button that appears. Click it. This will open the Formula Editor. 

Click the Help button and read about this dialog box. 

10. The head in Little River should vary from 335 at the upstream end to 275 at the downstream 

end. The Interpolate or MultiInterpolate functions can be used to achieve this goal. On the 

82
Examples: Example 3 (Example 4 in PHAST)

right side of the Formula Editor, click on the “+” next to Functions to display the types of 

functions that are available. Then click on the “+” next to Math to display all the math 

functions. Click on MultiInterpolate in this list. Then click the Function Help button. The 

default web browser will open and display help on the MultiInterpolate function. Read the 

description of the MultiInterpolate function to learn what it does. Go back to the Formula 

Editor and double-click on MultiInterpolate. Note that MultiInterpolate appears in the 

formula text box along with its parameters. Go back to the List of Data Sets and Functions 

and click on the “-” next to Math and then click on the “+” next to Object. Select 

FractionOfObjectLength and click on the Function Help button again. Read the description 

of what FractionOfObjectLength does. FractionOfObjectLength will be used as the first 

parameter in MultiInterpolate in the Formula text box of the Formula Editor. Select 

“Position” in the Formula text box and double-click on FractionOfObjectLength. Next 

substitute 335 and 275 for “Value1” and “Value2” respectively. Substitute 0 and 1 for 

“Distance1” and “Distance2” respectively. Remove the extra square brackets and dots so that 

the final formula is “MultiInterpolate(FractionOfObjectLength, 335., 0., 275., 1.).” Click OK

to close the Formula Editor and then click OK again to close the Object Properties dialog 

box. 

11. The North Fork River is entered in the model in a similar fashion. The coordinates of its 

vertices are (30000, 36000), (30000, 48000), and (90000, 48000). Its Hydraulic Conductivity, 

Width, Depth, Bed Thickness, and Associated Solution are all the same as in the Little River. 

The heads at the upstream and downstream ends are 335 and 280 respectively so the formula 

for head is “MultiInterpolate(FractionOfObjectLength, 335., 0., 280., 1.).” 

12. The North Canadian River is entered in the model in a similar fashion. The coordinates of its 

vertices are (60000, 30000), and (90000, 20000). Its Hydraulic Conductivity, Width, Depth, 

Bed Thickness, and Associated Solution are all the same as in the Little River. The heads at 

the upstream and downstream ends are 350 and 305 respectively so the formula for head is 

“MultiInterpolate(FractionOfObjectLength, 350., 0., 305., 1.).” 

13. Try coloring the grid (Data|Color Grid...) with the River_Head (fig. 46). 

Figure 46. The top view of the model with grid cells 

colored to reflect the river head in example 3. The 

river objects are shown with red lines. 

12.3.4 Specified Flux Boundaries 

14. The next boundary condition is a specified flux boundary. It occupies the entire top layer to the 

right of 30000 except for the first and last rows. Draw a polygon that encloses this area 

83
Examples: Example 3 (Example 4 in PHAST)

(fig. 47). In the Object Properties dialog box, select the Nodes radio button. Set its Name to 

“Flux_Boundary.” Check the Set values of enclosed nodes checkbox. Set the number of 

Associated third dimension formulas to One and set Z-coordinate to 400. On the Boundary 

Conditions tab, choose a Flux boundary. Set the Flux for time 0 to –0.055 and set the 

Associated solution to 1. Click OK to close the dialog box. It is possible to color the grid with

Top_Flux_Boundary_Flux to make sure the boundary condition was applied properly. 

Figure 47. Polygon used to define specified flux boundary in example 3. 

15. The next boundary condition is a specified head boundary (Lake Stanley Draper, figure 48). 

On the top view of the model, it looks like the lake only affects one node. However, it actually 

extends from an elevation of 300 to 400. Thus, it affects two nodes: one in the top layer and 

one in the layer just beneath it. Draw a polygon surrounding the node at (30,000, 18000) on the 

top view of the model. In the Object Properties dialog box, select the Nodes radio button. Set 

its Name to “Lake_Stanley_Draper.” Check the Set values of enclosed nodes checkbox. Set 

the Higher Z-coordinate to 400 and the Lower Z-coordinate to 300. On the Boundary 

Conditions tab, select a Specified head boundary and set the Head to 348 and the Associated 

solution to 1. Click OK to close the dialog box. 

Figure 48. Polygon used to specify the specified head 

boundary condition in example 3. 

84
Examples: Example 3 (Example 4 in PHAST)

12.3.5 Leaky Boundaries 

There are two leaky boundaries in the model. Both are in the XZ plane so they are drawn 

on the front view of the model. One is at the front of the model and extends from the left edge 

of the model to an X-coordinate of 39000. The other is at the back of the model and extends 

from the left of the model to an X-coordinate of 29000. Both leaky boundaries extend over the 

whole extent of the model in the Z direction. 

16. For the front boundary draw a rectangle on the front view of the model that goes from the left 

edge to approximately 39000 and that covers the entire height of the model (fig. 49). In the 

Object Properties dialog box, select the Nodes radio button. Set its Name to 

“Front_Leaky_Boundary.” Check the Set values of enclosed nodes checkbox. Set the 

Associated third-dimension formulas to One. Set the Y-coordinate to 0. On the Boundary 

Conditions tab, select the Leaky boundary, set the Hydraulic conductivity to 1.5e-5, the 

Thickness to 20000, the Head to 320 and the Associated solution to 2. Click OK to close the 

dialog box. 

Figure 49. Polygon used to specify the leaky boundary 

on the front view of the model in example 3. 

17. For the back boundary draw a rectangle on the front view of the model that goes from the left 

edge to approximately 29000 and that covers the entire height of the model. In the Object 

Properties dialog box, select the Nodes radio button. Set its Name to 

“Back_Leaky_Boundary.” Check the Set values of enclosed nodes checkbox. Set the 

Associated third-dimension formulas to One. Set the Y-coordinate to 48000. On the 

Boundary Conditions tab, select the Leaky boundary, set the Hydraulic conductivity to 

1.5e-5, the Thickness to 30000, the Head to 305, and the Associated solution to 1. Click OK

to close the dialog box. 

85
Examples: Example 3 (Example 4 in PHAST)

18. The next boundary condition is a well located at (X, Y) = (12000, 36000). Make a point object 

on the top view of the model at that location (fig. 50). In the Object Properties dialog box, 

select the Nodes radio button and Name the object “Well.” Check the Set values of 

intersected nodes checkbox. On the Boundary Conditions tab, select the Well boundary, set 

the Diameter to 2, the First elevation to 90, the Second elevation to 110, the Pumping rate to 

1, the and the Solution to 1. Make sure the Allocate by pressure and mobility checkbox is 

unchecked. Click OK to close the dialog box. 

Figure 50. Point object used to specify well boundary in example 3. 

12.3.6 PHAST Options 

19. The Solution Method options will be left at the default values. Select PHAST 

Options|Solution Method... Verify that an Iterative solver is selected, Space differencing is 

0, Time differencing is 1, and the Tolerance is 1e-10. Click OK to close the dialog box. 

20. Next, set the Print Initial options. Select PHAST Options|Print Initial... Check the Steady 

flow velocities, XYZ heads, and XYZ steady flow velocities checkboxes. Click OK to close 

the dialog box. 

21. Next set the Print Frequency. Select PHAST Options|Print Frequency... Change XYZ 

chemistry to “50000 years”, HDF chemistry to “2000 years”, and XYZ wells to “2000 years.” 

Change the rest to “0 default” Check the Save final head in *.head.dat checkbox at the lower 

left. Click OK to close the dialog box. 

22. To set the time control, select PHAST Options|Time Control... and set the Time step length

to 2000 and the Ending time to 100000. Click OK to close the dialog box. 

23. The last step is to turn off the printing of the chemistry for the bottom layer. To do this, draw a 

polygon entirely surrounding the grid on the top view of the model. In the Object Properties

dialog box, select the Nodes radio button. Set the Name to “Deactivate_Printing.” Check the 

Set values of enclosed nodes checkbox. Set the number of Associated third dimension 

formulas to One and set Z-coordinate to 0. On the Data Sets tab, check the checkbox for 

Print_XYZ_Chemistry and change the formula for it to “0.” Click OK to close the dialog 

box. 

It is now possible to export the transport data file as ex4.trans.dat, run the model and view 

the results as with the previous examples.

86
Examples: Example 4 (Biscayne Bay Aquifer) 

12.4 Example 4 (Biscayne Bay Aquifer) 

87

This example is a simplified model of the Biscayne Bay aquifer in southeast Florida. An 

upper aquifer and a lower aquifer are included in the model: 

Data for this problem are in several shape files provided with GoPhast in the 

Examples\Biscayne directory: InitialWaterTable.shp, LowerAquiferBottom.shp, 

UpperAquiferBottom.shp, and UpperAquiferTransmissivity.shp. Each of these files also has 

associated with it two other files with the extension .shx and .dbf. The names of the shape files 

reflect the data contained within them. These shape files will be imported into GoPhast and used to 

set the hydraulic conductivity, active area, and initial water table of the model. A specified head 

boundary will be specified on the coastline, and a specified flux boundary (recharge) will be 

specified for the entire upper surface. 

The goals of this example are the following: 

1. Illustrate importing data from external files. 

2. Illustrate use of formulas for specifying the geometry of geologic units. 

3. Illustrate use of formulas for specifying aquifer properties tied to geologic units. 

4. Illustrate the effects of different interpolation methods. 

12.4.1 Initial Set Up 

1. Start GoPhast. Select Create new model. Click the Next button. 

2. Click the Do not create initial grid button. 

3. Select PHAST Options|Title and Units... Change all the units to use feet and days except for 

flux, which should be set to inches per year. Click OK to close the dialog box. 

4. Select PHAST Options|Time Control... Change Time step length to 10 and Ending time to

3500. Click OK to close the dialog box. 

5. Select PHAST Options|Print Frequency... Change HDF Heads to 1 step. (You must 

specify step in the right-hand column before the numeral can be specified.) Click OK to close 

the dialog box. 

12.4.2 Creating New Data Sets 

For this example, five user-defined data sets will be created. Four of them will be used for 

working with imported data. The fifth will be used for the hydraulic conductivity of the upper 

aquifer. This final data set will be used in conjunction with the geometry of the aquifers to help 

specify the hydraulic conductivity distribution. 

6. Select Data|Edit Data Sets...

7. Click the Add button and name the new data set “Imported_Water_Table.” Leave everything 

else the same. 

8. Click the Add button and name the new data set “Upper_Aquifer_Bottom.” Leave everything 

else the same. 

9. Click the Add button and name the new data set “Lower_Aquifer_Bottom.” Leave everything 

else the same. 

10. Click the Add button and name the new data set “Upper_Aquifer_Transmissivity.” Leave 

everything else the same. 
Examples: Example 4 (Biscayne Bay Aquifer)

11. Click the Add button and name the new data set “Upper_Aquifer_Kx.” Leave everything else 

the same. Click the OK button to close the Data Sets dialog box. 

12.4.3 Importing Data 

12. Select File|Import|Shapefile... Select InitialWaterTable.shp and click the Open button. The 

Import Shapefile dialog box will appear. In the table at the top of the dialog box, check the 

checkbox next to ZVALUE and change the data set to “Imported_Water_Table.” In the lower 

half of the dialog box, check the Set values of elements by interpolation checkbox. Click the 

OK button to import the Shapefile (One object in the shapefile will not be imported because it 

crosses itself. When the warning message appears, click Yes to continue.) 

13. The shapes do not appear on the screen because the area that is shown does not include them. 

To easiest way to move the screen area to the objects is to select View|Go To... In the Go To

dialog box, select the Object tab, select the first object and click the OK button. 

14. Only a small part of one object will be visible. To show more, first maximize GoPhast and then 

select View|Zoom Out and click several times on the top view of the model (figure 3 on p. 8) 

until all the objects are visible (fig. 51). Nothing more needs to be done with them for the time 

being, so hide these object (Right click on the top view of the model and select Hide from the 

pop-up menu. 

Figure 51. Imported initial water table, Biscayne Bay 

aquifer example. 

15. Select File|Import|Shapefile... Select LowerAquiferBottom.shp and click the Open button. 

In the table at the top of the dialog box, check the checkbox next to ZVALUE and change the 

data set to “Lower_Aquifer_Bottom.” In the lower half of the dialog box, check the Set values 

of elements by interpolation checkbox. Click the OK button to import the Shapefile. Hide 

these objects in the same way as before. 

16. Select File|Import|Shapefile... Select UpperAquiferBottom.shp and click the Open button. 

In the table at the top of the dialog box, check the checkbox next to ZVALUE and change the 

data set to “Upper_Aquifer_Bottom.” In the lower half of the dialog box, check the Set values 

of elements by interpolation checkbox. Click the OK button to import the Shapefile. Hide 

these objects in the same way as before. 

17. Select File|Import|Shapefile... Select UpperAquiferTransmissivity.shp and click the Open

button. In the table at the top of the dialog box, check the checkbox next to ZVALUE and 

88
Examples: Example 4 (Biscayne Bay Aquifer)

change the data set to “Upper_Aquifer_Transmissivity.” In the lower half of the dialog box, 

check the Set values of elements by interpolation checkbox. Click the OK button to import 

the Shapefile. 

12.4.4 Generating the Grid 

18. The next step is to draw a domain outline around the area to be modeled. Select Object|Show 

or Hide Objects... Check the checkbox next to All Objects so that all objects are visible. 

Select Object|Create Polygon and draw a polygon on the top view of the model that roughly 

surrounds all the objects (fig. 52). In the Object Properties dialog box, set the Name to 

“Domain_Outline“, check Use to set grid element size and set the Grid element size to 2500. 

Click OK to close the Object Properties dialog box. It is no longer necessary to see the 

imported objects so in the Show or Hide Objects dialog box, uncheck the checkbox next to 

Data Sets to hide them all. (It may be necessary to display the Show or Hide Objects dialog 

box if it is hidden behind the main GoPhast window.) 

Figure 52. Domain outline for Biscayne Bay aquifer 

model. 

19. To define the vertical extent and element size of the grid, draw a vertical line object on the front

view of the model (figure 3 on p. 8) using Object|Create Straight Line. The model extends 

from 9 to -271 feet so when the Object Properties dialog box appears set the Z coordinates to 

9 and -271 in the Vertices tab. Set the Name of the object to “Side_Domain_Outline.” Check 

Use to set grid element size and set the Grid element size to 28. Click OK to close the dialog 

box. 

20. To create the grid (fig. 53), select Grid|Generate Grid, uncheck Calculate grid angle 

automatically and click the OK button. 

89
Examples: Example 4 (Biscayne Bay Aquifer)

Figure 53. Grid in Biscayne Bay aquifer example. 

12.4.5 Using Formulas to Define Aquifer Properties 

21. Only the portion of the aquifer within the domain outline and above the bottom of the lower 

aquifer should be active. The first step in making the correct elements active is to make the 

default formula for the Active data set “False” for all of the elements. To do this select 

Data|Edit Data Sets... and change the formula for the Active data set from “True” to “False.” 

22. After clicking OK to close the Data Sets dialog box, double click on the “Domain_Outline” 

object. In the Object Properties dialog box, check Set values of enclosed elements, and 

change Higher Z-Coordinate to 9 and Lower Z-Coordinate to -271. On the Data Sets tab, 

check the Affects checkbox for Active and click once in the Formula cell of the table for the 

Active data set. A button labeled F() will appear. Click it to display the Formula Editor. 

Change the formula to “Z > Lower_Aquifer_Bottom.” (Z is found under Functions|GIS and 

Lower_Aquifer_Bottom is found under Data Sets.) This formula will evaluate to True for all 

elements whose centers are above the bottom of the lower aquifer. Click OK to close the 

Formula Editor and OK again to close the Object Properties dialog box. To check whether 

the Active data set is being set properly, select Data|Color Grid..., select the Active data set, 

and click OK. Click on the Selection cube for the top view of the model to change the selected 

layer and see the values of the Active data set in each layer (fig. 54). To view the Active data 

set in the 3D view, it is convenient to show only the elements in which Active is true. To do so, 

select Data|Color Grid... again, set the lower limit to “True” and click OK. Only the elements 

for which the Active data set is true will be colored.

90
Examples: Example 4 (Biscayne Bay Aquifer)

Figure 54. Active data set in the top layer of the 

Biscayne Bay aquifer model. 

23. The next step is to define the hydraulic conductivity of the upper aquifer. This can be 

calculated from the data that have been imported by dividing the transmissivity by the saturated 

thickness. The saturated thickness is just the imported initial water table minus the bottom of

the upper aquifer. To make this calculation, select Data|Edit Data Sets... Select the default 

formula for the Upper_Aquifer_Kx data set and display the Formula Editor. Set the formula 

to 

Upper_Aquifer_Transmissivity / (Imported_Water_Table - Upper_Aquifer_Bottom) 

and click OK. 

24. The next step is to use this hydraulic conductivity to help set the distribution of the Kx data set 

used by PHAST. Select the default formula for the Kx data set and display the Formula 

Editor. Set to formula to 

If(Z > Upper_Aquifer_Bottom, Upper_Aquifer_Kx, 20) 

(This formula assigns a value of 20 to the hydraulic conductivity of the lower aquifer.) If can 

be found under Functions|Logical. Z can be found under Functions|GIS. 

“Upper_Aquifer_Bottom” and “Upper_Aquifer_Kx” can be found under Data Sets. Click OK

to close the Formula Editor and click OK again to close the Data Sets dialog box. Try coloring 

the grid by the Kx data set. It may take a few seconds for the screen to be refreshed because 

Kx needs to be calculated. 

25. The hydraulic conductivity in the Y direction (Ky) will be to the hydraulic conductivity in the 

X direction. The hydraulic conductivity in the Z direction (Kz) will be set to the hydraulic 

conductivity in the X direction divided by 10. To set these values, select Data|Edit Data 

Sets... Select the default formula for the Ky data set. Set its formula to “Kx” and click OK. 

Select the default formula for the Kz data set. Set its formula to “Kx / 10.” and click OK. 

Click OK to close the Data Sets dialog box. 

12.4.6 Boundary Conditions 

Two boundary conditions will be defined in this model: a specified head of zero on the 

eastern edge of the model (the ocean), and a specified flux of 4 inches per year through the top of 

the model (recharge). 

91
Examples: Example 4 (Biscayne Bay Aquifer)

26. To define the specified flux boundary, select Object|Create Rectangle and draw a rectangle 

that completely encloses the top view of the model. ). In the Object Properties dialog box, 

change Evaluated At to Nodes, change the Name to “Specified_Flux”, check Set values of 

intersected nodes, change Associated third dimension formulas to One, and change ZCoordinate to “9.” On the Boundary Conditions tab, select Flux boundary and change the 

Flux for time zero to -4. (The flux is negative because it is downward. Click OK to close the

Object Properties dialog box. 

27. To define the specified head boundary, select Object|Create Line and draw a poly line on the 

eastern edge of the model (fig. 55). In the Object Properties dialog box, change Evaluated At

to Nodes, change the Name to “Specified_Head”, and check Set values of intersected nodes. 

On the Boundary Conditions tab, select Specified Head and change the Head for time zero to 

0. Click OK to close the Object Properties dialog box. Try coloring the grid by the two 

boundary conditions (Specified_Head and Top_Flux_Boundary_Flux) to make sure they are 

applied properly. 

Figure 55. Object representing a specified head 

boundary (in red) in the Biscayne Bay aquifer model. 

12.4.7 Initial Conditions 

In this model the water table will be used as the initial conditions. However, the imported 

water table data can’t be used because they applies only to elements. They must be imported a 

second time and applied to nodes. 

28. The first step is to activate the water table. Select PHAST Options|Free Surface... Check 

both checkboxes and click OK to close the dialog box. 

29. Because the data for the initial water table will be specified by interpolating among data points, 

an interpolation algorithm must be selected for the Initial_Water_Table data set. Select 

Data|Edit Data Sets... and select Nearest as the interpolation algorithm for the 

Initial_Water_Table layer. Click OK to close the dialog box. 

92
Examples: Example 4 (Biscayne Bay Aquifer)

30. Select File|Import|Shapefile... and select “InitialWaterTable.shp.” In the Import Shapefile

dialog box. Check the checkbox for “ZVALUE”, change Evaluated At to Nodes, and check 

Set values of nodes by interpolation. Set the Data Set for “ZVALUE” to 

Initial_Water_Table. (You must set Evaluated At first before you can set the Data Set for 

“ZVALUE.” Click OK to close the dialog box. When the warning message appears, click Yes

to continue.

12.4.8 Running the Model 

31. Select File|Export PHAST Input File. Accept the default name and click the Save button. 

Then open a command line prompt and run PHAST with the input file you just created. If you 

wish, use Model Viewer to display the results. 

12.4.9 Variations 

This example uses interpolation for several user-defined data sets. Several different 

interpolation algorithms are available in GoPhast. In this section, the effects of changing the 

interpolation algorithm will be explored. To do this, the grid will be colored using the Kx data set 

and then the interpolation algorithm for several user-defined data sets will be changed to see how 

that affects the results. The user may not get identical results to those illustrated for the Nearest

interpolation method (fig. 56) and for the Inv.Dist. Sq. interpolation method (fig. 57). This is 

because the user most likely will not have cells in precisely the same locations as those used to 

generate figures 56 and 57. 

32. Select Data|Color Grid... Select the Kx data set and click the OK button. After hiding all 

objects, the grid should look similar to figure 56. 

Figure 56. Distribution of Kx in the top layer of the 

Biscayne Bay aquifer model when the Nearest

interpolation method is used. 

33. Select Data|Edit Data Sets... Select the “Upper_Aquifer_Transmissivity” data set, change its 

Interpolation to Inv. Dist. Sq. (Inverse distance squared) and click OK. The grid should look 

similar to figure 57. The hydraulic conductivity at each element in the upper aquifer is 

93
Examples: Example 4 (Biscayne Bay Aquifer)

calculated be dividing the interpolated transmissivity by the aquifer thickness. When the 

interpolation algorithm for the transmissivity is changed, Kx changes too. 

Figure 57. Distribution of Kx in the top layer of the 

Biscayne Bay aquifer model when the Inv. Dist. Sq.

interpolation method is used. 

34. Next change the interpolation algorithm for “Upper_Aquifer_Transmissivity” to Nearest Point. 

The appearance of the grid should go back to what it was when the interpolation algorithm was 

Nearest. This is because the data for “Upper_Aquifer_Transmissivity” consist entirely of point

objects. The Nearest Point and Nearest interpolation algorithms give the same results when 

applied to points, although Nearest Point is faster. They give different results when applied to 

other sorts of objects. 

35. Next try changing the interpolation algorithm for “Upper_Aquifer_Kx” from Nearest to any of 

the other algorithms (including none). Note that this has no effect on the distribution of Kx. 

This is because no objects directly set the values of “Upper_Aquifer_Kx.” When there are no 

objects to set the value of a data set, interpolation cannot be used and the default formula is 

used instead. 

13. Summary 

GoPhast provides a graphical user interface for creating the flow and transport input file for 

PHAST. It uses objects (points, lines, and polygons) and formulas to define the spatial distribution 

of aquifer properties in a convenient fashion. GoPhast can also be used to create the grid required 

by PHAST and to edit nonspatial data required by PHAST in the flow and transport input file. The 

use of formulas has several benefits: (1) objects can have a third dimensions that varies; (2) 

complicated distributions of values in data sets can be easily specified; and (3) changes to the grid 

can be made without requiring the user to reenter data. Just as the spatial distribution of data is 

independent of the grid, the temporal distribution of data in boundary conditions is independent of 

the temporal discretization of the model. In addition, GoPhast combines all the times specified 

throughout the model to determine the proper temporal discretization of the model. GoPhast allows 

the user to display the spatial input graphically. This display makes it easier for the user to avoid 

94
References Cited 

15. References Cited 

95

and detect errors in the input, thus making the modeling process more efficient and accurate. 

GoPhast has built-in methods for importing data from DXF files and Shapefiles. It also has several 

built-in interpolation methods. 

14. Acknowledgments 

Scott R. Charlton (USGS), Peter Engesgaard (Geologisk Institut - Københavns Universitet), 

Rasmus Jakobsen (Technical University of Denmark), Kenneth L. Kipp (USGS), Peter Kroopnick 

(Brown and Caldwell), Paul Misut (USGS), and David Parkhurst (USGS) are thanked for numerous 

helpful suggestions during the development of GoPhast. The author would also like to thank David 

Parkhurst, Paul Misut, and Alden M. Provost (USGS) for thorough and thoughtful reviews of draft 

versions of this publication. Ward E. Sanford (USGS), Brendan A. Zinn (USGS), Dorothy Tepper 

(USGS), Barbara Korzendorfer (USGS), and Leonard F. Konikow (USGS) are thanked for helpful 

comments on this publication. John A. Passehl (formerly of the USGS) is thanked for providing 

the data used in the Biscayne Bay Aquifer example. 

Anderson, M.P., and Woessner, W.W., 1991, Applied Groundwater Modeling—Simulation of 

Flow and Advective Transport: San Diego, Academic Press, Inc., 381 p. 

Autodesk, Inc., AutoCAD 2000 DXF Reference: Autodesk, Inc. accessed July 21, 2005, at 

http://www.autodesk.com/techpubs/autocad/acad2000/dxf/. 

Charlton, S.R. and Parkhurst, D.L., 2002, PHREEQCI—A Graphical User Interface to the 

geochemical model PHREEQC: U.S. Geological Survey Fact Sheet FS-031-02, 2 p. 

Environmental Systems Research Institute, Inc, 1998, ESRI Shapefile Technical Description: 

Environmental Systems Research Institute, Inc. Redlands, California, 28 p., accessed July 21, 

2005, at http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf 

Hsieh, P.A., and Winston, R.B., 2002, User’s guide to Model Viewer, a program for threedimensional visualization of ground-water model results: U.S. Geological Survey Open-File 

Report 02-106, 18 p. 

Kipp, K.L., 1987, HST3D—A computer code for simulation of heat and solute transport in threedimensional ground-water flow systems: U.S. Geological Survey Water-Resources Investigations 

Report 86-4095, 517 p. 

_____, 1997, Guide to the revised heat and solute transport simulator HST3D—Version 2: U.S. 

Geological Survey Water-Resources Investigations Report 97-4157, 149 p. 

Light, A., and P.J. Bartlein, 2004, The end of the rainbow? Color schemes for improved data 

graphics: Eos, v. 85, no. 40, 385-391. 

Light, A., and P.J. Bartlein, 2005, Reply: Eos, v.86, no. 20, p 196. 

Parkhurst, D.L., 1995, User’s guide to PHREEQC—A computer program for speciation, reactionpath, advective-transport, and inverse geochemical calculations: U.S. Geological Survey WaterResources Investigations Report 95-4227, 143 p. 

Parkhurst, D.L., and Appelo, C.A.J., 1999, User’s guide to PHREEQC (Version 2)—A computer 

program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical 

calculations: U.S. Geological Survey Water-Resources Investigations Report 99-4259, 312 p. 
References Cited 

96

Parkhurst, D.L., Kipp, K. L., Engesgaard, Peter, and Charlton, S.R., 2004, PHAST—A program for 

simulating ground-water flow, solute transport, and multicomponent geochemical reactions: U.S. 

Geological Survey Techniques and Methods 6–A8, 154 p. 

Poeter, E.P. and Hill, M.C., 1998, Documentation of UCODE, a computer code for universal 

inverse modeling: U.S. Geological Survey Water-Resources Investigations Report 98-4080, 

116 p. 

Snyder, J.P., 1987, Map projections—A working manual: U.S. Geological Survey Professional 

Paper 1395, 383 p. 

Stephenson, D.B., 2005, Comment on "Color schemes for improved data graphics" by A. Light and 

P.J. Bartlein: Eos, v. 86, no. 20, p 196.
Appendix 1. Tools for Programmers 

16. Appendix 1. Tools for Programmers 

97

During development of GoPhast, a number of tools were developed that programmers may 

find helpful in working with the source code. 

16.1 Help Generator 

Help Generator is a program for generating documentation for programs written in Object 

Pascal based on comments in the source code. Help Generator uses PasDoc 

(http://pasdoc.sipsolutions.net/FrontPage), an open-source Object-Pascal program and component 

to read the source code, extract the comments from it and format the comments as either a series of 

linked web pages or a LaTeX file. The LaTeX file can be easily converted into either a PostScript, 

Portable Document Format (PDF), or DVI file. The source code for Help Generator is available for 

download at the same location as GoPhast. 

Most of the source code for GoPhast includes comments that can be used by Help 

Generator. However, GoPhast includes some source code written by others and these files do not 

contain comments that can be used by Help Generator. The source code for Help Generator also 

includes a project file that can be used to set the options used by Help Generator to create 

documentation for GoPhast. The project file only includes the names of source code files that 

include comments that can be used by Help Generator. A PDF of the source code documentation 

generated by Help Generator is included with GoPhast. The web page from which GoPhast can be 

downloaded contains a link to the web pages generated by Help Generator for GoPhast. Help 

Generator project files are also available for the custom components in GoPhast. 

Help Generator can work in conjunction with the GraphViz “dot” program 

(http://www.graphviz.org/) to create some summary diagrams that are used in the documentation. 

It also works in conjunction with GNU Aspell (http://aspell.sourceforge.net/) which performs spell 

checking. The location of the Aspell program must be available in the search $PATH. 

16.2 GoPhast Testing Tool 

GoPhast Testing Tool is a tool designed to run GoPhast automatically. It starts GoPhast, 

instructs it to read a GoPhast file and exports the transport input file for PHAST. It then compares 

the newly exported version to a previous version. If the two files have the same contents, GoPhast 

is considered to have passed the test. If the files are not identical, GoPhast is considered to have 

failed the test and the user is informed of the problem. The user must then determine whether the 

new or old version of the file is correct. If the old version of the file is correct but not the new one, 

a bug has been introduced into GoPhast. When the source code of GoPhast is modified, such tests 

should be run to ensure that the changes have not caused unexpected changes in how GoPhast 

works. 

Only opening files and exporting the PHAST transport input file in GoPhast can be tested 

by the GoPhast Testing Tool. Other aspects of GoPhast must be tested manually. 
Appendix 1. Tools for Programmers 

98

16.3 WebIndexer 

GoPhast uses the Tipue search engine in its help (http://www.tipue.com/). The search 

engine requires an index of the web pages it searches. WebIndexer is used to create that index. 

The user enters the names of the web pages for which an index is to be created, the file name for 

the index file to be created, and clicks the Create Index button to create the index. The settings 

can be saved to a file and reopened.

17. Appendix 2. Running GoPhast from the Command Line 

It is possible to run GoPhast from the command line. This capability can be useful when 

testing GoPhast after making changes to the source code or using GoPhast with an automatic 

calibration tool such as UCODE (Poeter and Hill, 1998). When running GoPhast from the 

command line, the first argument must be the name of the file to be opened. The second argument 

on the command line can be “-e”. If present, this option causes GoPhast to export the PHAST 

transport input file with the default file name. The third argument on the command line can be 

“-c”. If present, this option causes GoPhast to close after exporting the PHAST transport input file. 

An example is shown below. 

GoPhast ex1.gpt -e –c 

This command would cause GoPhast to open ex1.gpt, export the PHAST transport data file, 

and then close.