CHEMFLOTM - 2000

 

Interactive Software for Simulating

Water and Chemical Movement

in Unsaturated Soils

 

 

by

 

D.L. Nofziger and Jinquan Wu

Department of Plant and Soil Sciences

Oklahoma State University

Stillwater, OK 74078

 

 

 

 

 

 

 

 

 

 

 

 

 

 



Table of Contents

 

Table of Contents.................................................................................................................. iii

Acknowledgements .............................................................................................................. iv

Disclaimer............................................................................................................................. iv

Purpose of Software.............................................................................................................. 1

New Features of this Version................................................................................................. 2

Features Retained from Previous Version............................................................................... 2

Limitations of Software.......................................................................................................... 4

Hardware and Software Requirements................................................................................... 5

Software Installation.............................................................................................................. 5

Software Use........................................................................................................................ 8

Graphs...................................................................................................................... 9

Reports / Tables...................................................................................................... 11

Soil Systems............................................................................................................ 12

Initial Conditions...................................................................................................... 16

Boundary Conditions............................................................................................... 18

Transport Properties................................................................................................ 21

Mesh Size / Convergence........................................................................................ 22

Examples of Software Use................................................................................................... 24

Mathematical Models

Water Movement.................................................................................................... 27

Chemical Transport................................................................................................. 33

Computational Methods

Water Movement.................................................................................................... 36

Chemical Transport................................................................................................. 44

List of Symbols.................................................................................................................... 50

Numerical Experiments for Water Movement....................................................................... 52

Numerical Experiments for Water and Chemical Movement.................................................. 63

Related Software................................................................................................................. 68

References.......................................................................................................................... 69

 


Acknowledgements

 

The authors want to express appreciation to the United States Environmental Protection Agency, the Oklahoma Agricultural Experiment Station, and the Department of Plant and Soil Sciences at Oklahoma State University for funding this work. Joe Williams of the Robert S. Kerr USEPA Laboratory at Ada, Oklahoma, deserves special thanks for his leadership in this project. Thanks are also extended to Mr. Jianbin Yu for his assistance in programming.

 

 

 

Disclaimer

 

Oklahoma State University, the Oklahoma Agricultural Experiment Station, and the Oklahoma Cooperative Extension Service, hereinafter collectively referred to as "OSU", will not be liable under any circumstances for the direct or indirect damages incurred by any individual or entity due to this software or use thereof, including damages resulting from loss of data, loss of profits, loss of use, interruption of business, indirect, special, incidental or consequential damages, even if advised of the possibility of such damage.  This limitation of liability will apply regardless of the form of action, whether in contract or tort, including negligence.

 

OSU does not provide warranties of any kind, expressed or implied, including but not limited to any warranty or merchantability or fitness for a particular purpose or use, or warranty against copyright or patent infringement.

 

The entire risk as to the quality and performance of the program is with you.  Should the program prove defective, you assume the entire cost of all necessary servicing, repair, or correction.

 

The mention of a tradename is solely for illustrative purposes.  OSU does not hereby endorse any tradename, warrant that a tradename is registered, or approve a tradename to the exclusion of other tradenames.  OSU does not give, nor does it imply, permission or license for the use of the tradename.

 

IF USER DOES NOT AGREE WITH TERMS OF THIS LIMITATION OF LIABILITY, USER SHOULD CEASE USING THIS SOFTWARE IMMEDIATELY AND RETURN IT TO OSU.  OTHERWISE, USER AGREES BY THE USE OF THIS SOFTWARE THAT USER IS IN AGREEMENT WITH THE TERMS OF THIS LIMITATION OF LIABILITY.


Purpose of Software:

 

The movement of water and chemicals into and through soils has a large impact upon our environment and the entire ecosystem. Understanding these processes is of great importance in managing, utilizing, and protecting our natural resources. This software was written to enhance our understanding of the flow and transport processes. It was written primarily as an educational tool. As a result it is highly interactive and graphics oriented. This version of the software expands on that of Nofziger et al (1989) by providing a graphical user interface and other enhancements. The software enables users to define water and chemical movement systems. The software then solves mathematical models of these systems and displays the results graphically.

 

Water and chemical movement in soils are dynamic processes, changing dramatically over time and space. Soil properties, chemical properties, and water and chemical application rates interact in complex ways within the soil system to determine the direction and rate of movement of these materials. Researchers have worked many years to understand the physical and chemical mechanisms responsible for the movement of these materials. They have developed mathematical models describing these processes and compared the predictions of these models with field and laboratory measurements. The resulting mathematical models form a basis for predicting the behavior of water and chemicals in soils.

 

This manual presents features of the software, explanations and examples of its use, its limitations, the mathematical equations used to describe the flow and transport systems, and the numerical methods used to solve these equations. The manual also includes a set of numerical experiments that illustrate flow and transport principles and enable users to understand the importance of different soil properties and other physical and chemical factors on water and chemical movement.

 

The software is intended for use by students, regulators, consultants, scientists, and persons involved in managing water and chemicals in soil who are interested in understanding unsaturated flow and transport processes. We believe this understanding will enhance the user’s ability to manage our water resources. As is the case with any model, the user is urged to become familiar with the limitations of the model and to assess their significance for the situation of interest before using it for decision-making.

New Features in CHEMFLO – 2000

 

 

Features Retained from Previous Version

 


Limitations of Software and Cautions:

1.      The models used in this software assume flow and transport in the soil is strictly one-dimensional. Flow in the field will often be multi-dimensional due to layers within the profile, spatial variability of soil properties, and spatially variable application rates (and hence spatially variable boundary conditions).

 

2.      The water flow model does not include any source or sink terms so it cannot simulate plant uptake of water at different depths. Water loss can only occur at the ends of the soil.

 

3.      Inappropriate water flow equation: The Richards equation (Richards, 1931) for water movement is based on the Darcy‑Buckingham equation (Buckingham, 1907) for water movement in unsaturated soils. This equation is usually a good descriptor of water movement in soils, but exceptions exist. No provision is made in the model for swelling soils. No provision is made in this model for preferential flow of water through large pores in contact with free water. Therefore, it will not accurately represent flow in soils with large cracks that are irrigated by flooding. The model assumes that hysteresis in the wetting and drying processes can be ignored. It also assumes that the hydraulic properties of the soil are not changed by the presence of the chemical.

 

4.      Inappropriate chemical transport equation: Limitations in the convection‑dispersion equation have been observed. Clearly, any inadequacy in simulating water movement will impact the simulation of chemicals. In addition, partitioning of the chemical between the solid and liquid phases may not be proportional as assumed here. The model also assumes that this partitioning is instantaneous and reversible. Partitioning and movement of the chemical in the vapor phase is ignored in this model.

 

5.      Inappropriate initial conditions: The simulated results depend upon the initial conditions specified. If the specified initial conditions do not match the real conditions, the calculated values may be incorrect. You may want to analyze the sensitivity of the results of interest to the specified initial conditions.

 

6.      Inappropriate boundary conditions: The predictions of the model can be quite sensitive to the specified boundary conditions. If the specified ones do not match the actual conditions, large errors may be made. In some cases, the errors may be due to a lack of knowledge of the real boundary conditions. In other cases, the software may not be flexible enough to accommodate the real conditions. Hopefully this will not be a major problem since boundary conditions can be changed during a simulation.

 

7.      Inappropriate soil or chemical properties: Many of the soil and chemical parameters are difficult to measure experimentally. Moreover, soil hydraulic properties can vary by large amounts over small areas. This means that the input parameter values involve uncertainty. Repeated simulations with different parameters can be used to assess the influence of this uncertainty upon predictions.

 

8.      Discretization errors: Limitations in the results due to approximating derivatives by finite differences as well as other approximations used in solving the partial differential equations are subtle and are often difficult to detect. Mass balance errors for water and chemicals are calculated to detect net computational error. Small mass balance errors are simply essential conditions for a valid solution, but they do not guarantee accurate solutions. In general, discretization errors tend to decrease as the mesh sizes decrease, so you may want to compare solutions for different mesh sizes.

 

9.      Due to the wide range of flow and transport problems that can be simulated with this software and the highly nonlinear form of the Richards equation, ALWAYS BE ALERT FOR ABNORMALITIES IN THE SOLUTION. If results look suspicious compare the results with those for additional simulations with different mesh sizes. If the solution is important to you, simulate the flow with another model using a different solution method and compare the results.

 

Hardware and Software Requirements: CHEMFLO-2000 is written in Java[1] 2. Therefore it can be used on any computer system supporting Java 2. This includes Windows 95 / 98 / ME / NT / 2000, Linux, Solaris, and Apple (Mac OS X). Our testing has been primarily on computers running Windows. Differences in fonts across systems result in some problems with the user interface on other platforms.) The software requires at least 64 MB random access memory with 128 MB or more recommended. A fixed disk with 30 MB space is required to install the Java Runtime Environment (which can be used for multiple Java applications). The Java Runtime Environment is available free of charge from Sun Microsystems, Inc. if it is not already built into your operating system. The compiled software and soil data file require less than 1 MB additional disk space. The software is written for a computer with color monitor supporting at least 800x600 pixel resolution.

 

Software Installation: CHEMFLO-2000 is available in two forms. One is a stand-alone Java application. The second is a Java WebStart1 application. The Java WebStart form is our preferred form since it is easier to install on a computer and can be accessed via a browser when connected to the internet or from an icon on your computer when not connected to the internet. Another advantage of the  Java WebStart version is for keeping the software current. Whenever a user starts the program from a computer that is connected to the internet, the system looks at the version of the software on the server from which it was obtained. If the version on the server is newer than the version on the user’s computer, the latest version is downloaded automatically and run. Thus the user can be certain the software being used is the most current version. As is the case with most software, we have plans for adding features to CHEMFLO-2000. Users of the Java WebStart version will automatically obtain these updates while users of the standalone version will need to check the web site and manually download and install any new releases. Another difference in the two forms is that the application has full rights to the user’s computer resources while the Java WebStart form runs in a shell designed to protect your resources. Any requests to use local disk drives or printers must be approved by the user. Another reason for using the Java WebStart form is that we have developed other software utilizing this platform. Once Java WebStart is installed for one application, it can be used by all WebStart applications.

 

There are three components of the CHEMFLO package. They are the Java software, the CHEMFLO-2000 program, and the user’s manual. These are all available for downloading free of charge. Installation instructions are given below for each component.

 

  1. Java Software:

·        For the Java WebStart Application: The CHEMFLO software was designed for use with version 1.3.1 (or later) of the Java runtime environment. If the Java WebStart software and 1.3.1 Runtime environment are already installed on your computer you can proceed to step 2. If it is not loaded, you need to download a copy of WebStart and the runtime environment from http://java.sun.com/products/javawebstart/.  This is a compressed executable file. After downloading it and saving it in a temporary directory, install it on your computer by running the program. This leads you through the installation process. We suggest that you accept the default values presented by the installation software.  

 

·        For the Standalone Application: The CHEMFLO application requires the Java 1.3.1 (or later) runtime environment. If that software is already loaded on the computer to be used, you can skip the remainder of this section and proceed with step 2. If it is not loaded, you need to download a copy of the runtime environment from http://java.sun.com/j2se. This is a compressed executable file. After downloading it and saving it in a temporary directory, install it on your computer by running the program. This leads you through the installation process. We suggest that you accept the default values presented by the installation software.

 

Note: Versions of  Java  later than 1.4 include both Runtime and WebStart environments in one package. Installing a late version like this permits the software to be used in both modes.

 

  1. CHEMFLO-2000 Software:

 

 

 

            Table 1. Contents of chemflo.zip file.

Name Contents

CHEMFLO.jar

This file contains the compiled Java program

 

Chemflo.bat

This file is a simple batch file for running CHEMFLO

 

 


 

The standalone application program can be executed in several ways.

1.   The program can be executed by double clicking on the Chemflo.bat file name from Windows Explorer.

2.   The program can be executed by using the Run Chemflo.bat command

3.   The program can be executed from an MS DOS command window by changing to the Chemflo2000 directory and issuing the command 

java –jar CHEMFLO.jar

4.   A shortcut to the Chemflo.bat file can be created and placed on the desktop. The program can then be run by double clicking on this icon.

 

 

  1. Download the CHEMFLO – 2000 User’s Manual in pdf format: This step is needed only if you want to have a local copy of the manual or if you want to print a hard copy of it.

Software Use: The CHEMFLO software is designed for interactive use. When the program comes up a default soil system is already defined and a solution is available. The user can view results for that system or he or she can select an option to define a new system of interest.

 

The basic steps for simulating water or chemical movement are (1) select or define the soil system; (2) specify the initial conditions for water and chemicals in the soil; (3) define the boundary conditions imposed on the soil system; (4) if chemical movement is being simulated, define the transport properties of the soil – chemical system; and (5) select the graphs option to simulate and view results (or the report option for generating tables).

 

The opening screen is illustrated below. The upper left corner contains a diagram of the current soil system. In this case it is a vertical soil with a length of 50 cm. Along the left side of the screen are buttons for defining soil systems and viewing results. The panel on the screen changes with each button pressed but the diagram of the soil and the buttons remain in view.

 

The following pages illustrate and explain the use of each button.

 


Graphs
: This button is likely the most important one in the program. It produces a panel like the one below to allow the user to specify the time and position of interest and to view results in the form of graphs.

 

Two types of graphs can be drawn. The first type shows the parameter of interest as a function of position along the soil system. This curve is drawn for a specific time. For example, the upper graph in the illustration shows the water content distribution 0.5 hours after flow began for this system. The second type of graph shows the parameter of interest as a function of time for a single position of interest. The lower graph in the figure shows the cumulative flux passing the position x = 0 for all times from 0 to 0.5 hours. Many different graphs are available (see Table 2) and can be selected from the list at the top of each graph. The upper and lower graphs can be used for plotting any combination of graphs of interest.

 

Data entry cells and scroll bars along the right of the panel are used to specify the time of interest and the position of interest. Press the “Calculate” button after these are entered to simulate movement and draw new graphs. Normally, the current line on the graph will be replaced by a new line for the new time or position of interest. If you want to show more than one line on

 

 

the screen at a time, press the  “Retain Line” button. The current red line will change colors and the result for the next simulation will be drawn in red. Pressing the “Clear Lines” button removes all lines except the one for the current time and position.

 

Retaining lines is very useful for making comparisons. For example, I can simulate movement for 1 hour, press the “Retain Line” button, change the time to 2 hours, press the “Calculate” button, change the time to 4 hours and press “Calculate” again. I can then examine distributions of different parameters at these 3 times to gain understanding of how time influences the movement throughout the soil profile. I can also select, calculate, and retain lines for different positions and view graphs of parameter changes with time at these specific positions.

 

Comparisons of this type are not limited to different times and positions. A user can calculate results for a particular soil and retain that line, change the type of soil and calculate to view the impact of soil type upon movement. In a similar way, a user can compare flow for different initial conditions, different boundary conditions, mesh sizes, chemical properties, etc. This provides us with visual images of the impact of any input parameter upon the output parameter of interest.

 

 

 

 

 

 

 

 

 

 

Table 2. Graph options available.

Graphs for a Specific Time

and all Positions

Graphs for a Specific Position

and All Times

·     Water Content

·     Matric Potential

·     Hydraulic Conductivity (Linear scale)

·     Hydraulic Conductivity (Semi-log scale)

·     Driving Force

·     Flux Density of Water

·     Total Potential

·     Water Content vs. Boltzman Variable

·     Solution Concentration

·     Total Concentration

·     Flux Density of Chemical

·     Water Content

·     Matric Potential

·     Hydraulic Conductivity (Linear scale)

·     Hydraulic Conductivity (Semi-log scale)

·     Driving Force

·     Flux Density of Water

·     Total Potential

·     Cumulative Flux Density

·     Solution Concentration

·     Total Concentration

·     Flux Density of Chemical

·     Cumulative Flux of Chemical

·     Mass of Chemical in Soil (per unit area)

 


Reports/Tables: The panel illustrated below is used to define tables or reports to be printed, saved as text files, or displayed on the screen. The flow system is defined in the same way as for graphical output. Then the user selects the water and chemical parameters of interest by checking the appropriate boxes. The image shown is for the situation where the user wants to see output for only selected positions and selected times. Those positions and times are entered in the tables at the bottom of the screen. If the user selects output for all positions and selected times, only the left table will be present for entering the desired times. If results are requested for all times and selected positions, the table on the right is used to enter the positions of interest.

 

When the “Output Table” button is pressed, the user is asked to specify the output device which can be a disk file, the printer, or the screen. Beware: output generated in this option can be very large.

 

NOTE: Be sure to press the <Enter> key after entering values in the table.

 


Soil Systems: The following pages illustrate the screens used to select soils, view and edit soil properties, view water content and hydraulic conductivity functions, and define the orientation of the system to be simulated.

·        Select soil: The soil to be used in the simulation is selected by clicking on the soil list and highlighting the soil desired. Properties of the soil are then displayed in the table below. A small list of soils is provided with the software. The user can define and save additional soils.

·        Finite or semi-infinite soil: Water and chemical movement can be carried out for soils of finite length made up of 1 to 5 layers. Water movement only can be simulated for homogeneous semi-infinite soils.

·        Soil length: If a finite length soil is selected and the soil has only 1 layer, the user can specify the length of the layer here. If the soil has more than one layer, the thickness of each layer is defined as part of the soil definition and can be modified by pressing the “Edit/View Properties button.

·        Angle of Inclination: This angle specifies the angle between the increasing x direction and a horizontal line. Zero degrees represents flow in a horizontal system with x increasing to the right; 90 degrees represents a vertical system with x increasing in a downward direction. A diagram of the soil system that is visible from all panels is provided on the main window.

 

·        Delete Soil: Pressing this button brings up a window in which the user can select a soil to be deleted from the file of soils.

 

·        Edit/View Properties: Pressing this button produces a window similar to the one below. Here the properties of the selected soil are displayed and can be edited. In the example shown, the mathematical form of the van Genuchten conductivity function is displayed along with the names and limits for each parameter. This display changes to other conductivity functions and water content functions as the user moves the mouse to different portions of the table below it. Additional layers can be defined by scrolling the properties table, entering the thickness of the next layer (and pressing the Enter key), and then entering the remaining parameters for the layer.

 


Edit/View Properties Window (Continued):

·        OK button: Pressing the OK button saves the current values of soil properties in temporary memory for use in the current simulation. This window is then closed and control returns to the main Soil window.

·        Cancel button: Pressing this button cancels the editing just done and returns control to the main Soil window with the original soil properties.

·        Store Soil button: Pressing this button brings up a window prompting the user to enter a unique soil name so it can be added to the list of soils saved in a disk file. This enables the user to use the same soil at a later time without entering its properties.

·        Draw Graphs button: This opens a new graphics window so the user can view graphs of the water content and conductivity functions as illustrated below. Lower limits for the axis can be modified by clicking the box at the lower left corner of the graph. When a soil contains more than one layer, a line is drawn for each layer.


Initial Conditions: Before making a simulation, the user must define the conditions of water and chemical in the soil before flow begins. These are called initial conditions. The following screens illustrate ways in which these conditions can be defined. The first screen can be used for specifying uniform initial conditions for water flow only. The conditions are specified as uniform matric potential, uniform total potential, or uniform water content. The second screen is used for non-uniform conditions for water flow only. Here the user specifies the initial matric potential or water content for selected positions. The system uses linear interpolation to obtain values for intermediate points.

 


The following screens can be used when both water and chemical movement are simulated. In the first case, uniform initial matric potential and concentration are specified. In the second case, the initial matric potential is uniform and the concentration is non-uniform. This same format is used when the initial concentration is uniform and matric potential is not uniform or when both are not uniform. Again, linear interpolation is used to obtain values at intermediate positions. The Clear button on the second screen removes all data from the table. The Sort Table button sorts the entries in the table so positions are in increasing order.

 

 


Boundary Conditions: Water and chemical movement depends upon the manner in which water and chemical are applied or removed from the soil boundaries. For finite systems, boundary conditions are defined at both ends of the soil. For semi-infinite systems, a boundary condition is needed only at x = 0. The first screen is used to define boundary conditions for a finite soil having a length of 50 cm. The second screen shown below is used for simulating both water and chemical movement in a 50-cm soil.