Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Modeling of simultaneous processes of water flow, heat transfer, and multicomponent reactive solute transport… Wu, Guangxi 1995

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-ubc_1995-06087x.pdf [ 2.41MB ]
Metadata
JSON: 831-1.0076945.json
JSON-LD: 831-1.0076945-ld.json
RDF/XML (Pretty): 831-1.0076945-rdf.xml
RDF/JSON: 831-1.0076945-rdf.json
Turtle: 831-1.0076945-turtle.txt
N-Triples: 831-1.0076945-rdf-ntriples.txt
Original Record: 831-1.0076945-source.json
Full Text
831-1.0076945-fulltext.txt
Citation
831-1.0076945.ris

Full Text

MODELING OF SIMULTANEOUS PROCESSES OF WATER FLOW, HEAT TRANSFER, AND MULTICOMPONENT REACTIVE SOLUTE TRANSPORT IN SATURATED-UNSATURATED POROUS MEDIA By Guangxi Wu B. A. Sc. Jilin University of Technology, 1984 M. A. Sc. University of British Columbia, 1988 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY  in THE FACULTY OF GRADUATE STUDIES INTERDISCIPLINARY PROGRAM  We accept this thesis as conforming to the required standard  TUE UNIVERSITY OF BRITISH COLUMBIA  October, 1995  © Guangxi Wu,  1995  In presenting this thesis in  partial fulfilment of the requirements for an advanced  degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department  or  by  his  or  her  representatives.  It  is  understood  that  copying  or  publication of this thesis for financial gain shall not be allowed without my written permission.  Department of  In4trJiccipI;v’mvq S+uI;ts a  The University of British Columbia Vancouver, Canada Date  DE-6 (2/88)  OA.  (2,  Abstract  A mathematical model has been developed to describe the simultaneous transport of water, heat, and multicomponent reactive chemicals in saturated-unsaturated subsurface soils. The water movement equation takes into account vapor transport in the unsaturated zone, as well as the fluxes caused by the gradients of temperature and solute concentration. The solute transport equations are formulated in terms of the total analytical concentration of each component species. Chemical reactions that can be dealt with in this model include complexation, acid base reac tion, ion exchange, and precipitation-dissolution. The mathematical model has been solved by the Galerkin finite element method. The chem ical transport equations are solved sequentially and separately from the chemical reaction equa tions, which are solved by the Newton-Raphson method. An iterative procedure is used among water flow equation, heat transfer equation, solute transport equations and chemical reaction equations. Three methods of solving the resulting systems of linear equations are implemented: the banded matrix method, the sparse matrix method, and the iterative methods. Two efficient and reliable iterative methods are provided: the conjugate gradient method for symmetric ma trix equations and the bi-conjugate gradient squared method for general nonsymmetric matrix equations. The chemical system can be considered as either an open or a closed system. It has been demonstrated that the computer model can be used to solve one-, two-, and three dimensional problems. The model was used to simulate processes of salinization and leaching of soils under irri gation with realistic conditions. The soil solution included 48 chemical species in total. The computer model was used to simulate salinization of the soil if the irrigation rate was set equal to the crop uptake so that there was no leaching taking place. The simulation continued with  11  increased rate and improved quality of irrigation water so that leaching of the saline soil took place. During both stages of the simulation, the computer model was shown to provide reason able results as how the dissolved concentrations changed in the soil solution during the saliniza tion and leaching processes, how the composition on the exchange sites adjusted to new equi librium, and how minerals dynamically precipitated and dissolved depending on degree of sat uration of the soil solution with respect to each mineral.  111  Table of Contents  Abstract  II  List of Tables  VIII  List of Figures  x  Acknowledgement 1  2  INTRODUCTION  1  1.1  Background  1  1.2  Research Objectives  4  1.3  Dissertation Organization  5  LITERATURE REVIEW  6  2.1  Water Flow Modeling  6  2.1.1  Saturated Water Flow  6  2.1.2  Unsaturated Water Flow  7  2.2  3  xlv  Solute Transport Modeling  11  2.2.1  Nonreactive Solute Transport Modeling  II  2.2.2  Single Reactive Solute Transport Modeling  12  2.2.3  Multicomponent Reactive Solute Transport Modeling  14  MATHEMATICAL MODEL DEVELOPMENT 3.1  Partial Differential Equation Describing Water Movement  iv  23 24  4  5  3.1.1  Water Vapor Flow  3.1.2  Liquid Water Flow  3.1.3  TotalWaterFlow  31  3.2  Partial Differential Equation Describing Heat Transfer  3.3  Partial Differential Equations Describing Chemical Transport  35  3.4  Chemical Equilibrium Equations  39  3.4.1  Complexation Reactions  40  3.4.2  Sorption Via Ion Exchange  40  3.4.3  Precipitation Reactions  42  3.4.4  Dissolution of Carbon Dioxide  43  .  32  NUMERICAL MODEL DEVELOPMENT  45  4.1  The Mathematical Model  45  4.2  Finite Element Formulation  50  4.2.1  Water Flow Equation  52  4.2.2  Heat Transfer Equation  55  4.2.3  Solute Transport Equations  56  4.3  Finite Difference Formulation for Time-Derivatives  59  4.4  Solution of System of Equations  61  4.4.1  Solving Systems of Linear Equations  4.4.2  Solving Systems of Nonlinear Equations  .  62 68  COMPUTER MODEL DEVELOPMENT  70  5.1  Overview of the Computer Model  70  5.2  Solution Methods and Data Storage Schemes  74  5.2.1  Banded Matrix Method  74  5.2.2  Sparse Matrix Method  76 v  5.2.3 5.3  6  7  8  9  Iterative Methods  79  Chemical Equilibrium Model  84  5.3.1  Solution Method of the Chemical Equilibrium Model  85  5.3.2  Determination of the Correct Mineral Assemblage  87  5.4  General Solution Procedure  89  5.5  Input and Output  91  MODEL VERIFICATION  98  6.1  Verification of the Water Flow Component  6.2  Verification of the Heat Transfer Component  100  6.3  Verification of the Solute Transport Component  104  6.4  Verification of the Chemical Equilibrium Component  106  MODEL DEMONSTRATIONS  98  115  7.1  Simulation of a One Dimensional Problem  115  7.2  Simulation of a Two Dimensional Problem  130  7.3  Simulation of a Three Dimensional Problem  144  SIMULATIONS OF IRRIGATION AND LEACHING  152  8.1  A Simple Irrigation Problem  152  8.2  Salinization and Leaching of a Soil under Irrigation  169  8.2.1  Simulation of a Salinization Process  178  8.2.2  Simulation of a Leaching Process  188  SUMMARY AND RECOMMENDATIONS  198  9.1  Summary  198  9.2  Recommendations  204  vi  Bibliography  206  Appendices  216  A SAMPLE INPUT FILES  216  A. 1 Input File for the Mesh Generator  216  A.2 Input File for Mesh Data  219  A.3 Input File for Material Properties  222  A.4 Input File for Chemical System  226  A.5 Input File for Boundary and Initial Conditions  230  A.6 Input File for Control Data  233  vii  List of Tables  5.1  Element types that can be used in the automatic mesh generator and the finite 93  element model 6.2  Parameters used in the infinite slab simulation  103  6.3  Parameters used in the column transport simulation  106  6.4  Chemical Model Verification: Chemical Reactions and Equilibrium Constants  6.5  Cases to be solved by the chemical equilibrium model.  109  6.6  Solution from the chemical equilibrium model: case 1.  110  6.7  Solution from the chemical equilibrium model: case 2.  ill  6.8  Solution from the chemical equilibrium model: case 3.  112  6.9  Solution from the chemical equilibrium model: case 4.  113  .  108  7.10 Simulation Parameters (One-Dimensional)  116  7.11 Chemical Reactions and Equilibrium Constants  118  7.12 Stoichiometric Coefficients  119  7.13 Initial and Boundary Conditions: One-dimensional Problem  121  7.14 Simulation Parameters (Two-Dimensional)  131  7.15 Initial and Boundary Conditions: Two-dimensional Problem  133  7.16 Initial and Boundary Conditions: Three-dimensional Problem  146  8.17 Simple Irrigation Problem: Chemical Reactions and Equilibrium Constants  154  8.17 (continued)  155  8.17 (continued)  156  viii  8.18 Simple Irrigation Problem: Stoichiometric Coefficients  157  8.18 (continued)  158  8.18 (continued)  159  8.19 Salinization and Leaching: Chemical Reactions and Equilibrium Constants  .  170  8.19 (continued)  171  8.19 (continued)  172  8.20 Simple Irrigation Problem: Stoichiometric Coefficients  173  8.20 (continued)  174  8.20 (continued)  175  8.20 (continued)  176  ix  List of Figures  6.1  Region of flow for Tóth’s analytical solution  6.2  Equipotential net obtained from the computer model  100  6.3  Error distribution along z  101  6.4  Heat conduction in the infinite slab  6.5  Temperature distributions from the computer model and the analytical solution  =  99  0.5 for the water flow problem  102  of the infinite slab problem  104  6.6  Error distributions along the thickness of the infinite slab  105  6.7  Breakthrough curves from the computer model and the analytical solution.  6.8  Error distributions along the column for the solute transport problem  107  7.9  Hydraulic characteristic curves of the soil  116  107  .  7.10 Heat conductivity of the soil  117  7.11 Temperature distribution along the soil column  123  7.12 Sorbed Na concentration distribution along the soil column (case 1)  124  + concentration distribution along the soil column (case 1) 2 7.13 Sorbed Ca  125  Ca concentration distribution along the soil column (case 1). + 7.14 Dissolved 2  .  .  .  125  7.15 Dissolved Na+ concentration distribution along the soil column (case 1)  126  7.16 Dissolved Na+ concentration distribution along the soil column (case 2)  127  + concentration distribution along the soil column (case 2). 2 7.17 Dissolved Ca  .  .  .  128  7.18 Sorbed Na+ concentration distribution along the soil column (case 2)  128  Ca concentration distribution along the soil column (case 2) + 7.19 Sorbed 2  129  7.20 Precipitated Ca 2 concentration distribution along the soil column (case 2).  x  .  .  129  7.21 A subsurface drainage system used in the simulation  131  7.22 Water potential contour lines and water table positions at (a) 114 hours, and (b) 250 hours  134  7.23 Dissolved sodium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1)  135  7.24 Sorbed sodium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1)  136  7.25 Sorbed calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1)  137  7.26 Dissolved calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1)  138  7.27 Precipitated calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1)  139  7.28 Sorbed sodium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 2)  140  7.29 Sorbed calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 2)  141  7.30 Dissolved calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 2)  142  7.31 Dissolved sodium concentration contour lines at (a) 114 hours, (b) 250 hours, and (c) concentration distributions along vertical line at x  =  0 (case 2)  7.32 Illustration of a three-dimensional box filled with a porous medium 7.33 Total water potential distribution at they  =  144  1.0 m plane after (a) 28 hours, and  (b) 78 hours 7.34 Dissolved Ca 2 distribution at the y  143  147 =  78 hours  1.0 m plane after (a) 28 hours, and (b) 148  xi  2 distribution at they 7.35 Sorbed Ca  =  1.0 m plane after (a) 28 hours, and (b) 78  hours 7.36 Sorbed Na distribution at they  149 =  1.0 m plane after (a) 28 hours, and (b) 78  hours 7.37 Dissolved Na distribution at the y  150 =  1.0 m plane after (a) 28 hours, and (b)  78 hours  151  8.38 Water content and hydraulic conductivity as functions of pressure head  154  8.39 Soil water content profiles at various times after irrigation with saline drainage water: (a) from this model; and (b) from imônek and Suarez (1994)  162  8.40 Tracer concentration profiles at various times after application with the irriga tion water: (a) from this model; and (b) from imtinek and Suarez (1994)  162  8.41 Total dissolved magnesium concentration profiles at various times after irrigation 163 8.42 Total dissolved sulphate concentration profiles at various times after irrigation  164  8.43 Magnesite concentration profiles at various times after irrigation  164  8.44 Gypsum concentration profiles at various times after irrigation  165  8.45 Total dissolved calcium concentration profiles at various times after irrigation.  167  8.46 Total precipitated concentration profiles of calcium at various times after irri gation  168  8.47 Calcite concentration profiles at various times after irrigation  168  8.48 Water content profiles during the process of salinization  179  8.49 Tracer concentration profiles during the process of salinization  180  8.50 Total dissolved sodium concentration profiles during the process of salinization. 181 8.51 Sorbed sodium concentration profiles during the process of salinization  181  8.52 Total dissolved potassium concentration profiles during the process of saliniza tion  182  xii  8.53 Sorbed potassium concentration profiles during the process of salinization.  .  .  .  183  8.54 Total dissolved magnesium concentration profiles during the process of salin ization  184  8.55 Sorbed magnesium concentration profiles during the process of salinization.  .  .  184  8.56 Total dissolved calcium concentration profiles during the process of salinization. 185 8.57 Sorbed calcium concentration profiles during the process of salinization  186  8.58 Total dissolved sulphate concentration profiles during the process of salinization. 187 8.59 Gypsum concentration profiles during the process of salinization  187  8.60 Calcite concentration profiles during the process of salinization  188  8.61 Water content profiles during the process of leaching  189  8.62 Tracer concentration profiles during the process of leaching  190  8.63 Total dissolved sodium concentration profiles during the process of leaching.  .  190  8.64 Total dissolved potassium concentration profiles during the process of leaching. 191 8.65 Total dissolved magnesium concentration profiles during the process of leaching. 191 8.66 Total dissolved calcium concentration profiles during the process of leaching.  .  192  8.67 Sorbed sodium concentration profiles during the process of leaching  193  8.68 Sorbed potassium concentration profiles during the process of leaching  193  8.69 Sorbed magnesium concentration profiles during the process of leaching  194  8.70 Sorbed calcium concentration profiles during the process of leaching  194  8.71 Total dissolved sulphate concentration profiles during the process of leaching.  .  195  8.72 Gypsum concentration profiles during the process of leaching  196  8.73 Calcite concentration profiles during the process of leaching  196  xlii  Acknowledgement  I would have been unable to complete this work without the help of many individuals. In par ticular, I would like to express my special gratitude and appreciation to Dr. S. T. Chieng, my principal advisor, for his guidance, encouragement and expert advice. I would also like to thank Drs. K. V. Lo, H. E. Schreier, and I. L. Smith for sitting in the supervisory committee, providing valuable advice and reviewing this dissertation. I cannot thank enough my family and friends who have contributed indirectly but essen tially to the completion of this dissertation. My parents have provided me with constant support, encouragement, and understanding during this seemingly never-ending research. My parentsin-law have provided their support by taking care of my son, Tiantian. Yuncai Gao and many other friends have given me their invaluable friendship and encouragement. My deepest grati tude is to Linan, my wife. Her whole-hearted love, support, understanding, encouragement and patience have given me the strength to complete what has sometimes appeared to be an over whelming task. My sincere appreciation is extended to the University of British Columbia and the Canadian people. This research is made possible partly by the University Graduate Fellowship and other financial assistances during the years of the program. I will always remember the friendly and beautiful Canada, the country and the people. Finally, I feel obliged to express my great appreciation to many people on the Internet. They make their valuable work and softwares available to others free of charge. Almost all the soft  wares used in this research have been freely and legally obtained from the Internet: from opera tion system to compilers, from graphics to text processor. Their contribution to this dissertation is gratefully acknowledged. xiv  Chapter 1  INTRODUCTION  1.1  Background  Water is the blood of life and civilization. It is one of the most essential factors to the production of food. However, nature has not always been kind and just in giving and distributing water to mankind and other types of lives. In many parts of the world, natural precipitation is not suffi cient in providing adequate moisture for optimum growth of crops. In other parts of the world, there is too much precipitation. In the parts of the world where the annual precipitation is ade quate, the distribution of precipitation may be undesirable, i.e. there is too little rainfall during crop growing seasons when the demand for water is greatest, and there is too much rainfall dur ing off-crop seasons when the demand is minimum. In these areas, irrigation and drainage are essential in maintaining sufficient food production. Irrigation has been with human civilization for thousands of years. However, irrigation without adequate knowledge and proper management has also devastated, and continues to dev astate, large areas of formerly productive agricultural lands. Continual irrigation of agricultural lands without paying attention to proper salt balance causes gradual accumulation of salts within the root zone. High concentration of salts in the root zone may result in retarded plant growth, producing smaller plants with fewer and smaller leaves, and hence decreasing crop yields (Bern stein, 1974). If the salt concentration in the root zone is too high, the land could be completely unproductive for normal crops. The solution to this problem of salinization and alkalization of irrigated lands is to provide  1  Chapter 1. INTRODUCTION  2  sufficient water for salt leaching as well as crop consumption, and to combine irrigation with adequate drainage to remove the leaching water from the root zone. The traditional way to deter mine the leaching fraction is the budget method, without considering chemical reactions within the soil solution and between the soil solution and the soil solid phase such as ion exchange, pre cipitation and dissolution. The occurrence of ion exchange, or ion adsorption in general, precip itation and dissolution may significantly influence the chemical composition of the soil solution and on the solid surface sites, which may affect the soil structure and the rate of leaching. An integrated water flow and multicomponent reactive solute transport model would be desirable in predicting the behavior of the water-salt regimes under different irrigation and drainage man agement scenarios. In addition to the traditional area of irrigation and drainage, such a model would also be use ful in minimizing the potential pollution of agricultural soils, groundwater and other water re sources due to agricultural activities such as applications of fertilizers and other agro-chemicals, and biosolids and waste water utilization on agricultural lands. Salts, nutrients and contami nants will undergo hydrological, physical, and chemical interactions with the soil water and the soil solid matrix. These interactions will greatly influence the fate of chemical components in the subsurface system. The main processes of interactions in the near surface include: (1) moisture movement in both liquid and vapor phases; (2) heat transfer due to conduction, evaporation, condensation, and other mechanisms; (3) advective-dispersive transport of a multicomponent reactive solu tion; and (4) chemical and physical interactions among aqueous species and between the soil solution and the soil solid phase. Any of the above processes, either individually or in combi nation, can contribute to the distribution of chemical components in the soil solution and on the solid matrix. The near surface soil is different from deeper soils in a number of aspects. The near surface soil under cultivation is usually unsaturated. The existence of temperature gradi ents makes moisture transfer in vapor form under unsaturated conditions significant in many  Chapter 1. INTRODUCTION  3  situations, especially in arid regions. The soil solution in the unsaturated zone is in constant contact with the soil air phase and the earth atmosphere, therefore the chemistry of the soil so lution has to be dealt with as an open system. Considerable effort has been made to understand all or some of the above processes (Philip and De Vries, 1957; De Vries, 1958; Parkhurst et al., 1980; Jennings et al., 1982; Cederberg et aL, 1985; Thomas, 1985; Liu and Narasimhan, 1989a; Nassar and Horton, 1989b; Yeh and Tn pathi, 1991; imtmek and Suarez, 1994). In a book edited by Russo and Dagan (1993), various aspects of water flow and solute transport in soils, especially in the unsaturated zone, were dis cussed and reviewed. These studies have greatly enhanced the knowledge and understanding of the processes governing water flow and solute transport in the soil-water-plant-atmosphere system. However, due to the complex nature of this system, much more research is needed to allow more accurate prediction of water flow and transport of a multicomponent reactive so lution under nonisothermal unsaturated-saturated conditions. This research is directed towards the development of an integrated model that describes the simultaneous processes of water flow, heat transfer, and transport of a multicomponent reactive solute under variably saturated soil conditions. Because of the complexity of the system, the mathematical model describing it is rather complicated. Numerical solutions are usually the only way of solving this model for any prob lems of practical significance. The most widely used numerical method to solve the system of equations resulted from finite element and finite difference formulations of the transport equa tions is the banded matrix method (Rubin and James, 1973; Grove and Wood, 1979; Valocchi et aT, 1981; Jennings et aT, 1982; Walsh et aT, 1984; Cederberg et aT, 1985; Kirkner et aT, 1985; Bryant et al., 1986; Kirkner and Reeves, 1988). The banded matrix method is efficient in solving one-dimensional problems, but requires excessive computer resources for two- and three-dimensional problems. A more efficient method, such as an iterative method, has to be  Chapter 1. INTRODUCTION  4  used to solve realistic two- and three-dimensional problems. One of the objectives of this re search is to implement more efficient solution methods so that the model can be used to solve realistic problems even with limited computer resources.  1.2  Research Objectives  The research objectives of this project can be summarized as follows: 1. To develop a mathematical model based on physical principles to quantitatively describe the simultaneous processes of water flow, heat transfer, and transport of a multicomponent reactive solute under variably saturated conditions. The model should take into account vapor flow in unsaturated soils. 2. To develop a computer model based on the mathematical model that is able to solve one-, two-, and three-dimensional problems. 3. To incorporate the model with a major ion chemistry model that is capable of handling major chemical reactions such as complexation, acid base reaction, ion exchange, and dynamic precipitation and dissolution in an open or closed system. 4. To implement more efficient solution methods in addition to the simple banded matrix method so that the computer model can be used to solve realistic two- and three-dimen sional problems with limited computer resources. 5. To verify the computer model by comparing the results from the model with available analytical solutions of simple problems. 6. To demonstrate the capability and flexibility of the model by solving a number of one-, two-, and three-dimensional problems with different boundary and initial conditions.  Chapter 1. INTRODUCTION  5  7. To study the salinization and leaching processes of an irrigated soil under realistic condi tions.  1.3  Dissertation Organization  In this dissertation, a review of previous work in modeling of water flow, heat transfer, and so lute transport will be given in chapter 2. The development of the mathematical model will be given in chapter 3. In chapter 4 the numerical approximation of the mathematical model will be presented. Solution methods of a system of equations will be discussed. Chapter 5 details some of the implementation issues in the development of the computer model. In chapter 6, the computer model will be used to solve a few simple problems and the results will be com pared with analytical solutions as an attempt of model verification. A number of one-, two-, and three-dimensional problems with various boundary and initial conditions will be simulated and presented in chapter 7. More realistic and complete simulations will be carried out in chapter 8 to study the salinization and leaching processes of a soil under irrigation. Finally, chapter 9 contains a summary of this research and a few recommendations for future work.  Chapter 2  LITERATURE REVIEW  The water-solute-soil-plant-atmosphere system is a very complex phenomenon influenced by many interrelated processes such as advection-convection, diffusion-dispersion, sorption-de sorption, crystallization-dissolution, precipitation and evapotranspiration. Considerable efforts have been made to identify and understand these processes and their interactions. Following is a brief review of previous works in some of the areas related to the present research. Emphasis will be given to review of works in the area of transport modeling of a reactive solute in porous media, which is also the main subject of the current research. It is not intended, nor possible, to be comprehensive and exhaustive.  Water Flow Modeling  2.1  Saturated Water Flow  2.1.1  Saturated water flow problems in porous media were among the earliest and most thoroughly studied in groundwater modeling. The general saturated flow equation can be written as: V (pK Vh) .  (2.1)  =  where K  =  saturated hydraulic conductivity tensor of the porous medium (mis);  p  =  ; density of water 3 (Kg/m )  h  =  hydraulic potential (m);  6  Chapter 2. LITERATURE REVIEW  88  =  specific storativity (1/rn); and  t  =  time(s).  7  Solution of equation 2.1 is one of the simplest modeling problems in terms of mathemati cal complexity. Approximations of equation 2.1 by many numerical approaches will generate a set of algebraic equations that are linear and algebraically well-behaved. One of the rare dif ficulties in solving the saturated flow equation is the determination of water table position in an unconfined aquifer, which is also part of the solution to be sought. The D-F assumption (Dupuit, 1863; Forchheimer, 1930) was introduced to solve this inherent difficulty and is widely used in groundwater hydrology and drainage theories. The D-F assumption states that the flow in an unconfined aquifer is essentially horizontal, and the equipotential surfaces are vertical. An al ternative approach to deal with this difficulty of determining the water table position, a-priori unknown, is to use iterative methods (Taylor and Brown, 1967). Among the numerous works done in this field, the work by Freeze and Witherspoon (1966) was one of the pioneer works in the numerical modeling of saturated flow in porous media. Several monographs dedicated to groundwater modeling have also be published (Huyakorn and Pinder, 1983; van der Heijde et aL, 1985; DeMarsily, 1986).  2.1.2  Unsaturated Water Flow  While the groundwater hydrologists were developing the saturated flow models, soil physicists were independently modeling water flow in the unsaturated zone (Klute, 1952; Philip, 1957; Youngs, 1957; Gardner, 1959; Rubin, 1968; Freeze, 1971). Milly (1987) gave a good review on the advances in modeling unsaturated water flow. The general unsaturated flow equation can be written as (2.2) where  Chapter 2. LITERATURE REVIEW  K  =  unsaturated hydraulic conductivity function (mis);  U  =  water content ) 1m 3 (m ;  =  pressure potential (m);  =  elevation (m); and  z  8  I =time(s). Equation 2.2 is often referred as the Richards equation. Because unsaturated hydraulic conduc tivity is a function of water content or pressure potential, the Richards equation can be highly nonlinear and is usually more difficult to solve than the saturated flow equation. Some closeform analytical solutions are available for some simple problems (e.g., Wooding, 1968; Philip, 1968; Raats, 1970; Warrick, 1974; Prasad and Romkens, 1982; Warrick and Lomen, 1983; Boulier et aL, 1984; Philip, 1984; Waechter and Philip, 1985; Philip, 1986; Milly, 1985; Weir, 1987). However, numerical methods are usually needed to solve the Richards equation for most practical problems. Van der Heijde et al. (1985) gave a fairly detailed summary of available nu merical solutions of equation 2.2. Different numerical methods have been used for the solution of the Richards equation, including the finite difference method (Freeze, 1971), the integrated fi nite difference method (Narasimhan et aL, 1978), the Galerkin finite element method (Huyakorn et al., 1984; Huyakorn et al., 1986), the subdomain finite element method (Cooley, 1983), the collocation finite element method (Allen and Murphy, 1986), and the nodal domain integration method (Hromadka a’ al., 1981). All of the methods result in a system of equations containing a first order time derivative term. This system of equations is then further approximated by a finite difference in time to yield a system of nonlinear algebraic equations. One of the major difficulties in the unsaturated flow modeling is the hysteretic relationships among unsaturated hydraulic conductivity, water content, and water potential. Rubin (1967), in his analysis of a post-infiltration redistribution process, showed that because of hysteresis, more  Chapter 2. LITERATURE REVIEW  9  of the moisture remained in the infiltration-wetted part of the profile, where it might be avail able for subsequent plant use. Other studies also provided evidences on the effect of hysteresis on moisture distribution in soils (Bresler et aL, 1969; Vachaud and Thony, 1971; Kaluarachchi and Parker, 1987). However, in most of the models developed, hysteresis is often only men tioned in a footnote or totally evaded from the model descriptions (Milly, 1987), although there are many workable models of hysteresis (Topp, 1971; Mualem, 1984; Kool and Parker, 1987), particularly for the relationship between soil water content and matric potential. As for the re lationship between water content and unsaturated hydraulic conductivity, experimental results indicated that hysteresis can usually be neglected (Vachaud and Thony, 1971). Additional difficulties for the unsaturated flow modeling arise from the effects of temper ature and solute concentration gradients. Considerable research has been done to understand the coupled processes of water flow and heat transfer in soils (Philip and De Vries, 1957; De Vries, 1958; Luikov, 1966; Sophocleus, 1979; Milly, 1982, 1984; Thomas, 1985; Nassar and Horton, 1989a, b; Benjamin et aL, 1990). Luikov (1966) developed flux equations based on the theory of irreversible thermodynamics. When combined with continuity equations, these led to a coupled system of partial differential equations for moisture and heat transfer in porous media. Although this theory has been extensively applied to other branches of engineering, its acceptance in groundwater modeling is rather limited (Thomas, 1985); Philip and De Vries (1957) developed two equations describing moisture and heat transfer in porous materials under combined moisture and temperature gradients. Their theory formed the basis of many models for coupled heat and moisture flow in soils. Cassel et al. (1969) car ried out experiments using a fine sand loam at a low moisture content and concluded that within experimental error, the measured flow of water was in agreement with the results obtained from the theory presented by Philip and De Vries (1957). Jackson et al. (1974) evaluated the same theory under field conditions by using clay loam soil with a wide range of soil water content. They concluded that the Philip and De Vries theory gave good results compared with measured  Chapter2. LITERATURE REVTEW  10  values at intermediate soil water contents, while in wet and dry soil conditions, isothermal the ory gave better predictions. De Vries (1958) generalized the Philip and De Vries theory and developed two coupled dif ferential equations for the transfer of heat and moisture under the combined influence of gravity and gradients of temperature and moisture. It took into account the change of moisture in the vapor phase when applying the theory of continuity to the total moisture content. It also con sidered heat of wetting and the transfer of sensible heat due to water movement in vapor and liquid forms. The equations developed by De Vries (1958) are rather complicated and have not yet found wide application. Thomas (1985) presented a simpler model for the simultaneous transfer of heat and moisture in unsaturated soils, based on the works of Philip and De Vries (1957), De Vries (1958), and Luikov (1966). Nassar and Horton (1989a), along with other literature, indicated a clear temperature and solute effects on moisture distribution in soils. They carried out closed colunm experiments us ing both salinized and solute-free soils. They found that there was net transfer of water toward the colder ends of the soil columns whereas net solute transfer was toward the hotter ends. They also found that the amount of water that moves towards the cold end of solute-free soil columns is greater than that of salinized soil columns. They attributed this difference to the effect of so lute concentration gradients on moisture transfer. Nassar and Horton (1989b) took into account the effects of temperature and solute concentration gradients on water movement in both liquid and gaseous phases and developed a comprehensive model describe moisture movement in the unsaturated zone. However, equations describing heat transfer and solute transport are needed to form a complete mathematical model.  Chapter 2. LITERATURE REVIEW  2.2  11  Solute Transport Modeling  2.2.1  Nonreactive Solute Transport Modeling  Solute transport in porous media has been a very active research area for hydrologists and soil physicists in the last decades because of its extraordinary practical importance and the advances in the computing technology. The most basic solute transport equation by advection-dispersion in porous media can be written as: 8(Oc) =  —v  (cv  Vc)  (2.3)  where V  =  Darcy velocity vector (mis);  D  =  coefficient tensor of hydrodynamic dispersion (m ls); 2  c  =  solute concentration (molIL);  o  =  soil water content ) 1m 3 (m ; and  t =time(s). Equation 2.3 is deceivingly simple. Analytical solutions of equation 2.3 are possible only for some specific initial and boundary conditions (e.g., Lapidus and Amundson, 1952; Brenner, 1962; Lindstrom et at., 1967; Ogata, 1970; and Cleary and Adrian, 1973). Numerical solutions of equation 2.3 have to be sought for most problems of practical significance. Earlier transport models of nonreactive solute mostly focused on sea-water intrusion prob lems by groundwater hydrologists (Pinder and Cooper, 1970; Segol and Pinder, 1976) and salt leaching problems by soil physicists (Day and Forsythe, 1957; Nielsen and Biggar, 1962; Big  gar and Nielsen, 1967; Bresler and Hanks, 1969; Bresler, 1973; Kirda et aL, 1973). Biggar and Nielsen (1967) presented a review of much of the earlier work on solute movement in soils. Bresler and Hanks (1969) were the first to present a numerical solution for the simultaneous  Chapter 2. LITERATURE REVIEW  12  transient flow of water and salt in unsaturated soils. Bresler (1973) presented a more complete numerical model for the simultaneous processes of water flow and transport of noninteracting solutes under transient unsaturated conditions in which diffusion and mechanical dispersion were taken into account. More recently, the emphasis was changed to simulating the movement of dissolved organic species such as chlorinated hydrocarbons (Pinder, 1987).  2.2.2  Single Reactive Solute Transport Modeling  The Kd approach was the natural choice for use in modeling reactive solute transport due to its simplicity. For a single reactive component in the soil solution, the transport equation can be written as: (24) where 3 is the total concentration of the component on the soil solid phase (molfL), and other parameters are as defined above. In the Kd approach, the interactions between the soil solution and the soil solid phase is assumed to be reversible adsorption and desorption reactions. The concentration on the solid phase is related to that in the soil solution by the Freundlich isotherm: 6  (2.5)  =  where k 1 and Ic 2 are empirically derived coefficients. A special case of the Freundlich isotherm is the linear equilibrium isotherm: 3  =  Kdc  (2.6)  where Kd is the distribution coefficient (dimensionless). Physically, the distribution coefficient is a measure of the partitioning of a component between the solid phase and the soil solution. A high Kd value indicates a strong tendency for sorption onto the solid surface and low mobility in the soil solution. Substitution of equation 2.6 into equation 2.4 gives: =  —V. (cv  —  OD Vc) .  (2.7)  13  Chapter 2. LITERATURE REVIEW  where B is the retardation factor defined as (2.8)  B=1+Ii’d The transport equation (equation 2.4) then becomes: 8(Oc)  at  =  —V (cV’  —  .  where D’ is the effective dispersion coefficient (D’ 1 (V  =  (2.9)  SD’ Vc) =  D/B) and V’ is the effective velocity  V/B). Equation 2.9 states that the transport of a reactive species is retarded by a factor  of B compared to that of a nonreactive species. The obvious advantages of the Kd approach in modeling reactive solute transport are its convenience and computational ease. However, it has had only limited success in modeling ob served field data. Its ability to provide reliable predications of the behavior of reactive species in porous media is also questionable. Reardon (1981) and Miller and Benson (1983) have shown that the use of distribution coefficients in problems involving multicomponent ion-exchange re actions where the isotherms are nonlinear may not be appropriate. Valocchi (1984) proposed the use of a constant, “effective” Kd to calculate the contaminant front velocity. An effective dis tribution coefficient is the ratio of the difference in sorbed concentrations across the advancing front to the difference in aqueous concentrations across the front. For selected cases of onedimensional binary and ternary homovalent ion exchange, the front locations computed using the effective Kd agreed closely with the concentration profiles calculated by chromatographic theory. However, the effective Kd approach breaks down in systems where slug-type or tempo rary sources exist, where dispersion is an important process, and/or where multi-ion heterova lent exchange occur. Furthermore, the Kd approach to transport modeling does not take into account changes in chemical concentrations due to chemical reactions such as complexation and precipitation or dissolution. The distribution coefficient is only an operational parameter to lump all the chemi cal reactions between soil and aqueous phases. There is little or no thermodynamic significance  Chapter 2. LITERATURE REVIEW  14  attached to this parameter. Its use in modeling reactive solute transport processes in porous me dia is therefore severely limited.  2.2.3  Multicomponent Reactive Solute Transport Modeling  In the last decade or so, a number of general models which describe multicomponent reactive chemical transport processes have been developed (Grove and Wood, 1979; Jennings et al., 1982; Dance and Reardon, 1983; Miller and Benson, 1983; Kirkner et aL, 1984a; Walsh et aL, 1984; Cederberg et aL, 1985; Bryant et aL, 1986; Narasimhan et aL, 1986; Carnahan, 1987; Lewis et aL, 1987; Liu and Narasimhan, 1989; Yeh and Tripathi, 1991; imünek and Suarez, 1994). Recent reviews on the development of the hydrogeochemical transport models of multicomponent reactive solutes were given by Abriola (1987), Kirkner and Reeves (1988), Yeh and Tripathi (1989), Rubin (1990), and Mangold and Tsang (1991). Kirkner and Reeves (1988) pre sented an analysis of several numerical methods of solving multicomponent reactive transport equations with homogeneous and heterogeneous chemical reactions and discussed how the na ture of the chemistry may affect the choice of numerical formulation and solution algorithm. Yeh and Tripathi (1989) provided a critical review of many formulations and computational methods which have been used in multicomponent, equilibrium-controlled transport models. There are generally three approaches to modeling coupled hydrological transport and geo chemical equilibrium reactions: (1) the differential and algebraic equations approach (DAB), (2) the direct substitution approach (DSA), and (3) the sequential iteration approach (SIA) be tween hydrological transport and chemical reaction equations. The DAB and DSA approaches can also be categorized as one-step methods and the SIA approach can be seen as two-step meth ods. In the DAB approach, the mixed partial differential transport equations and nonlinear alge braic chemical reaction equations are solved simultaneously (Grove and Wood, 1979; Petzold, 1981; Miller, 1983; Lichtner, 1985). In the DSA approach, the chemical equilibrium equations  Chapter 2. LITERATURE REVIEW  15  are substituted into the hydrological transport equations to result in a set of highly nonlinear par tial differential equations which are then solved simultaneously (Rubin and James, 1973; Val occhi et cii., 1981; Jennings et cii., 1982; Rubin, 1983; Lewis et cii., 1987). In the SIA approach, the transport equations are solved sequentially and iterations are carried out between the trans port equations and the chemical reaction equations (Kirkner et cii., 1984a, 1985; Walsh et cii., 1984; Cederberg et aL, 1985; Bryant et aL, 1986; Yeh and Tripathi, 1988; imünek and Suarez, 1994). Yeh and Tripathi (1989) concluded that neither the DAE or the DSA approach is practi cal for realistic two- and three-dimensional applications because both approaches will require excessive Cpu memory and CPU time. Only the SIA, together with an efficient solution method for matrix equations, provides the best hope for realistic, practical two- and three-dimensional applications in terms of the CPU memory and CPU time requirements. Most of the early models are spatially one-dimensional with the transport process governed by either advection and diffusionldispersion (Miller and Benson, 1983; Cederberg et al., 1985; Carnahan, 1987), or pure advection which use numerical dispersion to account for the physi cal dispersion (Walsh et al., 1984; Bryant et al., 1986). The chemical reactions are based on the thermodynamic equilibrium condition. Tanji et cii. (1967) developed a one-dimensional model, based on the local equilibrium assumption, to study the quality of water percolating through a stratified aquifer. The chemical species considered were gypsum mineral and the exchangeable 2 and Mg Ca . They did not consider physical dispersion but approximated it with numeri 2 cal dispersion which depends only on the size of the cell and cannot be directly related to the actual physical process. Dutt et cii. (1972) developed a one-dimensional model to simulate the physical, chemical and biological processes in a variably saturated soil-water-plant system. The physical processes considered include infiltration, evapotranspiration, and redistribution of soil water. There were two precipitated species and nine aqueous species in the system. Chemi cal reactions include cation exchange, precipitation and dissolution. Nitrogenous species were subjected to biological transformation.  Chapter 2. LITERATURE REVIEW  16  Rubin and James (1973) used the direct substitution approach in the development of a onedimensional, finite element model for describing reactive solute transport. They considered only the process of sorption via ion exchange and steady state saturated flow conditions were as sumed. The chemical reaction equations were directly substituted into the transport equations. The system of equations then was solved using an iterative method. Valocchi a’ cii. (1981) used a similar approach to study a field case involving the injection of municipal waste water into an alluvial aquifer. Grove and Wood (1979) applied the differential and algebraic equations approach in their study of groundwater quality changes during artificial recharge. They developed a one-dimensional model describing the advective/dispersive transport of three aqueous species and two minerals involved in ion exchange and precipitation-dissolution. The finite difference method was used to solve the transport equations. The system of transport equations and the solubility produc tion equations was solved simultaneously to obtain the concentrations of component and pre cipitated species. An iteration scheme was used to solve the precipitation-dissolution front. Reardon (1981) presented a one-dimensional mixing model involving ion exchange and mineral dissolution reaction under both steady state and dynamic chemical evolution in a ground water flow system. Dance and Reardon (1983) developed a multi-cell one-dimensional model which was calibrated and verified with a field tracer test. Advection and dispersion were taken into account. Chemical reactions include complexation, ion exchange, precipitation and disso lution. Schultz and Reardon (1983) extended this model to two-dimensions, taking into account transverse dispersion within a one-dimensional ground water flow field. The above models were written for specific chemical species. When modeling transport of solutes with different or additional species, modifications must be made inside the source codes, which is not convenient and may introduce programming errors that could be difficult to locate. It is desirable to develop general transport models that can be used in different chemical sys tems. Kirkner a’ cii. (1984a) developed a one-dimensional finite element model which includes  Chapter 2. LITERATURE REVIEW  17  aqueous complexation and sorption reactions. Kirkner et cii. (1 984b) extended the above model to include precipitation and dissolution reactions, and Kirkner etaL (1985) further extended the model to handle kinetic sorption reactions. Saturation index was used to determine precipitation or dissolution of a mineral phase. Miller and Benson (1983) developed a one-dimensional reactive solute transport model, CHEMTRN, for saturated porous media. The processes considered in their model include ad vection, diffusion-dispersion, ion exchange, complexation, and dissociation of water. They used the differential and algebraic equations approach in the solution of the system of transport equa tions and chemical reaction equations. A Newton-Raphson iteration method was used to solve the system of nonlinear equations. In some cases convergence of the system was difficult. Trans verse dispersion was not considered in the model. Carnahan (1986, 1987), based on CHEMTRN, developed a more general chemical transport model THCC. In addition to complexation and ion exchange reactions, THCC also takes into account redox reactions, and precipitation and dissolution of minerals. Heat transfer is also included in the model which enables the simula tion of simultaneous thermal, chemical and hydrological processes as encountered in nuclear waste disposal problems. Noorishad et cii. (1987) extended the CHEMTRN code to include non-equilibrium reactions such as kinetic dissolution of silicate and calcite. The model was then used to study the evolution of ground water at Yucca Mountain, Nevada. Walsh et aT (1984) applied the sequential iteration approach in the development of a onedimensional, general equilibrium model, PHASEQLJFLOW, which includes chemical reactions such as aqueous complexation, precipitation-dissolution and oxidation-reduction reactions. The transport equations were formulated in terms of the total analytical concentration of each com ponent species. Transport was assumed to be advective only. The finite difference method was used in the solution of transport equations. A scaling procedure can be applied to reduce the computational intensity if the correct assemblage of minerals is known beforehand. The sim ulation results are represented by a dimensionless distance and dimensionless time plot for the  Chapter 2. LITERATURE REVIEW  18  reaction chemical waves. The model was applied to the formation damage in the acidizing pro cess and the deposition of uranium minerals. Bryant et at. (1986) extended the model by in cluding ion exchange reaction and applied the model to alkaline flooding. Cederberg et aL (1985) developed a general transport model, TRANQL, for multicompo nent chemical systems, based on an existing finite element transport code, ISOQUAD (Pinder, 1976), and a general chemical equilibrium model, MICROQL (Westall, 1979). The transport equations were formulated in terms of the total analytical concentration of each component species. The equilibrium reaction equations were posed independently of the mass transport equations. The chemical reactions that can be modeled include complexation, ion exchange, and adsorption by surface complexation. At each time step, a solution is found by iterating be tween the transport equations and the chemical equilibrium equations. The transport equations were solved by using the Galerkin finite element method with an implicit time-stepping scheme, and the chemical reaction equations were solved by using the Newton-Raphson method. The model was used to study the transport of cadmium in solution with chloride and bromide in both one- and two-dimensional flow systems. Precipitation/dissolution and redox reactions are not included in the chemical equilibrium model. Narasimhan et at. (1986) developed a two-dimensional model, DYNAMIX, by coupling a multicomponent reactive chemical transport code, a modified version of TRUMP, and a chem ical speciation code, PHREEQE. Chemical reactions that can be handled by the model include acid base reactions, complexation and precipitation/dissolution for eleven chemical components and four minerals. It was assumed that the aquifer contains abundant calcite, which acts as an acid buffer. The transport equations are solved by an integral finite difference method. The chemical equilibrium reaction equations are solved by combined continuous fraction and mod ified Newton-Raphson methods. At each time step, iteration between the transport equations and the chemical reaction equations is not carried out. The chemical equilibrium model is called only once to bring the system to equilibrium. Yeh and Tripathi (1991) and imünek and Suarez  Chapter 2. LITERATURE REVIEW  19  (1994) showed that iteration between the transport equations and chemical reaction equations at each time step is important. In DYNAMIX, mass conservation is not applied between the aqueous and solid phases. At each time step, minerals whose saturation indices are positive are included in the equilibrium model. This approach of selection of minerals in the equilibrium calculations may not satisfy the principle of the minimum Gibbs free energy, therefore the re sults of the simulation may become questionable. However, the model was successfully used to simulate the dilution front migration and sulfate plume migration patterns at an inactive ura nium mill tailings site at Riverton, Wyoming. Liu and Narasimhan (1989a) extended the DYNAMIX model to include oxidation and re duction reactions. The model takes into account hydrological processes of advection, diffusiondispersion and transport of oxygen. The chemical model includes oxidation-reduction, acid base reactions, aqueous complexation, precipitation-dissolution, and kinetic mineral dissolu tion. A partial equilibrium condition is incorporated into the model to account for both ther modynamic equilibrium and kinetic chemical interactions between aqueous and solid phases. An automatic algorithm to determine correct mineral assemblage is implemented based on the principle of minimum Gibbs free energy. The mass conservation is applied in both aqueous and solid phases. At each time step, the transport equations are first solved by the explicit dif ference method. The chemical equilibrium equations are then solved to yield the distribution of chemical species under thermodynamic partial equilibrium conditions. As in Narasimhan et al. (1986), no iteration is carried out between the transport equations and the chemical reaction equations. Liu and Narasimhan (1989b) applied successfully the model to study a supergene copper enrichment problem at Butte, Montana.  Chapter 2. LITERATURE REVIEW  20  Yeh and Tripathi (1991) developed and demonstrated a two-dimensional finite element hy drogeochemical transport model, HYDROGOCHEM, for simulating transport of multicompo nent reactive solutes. The transport equations are formulated in terms of total analytical con centrations of component species. The local equilibrium assumption is used in the chemical re action equations. The chemical equilibrium model includes aqueous comlexation, adsorption, ion exchange, precipitation-dissolution, redox, and acid base reactions. The set of nonlinear algebraic equations is posed independently of the transport equations. The sequential iteration method is used in solving the system of mixed partial differential and nonlinear algebraic equa tions. The redox reactions are simulated using the external approach (Liu, 1988) in which an electron is considered as an ordinary aqueous component, and a transport equation is needed for the electron (Yeh and Tripathi, 1989). Liu (1988) and Liu and Narasimhan (1989b) suggested that the external approach of simulating redox reactions is more suitable in industrial processes such as electrometallurgy, in which mineral dissolution is driven by externally supplied elec tric power, while the effective internal approach is more applicable to hydrogeochemical sys tems in which redox potential is dictated by the states of the redox species. Walsh et cii. (1984) used the effective internal approach in their model PHASEQL/FLOW. Yeh and Tripathi (1991) compared the results from the model with and without iterations between the transport equations and the chemical reaction equations, and showed that improper coupling of hydrologic and geo chemical models can provide misleading results. They also showed that calculated distribution coefficient Kd values can easily vary over a range of 6 orders of magnitude, and pointed out the limitation of the Kd approach to simulate reactive transport. Most of the above models are developed by ground water hydrologists and are based on one-dimensional steady state saturated water flow with known water velocity, temperature, and pH (e.g., Jennings et cii., 1982; Walsh et aL, 1984; Cederberg et aL, 1985; Bryant et aL, 1986; Kirkner and Reeves, 1988). Only recently several models have been developed that include coupled two-dimensional variably saturated water flow equations and transport equations for  Chapter 2. LITERATURE REVIEW  21  multicomponent reactive solutes (Narasimhan et cii., 1986; Liu and Narasimhan, 1989a; Yeh and Tripathi, 1991). However, these coupled water flow and solute transport models do not take into account crop root water uptake and vapor transfer in unsaturated zones. Robbins et al. (1 980a, b) developed a one-dimensional water movement-salt transport-plant growth model coupled with a chemical equilibrium submodel which includes precipitation-dissolution and cation exchange reactions. They tested their model by comparing its results with experimen tal data obtained from a lysimeter study. Dudley et al. (1981) further evaluated the model for field conditions under cropped and uncropped conditions. They found the model provided rea sonable results for salinity but not individual ion concentrations. Russo (1986) combined the salinity model of Rubbins et cii. (1980a) with the transport model of Bresler (1973) to simulate the leaching process of gypsiferous-sodic soils under different soil conditions and water quali ties. Wagenet and Hutson (1987) developed a model for salt leaching, LEACHM, based on the chemical equilibrium model of Rubbins et cii. (1980a). All these models do not allow itera tions between the transport equations and the chemical equilibrium equations at each time step, which in many cases may produce noticeable numerical error (Yeh and Tripathi, 1991). imünek and Suarez (1994) developed a rather comprehensive two-dimensional finite ele ment model, UNSATCHEM-2D, for modeling major ion equilibrium and kinetic nonequilib rium chemistry in variably saturated porous media. The complete model includes equations describing unsaturated water flow, heat transfer, C0 (g) transport, solute transport in subsur 2 face soils, and a chemical reaction model, which includes aqueous complexation, ion exchange, precipitation-dissolution, and dissolution of C0 (g). The chemical model can also handle ki 2 netic calcite precipitation-dissolution and dolomite dissolution. Crop root water uptake is also taken into account. The Galerkin finite element method was used to solve the partial differential equations. An iterative scheme is used between the transport equations and the chemical reac tion equations at each time step. However, the model was written for specific chemical species, therefore it may not be applicable in systems with considerably different chemistry. In addition,  Chapter 2. LITERATURE REVIEW  22  vapor transfer is not included in the water flow equation. Because the number of partial differential and nonlinear algebraic equations in a general multicomponent reactive transport model is usually large, and these two sets of equations are strongly coupled, the method used to solve the resulting system of equations after numerical approximations of the partial differential equations by, for example, finite element or finite dif ference methods, is especially important to the model’s efficiency and applicability for realis tic practical problems. Unfortunately, almost all the models developed have used the simple banded matrix method (Rubin and James, 1973; Grove and Wood, 1979; Valocchi et al., 1981; Jennings et aL, 1982; Theis et aL, 1982; Walsh et aL, 1984; Kirkner et aL, 1984, 1985; Cederberg et aT 1985; Lichtner, 1985; Bryant et aL 1986; Narasimhan et aL, 1986; Lewis et aL, 1987; Liu and Narasimhan, 1989a; imiinek and Suarez, 1994). Only Yeh and Tripathi (1988, 1991) included an iteration method as an option in addition to the banded matrix method to solve the matrix equation. Another limitation of the existing models is that most models were developed for one-dimensional problems and only a few can handle two-dimensional problems (Liu and Narasimhan, 1989a; Yeh and Tripathi, 1991; imnek and Suarez, 1994). Yeh and Tn pathi (1989) made a detailed comparison on computer resource requirements of different solu tion methods and concluded that only the sequential iteration approach together with an efficient matrix equation solver such as iterative methods provides the best chance to model realistic two and three-dimensional multicomponent reactive transport problems.  Chapter 3  MATHEMATICAL MODEL DEVELOPMENT  As stated in chapter 1 (Introduction), the main objectives of this research are to develop and demonstrate a mathematical and computer model based on physical principles to describe the simultaneous processes of moisture movement, heat transfer and transport of multicomponent reactive chemicals under saturated/unsaturated conditions. The model includes vapor transfer in the unsaturated zones. Water fluxes caused by the gradients of temperature and solute con centrations are also taken into account. Chemical reactions that are dealt with include complex ation, ion exchange, and precipitation-dissolution. The computer code can be used to solve ei ther one-, two-, or three-dimensional problems. Three solution methods of solving the system of equations are implemented. In this chapter, a mathematical model consisting of a number of second order partial differential and nonlinear algebraic equations is formulated. These equa tions are partly based on the equations derived by Philip and De Vries (1957), De Vries (1958), Thomas (1985), Cederberg et al. (1985), and Nassar and Horton (1989b). In the subsequent chapters, a numerical model is developed to solve this set of mathematical equations. Based on this numerical model, a computer model is developed. Simulations will be run using the computer model to verify the accuracy and to demonstrate the the capability of the model. In the development of the mathematical model, the soil is considered as a porous medium. All variables related to this porous medium are averaged over a representative element volume (REV). Discussion of the selection of the size of the REV can be found in Bear and Verrujt (1987). It is assumed that the soil solution is incompressible and that the porous medium is Ca and CO are assumed to be completely + nondeformable. Chemical species such as Na+, 2  23  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  24  mixed within the REV. In arid areas where soil is mostly unsaturated, vapor transfer can be a significant part of moisture movement. In order to take into account water vapor flow, an energy balance equa tion is also required. Chemicals undergo advective and dispersive transport. At the same time, chemical reactions will be taking place in the soil solution, on the solid phase, and between the solution and the solid phase. Therefore, a complete mathematical model to describe the reactive chemical transport process should include (1) water flow equation, taking into account the vapor movement, (2) heat transfer equation, (3) solute transport equations, and (4) chemical reaction equations. Development will be given for each group of the equations.  3.1  Partial Differential Equation Describing Water Movement  3.1.1  Water Vapor Flow  Under nonisothermal and unsaturated conditions, water movement in both vapor and liquid states exists due to hydraulic, temperature and solute concentration gradients. If convective transfer of water vapor is neglected, the water vapor flux can be estimated by using a modified form of Fick’s diffusion law given by Philip and De Vries (1957) as:  q  =  DvQOavVpv  (3.10)  where q  =  water vapor flux density (Kg/m •s); 2  =  molecular diffusivity of water vapor in air (m /s), calculated by (Kimball et al., 1976) 2 =  (T/273.15)’ 7 229x10 75  T  =  Kelvin temperature (°K);  Q  =  a tortuosity factor for the gaseous phase, commonly taken as  =  volumetric fraction of the gaseous phase,  °a  =  —  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  n  25  = soil porosity;  6, = volumetric liquid water content ) 1m 3 (m ; ii  = vapor flow enhancement factor,  ii  = 2 -I- 106, (Childs and Malstaff, 1982); and  ). 3 Pu = water vapor density (Kg/m The water vapor density Pu can be expressed as: (3.11)  Pu = Pshr  where = (l.322/T)exp(17.27  —  4718/T), the saturation vapor density, and  hr = relative humidity in the air-filled space. Assume that the water vapor is in thermodynamic equilibrium with the liquid water, and that the gravitational potential effect on the vapor flux is negligible, then 1nhr = Mg  =  1  +  °  (3.12)  in which = total soil water potential (m); uL’,,= soil matric potential (m); = osmotic potential (m);  I? = universal gas constant (8.3 143 J/mol•°K); Al = molecular weight of water (0.018015 Kg/mol); and ) 2 g = gravitational constant (9.81 mIs 0 be the relative humidity due to the soil matric potential and the osmotic po Let hm and h tential of the soil alone, respectively. From the assumption of thermodynamic equilibrium, we have: RT RT RT 0 lflhr = —lnhm + —lnh Mg Mg Mg  (3.13)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  26  or hr =  0 /ih  (3.14)  where  hm 0 h  =  =  exp(  (3.15)  RT  exp ° 1 )  (3.16)  0 can be estimated by For a multiple species solution, tb Na  1000RT ZAI 1=1  (3.17)  pig  where  1 = activity of the ith aqueous species (molJL); A ); and 3 = the density of water (Kg/rn  N= total number of species in the soil solution. This equation is taken from Zelinchenko and Sokolenko (1986) with unit conversion. The relationship between the activity and the concentration of an aqueous species can be expressed as:  =  C 1 7  where  = concentration of the ith species in the solution (molIL); and = activity coefficient of the ith species.  (3.18)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  27  can be determined from the Davies (1962) equation: log  =  —ADZ(  —  0.3)  (3.19)  where AD = Debye constant, Ad0.53; Z = valence of the ith dissolved species; and  = ionic strength. t’ can be calculated by: 1 = 2 —ZcZi  (3.20)  Substituting equations (3.17) and (3.18) into equation (3.16), we have: 1000MZ7c1 i=1  =exp(— 0 h  )=exp(—  1000MTG  Pt  Pt  )  (3.21)  where T=  Z -yc/ct, a hypothetical activity coefficient for the soil solution, and  C=  , total concentration of the solution (molIL). 1 c.  Differentiating equations (3.15) and (3.21) with respect to  dhm 0 dh  —  ui,,.  and C, respectively, gives:  Mg/i,,, RT  (3 22)  0 l000it’fTh  3 23 (.  Pt  Substituting equation (3.14) into equation (3.11) and differentiating the resulting equation with respect to space, using the chain rule and equations (3.22) and (3.23), we have:  Vpv = hmhoVT + dT  sMghmho RT  —  l000PshmMThovc Pt  (3.24)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  28  Combining and rearranging equations (3.10) and (3.24) leads to: q =  vT 3 DvQOavhr!  p1  —  D p,RT  pi  where /3  =  -I- 1OOODVQ0VMTPShrVC Pi  (3.25)  /dT. 3 dp  The first term on the right hand side of equation (3.25) is the vapor flux induced by tem perature gradient, and the second and third terms are the isothermal vapor fluxes due to matric potential and solute concentration gradients, respectively. A correction factor  ,  for the ther  mally induced vapor flux is needed to account for the effect of microscopic temperature gradi ent across the air-filled pores on promoting vapor diffusion. The value of  can be calculated  from (Campbell, 1985): = 9.5 + 60, where  f  —  8.Sexp{—[(l +  )8d 2 2.6f” } 4  (3.26)  is the clay fraction of the soil. The vapor flux density in nonisothermal, unsaturated  and salty soils can now be written as: = —DvVT  —  Dov\7bm + Dcv-VC  (3.27)  P1  where DTV = Dov  =  Dcv  3.1.2  DvQOavhr /3 ii  (3.28)  Pt DvQOaItIMgPshr RT 1 p  = l000DvQOavMTpshr  (3.29)  (3.30)  Liquid Water Flow  Darcy’s law is commonly used to describe liquid flow in porous media. It can be written as: = —K(0 ).V 1 where  (3.31)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  29  = liquid water flux density (Kg/m s), and 2  qi  ) = soil hydraulic conductivity and is a function of O (mis). 1 K(0 Taking into account the effect of gravity, the total water potential  (m) can be written as: (3.32)  where  i,bm = matrix potential (m); = osmotic potential (m); and z  = height (m) from a reference datum representing the gravity potential. Differentiating the above equation with respect to space gives:  =  7’ +  + vG + VT + Vz  (3.33)  From Philip and De Vries (1957), we have:  7 d?tbm ‘m d dT 7 dT —  where y is the surface tension of water (Jim ). 2 The osmotic potential can be expressed as: 1000RTTC pjg  (3.35)  and its derivatives with respect to temperature T and solute concentration C are: 1000RTC cIT  Pig —  dC respectively.  1000RTT pig  (3 36 .  3 37 ) (.  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  30  Substituting equations (3.34), (3.36) and (3.37) into equation (3.33) gives: =  VT + Vm dT  —  0 1000RTTv pg  —  RTCVT + Vz 1000  (3.38)  pg  With equations (3.31) and (3.38), and the assumption that the solute movement is com pletely restricted by the soil matrix, the liquid water flux density can be calculated by: =  KtVT dT  P1  KV1tbm +  1000KRTT p,g  +  1000KRTG VT pjg  —  K•Vz (3.39)  However, complete restriction of the solute by the soil is unlikely in practical situations (Hil lel, 1980). For partial restriction, a factor F 0 (< 1) is multiplied to the third and the fourth terms on the right hand side of equation (3.39):  Pt  =  KVTKVtkm+ 7 dT  1000FQKRTT 1000FQKRTC .\7Q .VTK•Vz(340) pig pig  0 is very close to zero in 0 is called the osmotic efficiency factor or the reflection coefficient. F F saturated and nearly saturated soil conditions, and becomes non-negligible only at high suction (Hillel, 1980). Now the liquid flux can be written in a compact form as:  Pt  =  DVT  —  DoLVbm + DCL•VC  —  K•Vz  (3.41)  where DTL  =  7 ?I)m d K(——--— dT 7  RTC 0 1000F —  DOL = K  DCL =  pig  )  (3.42) (3.43)  1000FQKRTT pig  (3.44)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  3.1.3  31  Total Water Flow  The total water flow is equal to the sum of vapor flow and liquid water flow. Adding equa tions (3.27) and (3.41) gives the total water flow: Pi where  =  DTW  —  =  DowVm + DcwVC  —  KVz  (3.45)  (3.46)  Dry + DTL  /s°K); 2 is the thermal moisture diffusivity (m DOH’  =  (3.47)  Day + DOL  is the isothermal moisture diffusivity (m /s); and 2 Dow  =  (3.48)  Dcv + DCL  L/mols). 2 is the moisture diffusivity due to the solute effect (m The equation of continuity can be written as: at  =  (3.49)  —V.()  where t is the time (s), and 6 is the total water content 3 /m (m ) . Assuming that the mass of the water vapor is negligible in comparison with that of the liquid water, equation (3.49) can be expressed as: bt  = —V•() p’  (3.50)  Combining equations (3.45) and (3.50) gives the following general partial differential equa tion describing water movement under temperature, moisture and solute concentration gradi ents: =  v(DrcyVT) + V(DawVc’m)  —  V(DcwVC) + V(KVz)  (3.51)  where G = dOj/dt/’rn is the specific water capacity (lIm). Equation (3.51) is written in terms of the matric potential so that it can readily deal with mixed saturated-unsaturated conditions.  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  3.2  32  Partial Differential Equation Describing Heat Transfer  Heat transfer in unsaturated soils usually takes place in the following forms: (1) heat conduction through the moist soil, (2) latent heat transfer due to vaporization and condensation, (3) sensi ble heat transfer due to moisture movement, and (4) sensible heat transfer due to convection. The sensible heat transfer due to moisture movement and convection is usually small and neg ligible in comparison with the latent heat transfer. The development below follows the general procedure of Thomas (1985). The heat flux density in the soil, neglecting the transfer of sensible heat due to moisture movement and convection, is given by: =  q  —AVT + Lhq  (3.52)  where q  =  heat flux density (W/m •s); 2  A  =  thermal conductivity of the moist porous medium excluding vapor movement (J/m•s°K); and  Lh  =  latent heat of vaporization of water (J/Kg).  The total heat content per unit volume of soil  Q  =  Ch(T  —  )+ 0 T  Q  ) at temperature T (°K) is given by: 3 (Jim  (3.53)  Lhpjf9  where =  an arbitrary reference temperature (°K);  =  volumetric vapor content, 01,  =  volumetric heat capacity of the soil (Jim 3 •°K).  =  (n  —  /m (m ) ; and /pi 3 1, Oe)p  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  33  Oh can be expressed as: = 5 c + cjpjOj + CaPaOa 0 p  (3.54)  where = specific heat of soil solids (J/Kg•°K); = specific heat of liquid water (J/Kg.°K); Ca  = specific heat of moist air (J/Kg•°K);  ); 3 5 = density of solids (Kg/rn p = density of liquid water 3 (KgIm ) ; ); 3 Pa = density of moist air (Kg/m = volumetric content of solids ) 1m 3 (m ; = volumetric content of liquid water ) 1m 3 (m ; and /m (rn ) . Oa = volumetric content of moist air 3 The last term on the right hand side of equation (3.54) is very small compared with the other two terms and can usually be neglected. The equation of continuity of heat transfer can be expressed as: 8Q  (3.55)  =  Substituting equations (3.52) and (3.53) into equation (3.55) gives: E = \7(AVT) 2 + Lhpj  —  LhV•q  (3.56)  Applying the principle of mass conservation to the vapor phase leads to: = _V.(!) + B  (3.57)  where B is an evaporation term representing the source and sink of water as evaporation or condensation takes place 3 /m (m • s). Combining equations (3.56) and (3.57) gives: = V•(AVT)  —  LhP(E  (3.58)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  34  Now let us find an expression for E. Introducing a phase conversion factor e, as introduced initially by Luikov (1966), we have: —  6 —  d(p,Oi) d(pjOj)  d(pjOj) (piOi) + d 0 d (p,O,) 6  (3 59)  where d(pjOj) = total change of liquid moisture content; (pjOj) = change of liquid moisture content due to phase conversion; and 0 d  de(piOi) = change of liquid moisture content due to liquid water transfer. If S = 1, the moisture movement occurs in the form of vapor only, while if 6 = 0, the moisture movement is the result of liquid water transfer only. By definition, we have: (piOi) = (peOi) +  (3.60)  and from equation (3.59), we have:  (pj8j) =  (3.61)  Substituting equation (3.61) into equation (3.60) and noticing that (pjOj) = —V•q , we 1 have: 8O qj = —V•(—) +  (3.62)  Applying the principle of mass conservation to the liquid phase gives:  88  qz  (3.63)  By comparison of equations (3.62) and (3.63), we have: E =  = —eCj——  (3.64)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  35  Substituting equation (3.64) into equation (3.58) leads to: =  V•(AVT) + LhEPI(cla;r)  (3.65)  Substituting equation (3.51) into equation (3.65) gives: =  v[(A + LhepeDTw) VT] + V(LhEPIDow)Vthml (3.66)  —V•[(ihEplDcw)VC} + V[(LhEp/K)Vz1 or Ch  =  V(DTTVT) + V(DorVm)  —  (3.67)  V(DCT•VC) + V(DzTVz)  where  3.3  DTT  =  \ + LhEPIDTW  (3.68)  DOT  =  LhepjDow  (3.69)  DGT  =  LhEPIDCW  (3.70)  DZT  =  LhEPIK  (3.71)  Partial Differential Equations Describing Chemical Transport  So far two coupled second order partial differential equations (equations (3.51) and (3.67)) have been obtained to describe the simultaneous transfer processes of heat and moisture in unsatu rated soils. In order to solve these PDEs, transport equations for the chemicals and chemical reaction equations in the soil solution are still needed. Let us consider a system of I aqueous chemical components. In addition to their free form as aqueous component species, these components will react with each other to form N  —  I corn  plexed species and N precipitated species. There are N, species from the N aqueous species  36  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  which will compete with each other for a total of Neq equivalents of ion exchange capacity on the surface of soil solids. Let c (i (mol/L), x (i (i  1,2,.  =  .  .  ,  =  1,2,.  .  .  ,  =  1, 2,.  .  .  ,  Na) be the concentration of the ith aqueous species  ) be the concentration of the ith sorbed species (molIL), and pi 8 N  N) be the concentration of the ith precipitated species (mo]JL). One of the criti  cal tasks in formulating transport equations for multiple reactive chemical species is to choose the primary dependent variables (PDVs) and secondary dependent variables (SDVs). Yeh and Tripathi (1989) presented a review on the computer requirements of various formulations in terms of CPU time and memory, on the scope of chemical reactions each method can deal with, and on the readiness of each method to be extended to treat mixed chemical kinetics and equi librium. In the following development, the total analytical concentration of each component Tj (j  1,2,..., I) is chosen as the PDVs, and c (i  =  p (i  1,2,... ,Na), x (i  =  =  ), and 8 1,2,..., N  1,2,... , Ni,) are chosen as the SDVs. According to Yeh and Tripathi (1989), select  =  ing the total analytical concentrations T as PDVs with a sequential iteration approach (SIA) of solving the system of chemical transport equations and chemical reaction equations requires the least CPU time and memory, while encompasses the full complement of geochemical reactions either in equilibrium or in kinetics. For the ith aqueous species, the governing transport equation can be obtained by applying the principle of mass conservation as (Yeh and Tripathi, 1988): + V(cV)  —  V(OjDVc)  =  O,r  i  =  1,2,...  (3.72)  in which D 1 8  =  aVS + (aj  VT. V —  at)  + amOjrwS  where D  =  coefficient tensor of hydrodynamic dispersion;  at  =  longitudinal diffusivity of the porous medium (m);  (3.73)  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  37  = transverse diffusivities of the porous medium (m); = Kronecher delta tensor,  &j  = 0 if iy4j and  = 1 if i =  j;  = magnitude of the Darcy velocity vector V (mis), V = qj/p, /s), r. = 2 = tortuosity factor (m  07/3/m2  where mis the porosity (Millington and Quirk, 1961);  ls); and 2 am = molecular diffusion coefficient (m = production rate of the ith aqueous species per unit volume of solution due to all chemical reactions (mo]JLs). Expanding the first two terms of equation (3.72) gives: 1 + VVc 1+c VV 1 +c  —  DVc = Ojr V(O ) 1  i = 1,2,... ,Na  (3.74)  and from equation (3.62) we have: V•V = —(1  (3.75)  —  Substituting above equation into equation (3.74) gives: = 0(c ) 1  -  ec- + Ojr  i = 1,2,..., Na  (3.76)  where 0(c) is the advection-dispersion operator: 0(c) = —V\7c + V.(ODVc)  (3.77)  The sorbed and the precipitated species are assumed not subject to hydrological transport. Therefore their governing equations can be simply written as: 80  = 6 r 1  (3.78)  80, 8p r 1 Oi& +Pia = 0  (3.79)  +  where  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  38  = production rate of the ith sorbed species per unit volume of solution due to all sorption reactions (molIL•s); and = production rate of the ith precipitated species per unit volume of solution due to ith precipitation reaction (molJLs). be the stoichiometric coefficient of the jth aqueous component in the ith aqueous  Let  species, a be the stoichiometric coefficient of the jth aqueous component in the ith sorbed be the stoichiometric coefficient of the jth aqueous component in the ith pre  species, and  cipitated species. Then multiplying equation (3.76) by  Uj  and summing over i from ito Na,  multiplying equation (3.78) by a and summing over i from ito N , multiplying equation (3.79) 3 by a and summing over i from 1 to N, adding the results together, and noticing that: Np  3 N  I’i  (3.80) we have: 8O  = O(C)  /  -  ti —  80,  t)-aici  (3.81)  where 0 N  5 N  j=i,2,...,I  (3.82)  0 N  j=i,2,...,I  (3.83)  Equation (3.81) is the general equation governing the transport of the jth aqueous compo nent. The fact that the transport equation for each component is identical in form suggests that they can be solved sequentially, by using the same equation solver to obtain the total analytical concentration of each component. This advantage may save considerable computer time and memory resources (Yeh and Tripathi, 1989). The SDVs can be obtained by solving the molar balance equations (equation (3.82)) and the set of chemical equilibrium equations, as described in the following section.  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  3.4  39  Chemical Equilibrium Equations  In the development of chemical reaction equations, it is assumed that all reactions (e.g., com plexation, sorption and precipitation) are fast enough compared with advection and dispersion and hence the local equilibrium assumption is valid, which means the chemical reactions in each representative element volume are at equilibrium at every time step. Yeh and Tripathi (1989) indicated that the model can be modified to incorporate kinetic reactions with reasonable ease. Although this model is not written explicitly for redox and acid base reactions, these reactions need no special treatment (Yeh and Tripathi, 1989). To take into account the redox reactions, a transport equation for the operational electron identical with equation (3.81) in form can be for mulated and the mass action equations for any species involving redox reaction can be modified to include the activity of electrons. Acid base reactions can be readily dealt with by formulat ing a transport equation for excess proton and considering it as an ordinary aqueous component. Based on the above arguments, chemical equilibrium equations are written only for complexa tion, sorption and precipitation reactions. There are two distinct but thermodynamically related methods to formulate the species dis tribution: the equilibrium constant approach and the Gibbs free-energy approach. In the equi librium constant approach, a set of nonlinear algebraic equations is obtained based on the law of mass action and the principle of mass balance. In the Gibbs free-energy approach, a set of non linear algebraic equations is obtained by minimizing the total Gibbs free-energy of all species in the system subject to mass balance equations. In the former approach equilibrium constants for all reactions are needed while in the latter approach free energy values for all species are required. Although these two approaches are thermodynamically equivalent, the equilibrium constant approach is more straight forward and is preferable in computer modeling, and will be used in this research.  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  40  Complexation Reactions  3.4.1  The law of mass action for each complexation reaction can be written as: 1  1 A  =  K’  fJ A  i  =  I + 1,1 + 2  (3.84)  4=1  where 1 A  =  activity of the ith aqueous species (complexed species), i  4 = activity of the kth aqueous component species, Ic A  =  1, 2,.  I + 1,1 + 2,.  =  .  .  ,  .  .  I; and  K= equilibrium constant of the ith complexed species. The activity of an aqueous species is the product of the concentration of the species and its ac tivity coefficient: 1 A  =  i  =  1,2  (3.85)  where -yj is the activity coefficient of the ith aqueous species. Substituting equation (3.85) into equation (3.84) and rearranging it gives: a  = (KiHk=l7k)llCt  i  =  1+ 1,I+2,...,Na  (3.86)  It should be noted that the thermodynamic equilibrium constant K is a function of the sys tem temperature and pressure.  3.4.2  Sorption Via Ion Exchange  There are two commonly used models of ion sorption: the surface complexation model and the constant charge model. The surface complexation model takes into account surface ionization and complexation at the solid-water interface and provides a more realistic treatment of sorbing substrates whose surface charge is not constant but a function of pH (Cederberg et aL, 1985). In the constant charge model, it is assumed that a fixed, pH independent charge imbalance exists  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  41  on the surface of the sorbing substrate. The constant charge model can be used to simulate the transport of ion exchanging solutes in systems undergoing little or no change in pH. For the purpose of simplicity, the present model is based on the simpler constant charge model. The ion exchange reaction can be expressed by: ZA + ZXJ  =  ZA + ZJX  (3.87)  and the law of mass action for ion exchange can be written as: =  A  X  (3.88)  where =  selectivity coefficient of the ith sorbed species with respect to the Jth sorbed species, or the effective equilibrium constant of the ith sorbed species;  A  1 Z  =  activity of the aqueous species corresponding to ith sorbed species;  =  activity of the ith sorbed species; and  =  valence of the ith sorbed species.  The activity of a sorbed species is the product of its activity coefficient and its equivalent frac tion. The activity coefficients of ions in the solid phase are usually difficult to determine, es pecially for multicomponent systems. Elprince and Babcock (1986) illustrated a method of us ing the experimentally determined activity coefficient values for binary systems to calculate the activity coefficients for multicomponent exchange systems. For the purpose of simplicity, it is assumed that the activity coefficients of sorbed species are unity in the following development. Thus we have:  X=N  3 i=1,2,...,N  (3.89)  where N 1 is the equivalent fraction of the ith sorbed species:  1 N  (3.90) =  =  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  42  in which Neq is the total number of equivalents of the imbalanced charge on the surface of the sorbing substance. Substituting equations (3.85), (3.89) and (3.90) into equation (3.88) and rearranging it gives: =Kjz2(  )z./zj(N)  eq7jCz  5 i=1,2,...,J—1,J+1,...,N  (3.91)  and the charge balance equation for the sorbing phase can be written as: 5 N  Z Zx =  (3.92)  Precipitation Reactions  3.4.3  The law of mass action for precipitation-dissolution reactions is written as: I  (3.93) k= 1  where K’ is the solubility product of the ith precipitated species. Substituting equation (3.85) into equation (3.93), one obtains: I  I  (fjakt)fjak.  =  (3.94)  According to the Gibbs phase rule, the number of precipitated species which are in equilib rium with the aqueous phase cannot exceed the number of the aqueous components (Liu and Narasimhan, 1989a), i.e. N<I  (3.95)  In the calculation of the species distributions in the soil solution and on the solid phase, the number of precipitated species must be specified before the calculation is started. However, in the simulation of a dynamic precipitation-dissolution process, the number of actual mineral phases is usually unknown and is one of the variables to be solved. The general multicomponent reactive chemical transport model must be able to describe not only the equilibrium between the  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  43  precipitated phase and the aqueous solution, but also the dynamic disappearance and reappear ance of minerals. Therefore a systematic search for correct mineral assemblage should be in corporated into the model to provide the model with a general applicability. Such an algorithm was described by Liu and Narasimhan (1989a).  3.4.4  Dissolution of Carbon Dioxide  The soil solution in the near surface zone is usually in constant contact with the soil’s gas phase, and dissolution of carbon dioxide affects the pH of the soil solution as well as the solubility of soil carbonates. The solubility of C0 (g) in water is governed by Henry’s law: 2 (g) + H 2 C0 0 2  =  C0 2 H 3  2 Kco  =  3 C 2 (H ) 0 2 Pco  (3.96)  where 2 Pco  =  partial pressure of CO 2 in the soil air 2 (N/rn ) ;  C0 2 (H ) 3  =  activity of the carbonic acid (mol/L); and  2 Kco  =  Henry’s law constant.  Equations (3.51), (3.67), (3.81), (3.82), (3.86), (3.91), (3.92), (3.94) and (3.96) provide a complete mathematical description of the simultaneous transport of moisture and multicom ponent reactive chemicals in nonisothermal saturated-unsaturated soils. The equations consist of one water flow equation, one heat transfer equation, I chemical transport equations, I mass balance equations, Na  —  I complexation reaction equations, N 3  —  1 ion exchange equations,  one charge balance equation for the sorbing phase, N solubility equations, and one dissolution of CO 2 equation. The total number of equations is I + Na + N 3 + N + 3 corresponding to I + Na + N 5 + N + 3 unknowns. Therefore this set of equations can be solved numerically with appropriate initial and boundary conditions to yield the moisture content, temperature, chem ical concentration distributions in the solution and on the solid phase. In the next chapter, the  Chapter 3. MATHEMATICAL MODEL DEVELOPMENT  44  Galerkin finite element method will be used to formulate a numerical solution for the mathe matical model.  Chapter 4  NUMERICAL MODEL DEVELOPMENT  In the last chapter the development of a complete mathematical model has been presented to describe the simultaneous transport of water, heat and multicomponent reactive solute in satu rated andJor unsaturated soils. This set of mathematical equations consists of: 1) one second order partial differential equation describing water movement, including both liquid and vapor; 2) one second order partial differential equation describing heat transfer; 3) a number of second order partial differential equations describing transport of multicomponent reactive chemicals, one for each component species; and 4) a set of algebraic equations describing chemical reac tions, such as complexation, acid base reaction, ion exchange, precipitation and dissolution. This set of mixed partial differential and algebraic equations is usually highly nonlinear and coupled. An analytical solution of this set of equations is not practical in this case due to its complexity, and numerical methods should be used. There are two categories of commonly used numerical methods to solve partial differential equations: the finite difference method and the finite element method. Each method has its own advantages. Detailed comparison of these two methods can be found in Gray (1982). The finite element method is used in this study due to the fact that the standard formulation of the finite element method is more flexible in representing field irregularity and heterogeneity.  4.1  The Mathematical Model  For the purpose of clarity, the equations developed in the last chapter are summarized and pre sented below for a complete mathematical model. 45  Chapter 4. NUMERICAL MODEL DEVELOPMENT  46  Let us consider a soil solution consisting of I aqueous chemical component species. These component species will react with each other to form Na  —  I complexed species and N precip  itated species, where Na is the total number of aqueous chemical species. Of the Na aqueous species, N species will participate in ion exchange for a total of Nag equivalents of ion ex change capacity on the surface of soil solids. The equations that describe the transport process of the multicomponent reactive solute in variably saturated nonsteady, nonisothermal soils can be written as: Water flow equation: =  V.(DTW VT) + V(Dgw Vm) .  .  V(Dcw VG) + V.(K Vz)  (4.97)  V(DQT VG) + V(DzT Vz)  (4.98)  —  .  .  Heat transfer equation:  =  .  VT) + V(DoT  .  Vm)  —  .  .  Solute transport equations: DTk 0  +  —  O(Tk)  =  —O(Sk + Pk) + (1  —  (4.99)  Mass balance equations: Na  Tk  =  3 N  N  Z ajc + Z a%jxj + Z apj  j=1  j=1  (4.100)  j=1  0 N  Ck=Za%jc  (4.101)  j=1  Sk=Za%jxj  (4.102)  j=1  Pk=ZajpJ j=1  (4.103)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  47  Complexation reaction equations: a  ak IYa nI = (“1 llkl7ak 7a1  I  )  flt  i  I+l,I+2,...,Na  (4.104)  Ion exchange equations: =  Neq7ajci  i  =  1,2,... ,J— l,J+ 1,... ,N 3  (4.105)  Charge balance equation on the exchange site: 5 N  (4.106) Precipitation/dissolution equations: =  In the above equations,  O(Tk)  =  —V•VTk + V(OD•VTk);  T  =  temperature (°K);  2,bm  =  pressure potential (m);  o  =  total solute concentration (molJL);  t  =  time (s);  z  =  elevation above an arbitrary datum (m);  =  ctO/d’çL’, specific water capacity;  DTW  =  moisture diffusivity tensors due to temperature (m Is°K); 2  Dow  =  moisture diffusivity tensors due to pressure potential (mis);  Dcw  =  moisture diffusivity tensors due to solute concentration (m Llmol•s); 2  K  =  hydraulic conductivity tensor (mis);  =  volumetric heat capacity (J/m •°K); 3  =  heat diffusivity tensors due to temperature (J/ms•°K);  DTT  (4.107)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  48  DOT  = heat diffusivity tensors due to pressure potential (J/m •s); 2  DCT  = heat diffusivity tensors due to solute concentration (J•L/mol•m•s);  DZT  = heat diffusivity tensors due to gravity (J/m •s); 2 = liquid water content 3 1m (m ) ; = total analytical concentration of the kth component species (mol/L); = total dissolved concentration of the kth component species (mol/L); = total sorbed concentration of the kth component species (molfL);  Ph  = total precipitated concentration of the kth component species (mo]JL);  V  = Darcy velocity vector (mis);  0  = total water content 3 /m (m ) ;  D  = coefficient tensor of hydrodynamic dispersion (m /s); 2 = a phase conversion factor, indicating the relative significance of vapor transfer compared with liquid transfer in a particular soil;  = concentration of the jth aqueous species (molfL), j = concentration of jth sorbed species (molJL),  j=  =  1,2,.  1, 2, .  ,  = concentration of jth precipitated species (molIL), j = 1,2,  .  .  .  ,  Na;  ,  P4;  ; 8 N .  = stoichiometric coefficients of the kth aqueous component in the jth aqueous species;  = stoichiometric coefficients of the kth aqueous component in the jth sorbed species;  = stoichiometric coefficients of the kth aqueous component in the jth precipitated species; Ii[  = equilibrium constant of the ith aqueous species;  7ai  = the activity coefficients of ith aqueous species;  7xi  =  the activity coefficients of ith sorbed species;  Chapter 4. NUMERICAL MODEL DEVELOPMENT  =  49  selectivity coefficient of the ith species with respect to the Jth species, or the effective equilibrium constant of the ith sorbed species;  Z  =  valence of the ith sorbed species; and  =  solubility product of the ith precipitated species.  Equations (4.97) to (4.107) represent a total number of 41 + Na + N, + N + 2 equations, corresponding to 41 + Na -1- N, + N + 2 unknowns. Therefore, this set of equations can be solved if appropriate initial and boundary conditions are specified. There are three approaches to solving this set of mixed differential and algebraic equations (Yeh and Tripathi, 1989): (1) the differential and algebraic equations approach (DAE), (2) the direct substitution approach (DS), and (3) the sequential iteration approach between differen tial equations and algebraic equations (SI). The DAE approach attempts to solve the differential equations together with the algebraic equations (Miller, 1983; Lichtner, 1985). In the DS ap proach, the algebraic equations are substituted into the differential equations to result in a set of nonlinear partial differential equations. This set of differential equations is subsequently solved simultaneously for a set of primary dependent variables (Rubin and James, 1973; Valocchi et aL, 1981; Jennings et aL, 1982; Rubin, 1983; Lewis et aL, 1987). The SI approach solves the transport equations sequentially, and iterates between solving the transport equations and the geo-chemical equilibrium equations (Walsh et al., 1984; Cederberg, 1985). Neither the DAE nor the DS approach is practical for realistic two- and three-dimensional applications because both approaches require the simultaneous solution of a significant num ber of differential equations (the transport equations), which usually demands excessive CPU memory and CPU time (Yeh and Tripathi, 1989). On the other hand, the SI approach is much more efficient in terms of the CPU memory and CPU time requirements, and provides perhaps the best hope for realistic, practical two- and three-dimensional applications (Yeh and Tripathi, 1989).  Chapter 4. NUMERICAL MODEL DEVELOPMENT  50  Another decision to be made is how to choose the primary dependent variables (PDV5) and the secondary dependent variables (SDVs) among all the unknown variables. Values of the PDVs are obtained by solving the primary governing equations, usually partial differential equations, and values of the SDVs are determined by solving the secondary governing equa tions, which are made of mainly chemical reaction equations. Yeh and Tripathi (1989) conclude that selecting the total analytical concentrations of the aqueous components as the PDVs for the hydrological transport equations has the advantage of being able to encompass the full comple ment of geochemical processes, such as complexation, redox, acid base reactions, sorption, and precipitationldissolution reactions either in equilibrium or kinetically. Based on the above reasons, the sequential iteration approach is used in solving the mixed set of partial differential and non-linear algebraic equations. The total analytical concentrations of the aqueous component species Tk (k  =  1,2,  .  .  .  ,  I), the water pressure potential  m’  and  the temperature T are selected as the primary dependent variables. The pressure potential is se lected as the PDV for the water flow equation so that continuity exists at boundaries of different soil types. All other unknown variables can be calculated directly or through solving a system of algebraic equations at each node.  4.2  Finite Element Formulation  The finite element is widely used to solve a variety of important problems in engineering. The region, in which the water and heat flow and solute transport take place, is subdivided into a number of small elements, in each of which the field variable (pressure head, temperature, or solute concentration) is approximated by some simple function. The variational method and the method of weighted residuals are two of the most commonly used formulations. The variational method has been used extensively to solve the differential equations that govern the behavior of mechanical systems, e.g., in the field of structural mechanics and elasticity. The method of  Chapter 4. NUMERICAL MODEL DEVELOPMENT  51  weighted residuals, on the other hand, is widely used in groundwater flow and solute transport modeling. In the method of weighted residuals, the field variable in a element is approximated by a weighted function of the field variable values at the nodes of the element. When this approx imate solution is substituted into the governing partial differential equation, a residual value is obtained at each point in the interested domain. A final solution is obtained by forcing the weighted average of the residuals for each node in the finite element mesh to be zero. Let’s consider a partial differential equation of the form: L(H(z,y,z))  —  F(x,y,z)  (4.108)  0  =  where L is the differential operator, H is the field variable, and F is a known function of space. An approximated solution H is defined as: ft(x,y,z)  =  1 N(x,y,z)H  (4.109)  where N are interpolation functions, H are the (unknown) values of the field variable at the nodes, and in is the number of nodes in the mesh. When this approximate solution is substituted into the partial differential equation (equation (4.108)), a residual is obtained: R(x,y,z)  =  L(ft(x,y,z))  —  F(x,y,z)  (4.110)  0  where B is the residual or error due to the approximation of the field variable. In the method of weighted residuals, the weighted average of the residuals at the nodes is forced to be equal to zero: (4.111) where W(x, y, z) is a weighting function and Q represents the interested domain. Q can be a length (in one-dimensional problems), an area (in two-dimensional problems), or a volume (in three-dimensional problems). Substituting equation (4.110) into equation (4.111) we have: /w(x,y,z) [L(E(x,y,z))  —  F(x,y,z)] dQ  =  0  (4.112)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  52  In the finite element method, H is defined in a piece-wise fashion over the interested domain, i.e. the value of H in an element is only related to the values of the field variable at the nodes in the element. The value of H, within an element e, H(e), is defined by: (4.113)  = ZNJH 1 where  are the element interpolation functions, and ii is the number of nodes in the element.  Different methods are used to define the weighting function W(x, y, z). The Galerkin finite element method, which is the most commonly used method in the field of groundwater flow and solute transport, defines the weighting function as one identical to the interpolation function used to define the approximate solution H, i.e.: (x,y,z) = N 1 W 1  (4.114)  More detailed description of the Galerkin method and other types of finite element formu lation can be found in Zienkiewicz and Taylor (1989).  4.2.1  Water Flow Equation  Now let’s apply the Galerkin finite element method to the problem on hand. First let’s look at the water flow equation (equation (4.97)). The residual function for the water flow equation is defined as: R  = c8m  where  —  V.(DTW VT)  —  w Vm) + V.(Dcw VC) 9 V(D .  .  —  V.(K Vz)(4.115) .  is defined as: NM  (4.116) where NM is the total number of nodes in the finite element mesh. Apply the Galerkin method to equation (4.115), we have: = R R 1 dQ=O jN  (4.117)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  where R is the residual at node i.  53  & equals to the total contribution to the residual from all  elements that are joined to node i  =  (4.118)  ZR  where NE is the number of elements in the mesh, and  f  = fl(e)  NRdQ  (4.119)  Substituting equation (4.115) into equation (4.119), we have:  =  I(e)  8 N[C  —  Ut  +V(Dcw VG) .  =  L  V(DTW VT) .  V(Dow V) .  V(K Vz)] dQ  —  d  )CbaT  —  J(e)  Aç [v.(DTw VT + Dow• .  (4.120)  —Dcw VG + K Vz)] dQ .  where b) is the piece-wise approximation of Øm in element e:  =  N4bmj  (4.121)  The summation is done over all nodes in element e. The second integral of equation (4.120) can be separated into two terms by noting that: Pq(e)V(DVT±DV(C)DVC±KV) V.[NJ(DTW.VT+DoW.V-DCW.VC+K.Vz)]  VN  (DTw VT + Dow V)  Dcw VC + K Vz)  (4.122)  .  —  Substituting equation (4.122) into equation (4.120) gives:  Bce)  = Jç2(e) /  Nfr)C U 1 m dQ 3t  Le)  (  TW  V+  0W  v V0  Vz)]dQ  +iVA.(DTW.VT+DoW.V_DCW.Vc+K.VZ) dQ (4.123)  54  Chapter 4. NUMERICAL MODEL DEVELOPMENT  The second integral J 1 in equation (4.123) can be transformed by using the divergence the orem (or Gauss’ theorem): p  I VAdfl= in where dS  ,(e) is  (4.124)  A dS  N dS, S is a closed surface bounding a region of volume 2, and N is the positive  =  1 term can be written as: (outward drawn) normal to the surface. The J  J I J  =  v.[Ac()(DTw.vT+Dow.v)-Dcw.vc+K.vz)] dQ N(e)(D  VT+DVD  5(e)  =  =  Nq  5(e)  VC+KVz)  dS (4.125)  dS  where qU/ can be considered as the inward water flux at the element boundary induced by gra dients of pressure potential, temperature, solute concentration and gravity. Substituting equations (4.125) and (4.121) into equation (4.123), and using piece-wise ap proximation for T and C, gives:  ffl(e) ]vJ)clNe)  =  —  Is(e)  e)qw. dS  vrç (Dew V(Z N4bmj) dQ  +  .  (DTW vN4e)) d] .  [L()  VN (D0w vN)dQ] c .  .  +J()  aN!e)KdQ  (4.126)  Substituting the above equation into equation (4.118) and rearranging it into the form: [A}  {8m  }  + [D]  {m} =  {F}  (4.127)  we have  =  zJ  N(e)CN(e) dQ  (4.128)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  Dtuii  VN  =  =  (Dow VN5)dQ  e)w  j  55  :c [L€  dS —  (4.129)  VN (DTW vNr))dQ] .  VN.(Dcw.V)dQ]Ci e=I  j  NE  —zJ  fl(e)  e=1  4.2.2  8N KdQ Uz  i,j=1,2,...,NM  (4.130)  Heat Transfer Equation  Because the heat transfer equation is identical in form to the water flow equation, the finite el ement formulation by the Galerkin method can be obtained by following the same procedure as for the water flow equation. The Galerkin formulation for the heat transfer equation can be summarized as [Ahj  {}  +  [Dhj {T}  (4.131)  = {Fh}  where = Dh1  L(e)  (4.132)  vNC) •(DTT vNjjdQ  (4.133)  .  =  =  NChN dQ  dS_zZ[j  (e)  z —L :  +  e1  NE  (DCT vN) dQ] c  j  oN(C) DzTdQ  i,j = 1,2,... ,NM  (4.134)  where qt is the inward heat flux normal to the boundary surface of element e caused by the combined effect of pressure potential, temperature and solute concentration gradients.  Chapter 4. NUMERICAL MODEL DEVELOPMENT  4.2.3  56  Solute Transport Equations  The solute transport equations (equation (4.99)) can be rewritten as Oj+Tk+V•VTk—V.(ODVTk)=  k=l.2...,I  (4.135)  The residual function is then defined as: B  9DTkBOITVVTV(ODVT)VV(SP)  =  +V.[OD.V(Sk+Fk)]—(1—e)Ck  k=1,2...,I  (4.136)  Applying the Galerkin formulation to the above equation, we have:  = ZR =  zJ  jv6)BdQ =  o  (4.137)  The element residual R can be evaluated as:  =  f  q(e)jj  = +V• [OD V(Sk + Ph)] .  —  (1  )OOlG  dQ  = 6 7 1 J ± 2 3 4 5 + J  (4.138)  where J 1 through J 7 represent the corresponding terms in the above equation. These integral terms are evaluated by:  y(e) T 9 ( 0 k = =  =  z  (z  ) t L(  N 1 Ns  dQ)  81  v(e)T) €112. (4.139)  57  Chapter 4. NUMERICAL MODEL DEVELOPMENT  = Jfl(e) p,T(e)OO1T c/Il = (I) = = j(e) it  2  (V VTk) c/fl  = Jfl(e) —J  4 J  = =  fl(e)  —  Js(e)  = —  Js(e)  (4.140)  c/Il) Tk  (v  [Le  .  vN) dIl] Tki  (4.141)  NV.(ODVTk)dIl v.(Aç)oD.vTk) dIl+J (N(e)OD VT). c/S +  (N(e)OD VT). c/S +  VNf(6D•VTk)dIl  Lce) >Z [Le  vN (GD VTk) c/Il .  .  (GD vNJe)) c/Il] Tki  VN  .  (4.142)  =  =  = =  = =  =  —J  N(e)Vv(S+p)dIl  fl(e)  [Le  —  I J  .  NV(GDV(Sk+Pk)]dIl  (e)  15(e)  J  5(e)  v [N)OD V(S + Pk)] dli —  [NS)OD V(Sk + Pk)]. dS .  —  [ir)rn V(Sk + Pk)]. c/S .  [Le  6 —L  —  —  = —  [GD V(Sk + Pk)j dli .  fl(e)  VN [GD V(Sk + Pk)] c/Il  j  .  .  —  {Jse  (4.144)  e)7LCkdIl  pq(e)( [Le  +  J  (6D vNjj c/Il] (Ski + Pki)  N(e)(1  =  4  (4.143)  N (V vNr) dli] (Ski + Pk)  e)LN c/Il]  (4.145)  Oki  (N)GD VT). dS —  f  [N(e)OD V(S + Pk)]. dS} .  Chapter 4. NUMERICAL MODEL DEVELOPMENT  E/  VN  58  (GD VN) d2] Tk  vAc(e) (SD VN) dJ (Ski + Pk) .  = —  V(T  j  E[  j.J(c)  viv• (SD  E[  LJQe) VN =  = —  —  dS  —  vr4e))  dQ] Tki  (GD• VN)dQ] (Ski +  [/  .  .  [Jfl(e)  A [Jfl(e)  .  (SD vNr) dfl] (Ski + Pki) .  dS +  zi El  Fki)  VN (GD VN) dQ] Tki  [Jfl(e)  i  z [/ i  .  .  k 5  (N(e)GD VCk)* dS +  £ce)  —  —  Z  VN  (GD vNfl d2] Tki  VN (SD vNJe)) dQ] (Ski + .  Fki)  (4.146) where =  D VCk  (4.147)  is the normal inward diffusion flux to the element e of the kth component species. Combining equations (4.139), (4.140), (4.141), (4.143), (4.145) and (4.146) we have: =  >  (J  [L +  N ctQ) 1 NG  + i  pq(e) (6)  (v. VNJC)) dcl] Tk  Ff vi4. (SD Ln  .  (I  NPLNce) d12) Tk Ut  vNC)) dcl  (GD vN6)) dcl] (Ski + .  [f  Fki)  N (v vNr) dcl] (Ski + Pki) .  (6)  pr(e)qc.  —  Chapter 4. NUMERICAL MODEL DEVELOPMENT  —  —  L.  \J(e) {Le  +  E)N,ce)  )  dQ] Ck  at  [NNJC + N(v. vN4) + • (OD vNr)) + Aç .  e)qc. —  59  ls(e)  [f  dS —  Ji  —  (v. VNj)]  (OD.  dQ}Tk  dQ} (Ski + Fkj)  e)NJe) dQ]  Ckj  (4.148)  Substituting equation (4.148) into equation (4.137) and rearranging it into the following form: ]{} +[D 0 [A } 0 ]{Tk} = {F 0  k = 1,2,..  (4.149)  where 1 NE  (4.150)  =  Le)  N + I4°(V. VN) 80 [iv)  +VN (OD vN)] dQ  (4.15 1)  .  =  zi  .  dS +  e=1  +VN (OD vNi] .  +  4.3  z{j  e1 .  p(e)( —  [N(v vN) .  j  dQ}(sk  +  Pki)  E)NJ dQ] Ck  (4.152)  Finite Difference Formulation for Time-Derivatives  Equations (4.127), (4.131) and (4.149) are all in the same general form: [Aj  {}  + [D] {H} = {F}  (4.153)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  where H is a field variable representing either  m’  T, or Tk, k  60  =  1,2,.  .  .  ,  I. Equation (4.153)  is a system of ordinary differential equations. Solution of this system of equations provides values of H and  .  Several methods are available for solving this system of equations, but it is  conmion practice in groundwater flow and solute transport modeling to use the finite difference method. From elementary calculus, the time derivative of a function H can be approximated as: Htt  ÔH at  —  Ht  (4.154)  At  and by introducing a relaxation factor w (0 H  =  w  1), H can be estimated by:  (1 _w)Ht +wHtt  (4.155)  and Htt  2Ht+i  —  Ht  (4.156)  Substituting equations (4.154), (4.155) and (4.156) into equation (4.153), and rearranging the equations gives a set of algebraic equations for the unknown variable at time t + 2 ([A] + [D]wAt) {H}t  =  [Al + (2w  [2  —  1)  t + {F} At [Dl Atl {H}  (4.157)  Depending on the selection of w several different subsets of the finite difference formulation are defined. Some special cases are: Forward Difference Method (w 2  [Al {H}  =  (2 [A]  —  =  0)  t + {F} At [Dl At) {H}  Central Difference or Crank-Nicholson Method (w 2 ([A] + [D]  )  {H}t =2  (4.158)  =  t + {F} At [Al {H}  (4.159)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  Backward Difference Method (w 2  ([Al  + [D] At) {H}t  =  61  =  1)  (2  t + {F} At [Al + [DJ At) {H}  (4.160)  Replacing variable H with appropriate field variable (pressure potential, temperature, or so lute concentration) into equation (4.157), we have following sets of algebraic equations for wa ter flow, heat transfer, and solute transport, respectively: 2  ([Awl + [D] wAt) {m}t  2 ([Ah] + [Dhl wAt) {T}t+  2  ([Aol + [Del wAt)  {Tk}t+P  =  =  =  [2  [Awl + (2w  [2 [AhI + (2w  [2  [Aol + (2w  —  —  —  1)  [Dl At) {m}t + {F} At (4.161)  1) [Dhl  t AtI {T}  1) [Do]  AtI  + {Fh} At  (4.162)  {Tk}t + {F} At k=1,2,...,I  4.4  (4.163)  Solution of System of Equations  Equations (4.161), (4.162) and (4.163) all have the form:  [Ml {X}  =  {B}  where [Ml is a matrix of known coefficients  (4.164) {X} is a vector of unknowns x, and  [BI  is a  vector of known values b. There are many different numerical methods that can be used to solve equation (4.164). In selecting an appropriate method to solve the equations of groundwater flow, heat transfer, and solute transport, the following characteristics of equation (4.164) should be considered: 1.  [Ml is diagonally dominant, i.e., for any row or column the entry on the main diagonal is larger than the other entries in the row or column.  2. [M} is sparse, i.e., it contains many zero entries.  Chapter 4. NUMERICAL MODEL DEVELOPMENT  3.  62  [Mj is banded, i.e., the non-zero entries in the matrix are all located in a strip with a dis tance from the main diagonal. The width of the band depends on the size of the finite element mesh, and the ordering of the node numbers.  4. [M] may or may not be symmetrical. For the water flow and heat transfer equations (equa tions (4.161) and (4.162)), EM] is symmetrical, while for the solute transport equations (equation (4.163)), [IvV, is non-symmetrical. 5. Equation (4.164) is nonlinear, because some or all of the coefficients in [M] are functions of the unknowns {X}. For example, coefficients in [M] in equation (4.161) are usually functions of hydraulic conductivity, which in turn is a function of pressure potential in unsaturated conditions. 6. Equations (4.161), (4.162) and (4.163) are coupled, i.e., the coefficients in [M] and {B} for one equation are functions of the unknowns of the other two equations. For example, coefficients in [M] for the water flow equation (equation (4.161)) are both functions of soil temperature and solute concentrations. Let’s first concentrate on the solution methods of a system of linear algebraic equations, which is the basis of many other methods for solving systems of nonlinear algebraic equations and coupled systems of algebraic equations.  4.4.1  Solving Systems of Linear Equations  There are two groups of numerical methods for solving large systems of linear algebraic equa tions: direct methods and iterative methods. Direct methods usually apply some type of fac torization on the coefficient matrix and use forward elimination and backward substitution to solve the factorized systems of equations. On the other hand, iterative methods start with an initial guess for the unknowns, and improve the guess according to various criteria.  Chapter 4. NUMERICAL MODEL DEVELOPMENT  63  Choleski Method The Choleski method is a direct technique for solving a system of linear algebraic equations. It makes use of the fact that any square matrix [M] can be decomposed or factorized into the product of two triangular matrices [Mj =  [LI  [U]  (4.165)  or in a full matrix form  mnl  mn2  111  0  121  122  0  ml  n2 1  3 l  .  0  1  1112  1113  0  0  1  1123  Inn  0  0  0  1 (4.166)  The entries of [L] and [U] are given by: i—I  =  IikUkj  —  i  j  (4.167)  i<j  (4.168)  i<j  (4.169)  k= 1  l=0  ikkj 1  —  =  1  i =j  (4.170)  =  0  i  j  (4.171)  >  Once [M] has been factored into lower and upper triangular matrices, equation (4.164) can be written as: [L] [U] {X}  =  {B}  (4.172)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  64  If we define a vector {Z} as: [U] {X}  {Z}  (4.173)  {B}  (4.174)  =  we have: [L}{Z} or =5’ 21 + z 1 z 22 1 2  lnlZl  +  in2Z2  =  (4.175) +  +  =  which can solved for the values in {Z} using: 1 b —  Z likZk  71  i=1,2,...,n  (4.176)  Then equation (4.173) can be used to solve for values in {X}: =  ttn+1_j,n+j_kXn+1_k  Zm+1_i —  i  =  1,2,...  ii  (4.177)  k= I  This step is also called backward substitution. If [Mj in equation (4.164) is a symmetric matrix, [M] can be decomposed into the product of an upper triangular matrix and its transpose: [Mj  =  T [U]  (4.178)  FLU]  where the entries of [U] are given by: i—i  / = —  Z  k=1  \1/2  I  =  j  (4.179)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  65  —  k=1  =  i  uu ttij =  <j  (4.180)  j  (4.181)  i >  0  If we define a vector {Z} as: [U] {X}  =  {Z}  (4.182)  we can write: {Z} T [U]  =  {B}  (4.183)  Solving equation (4.183) for {Z} gives:  —  (4.184)  uu and then solving equation (4.182) for {X} by backward substitution gives: ttn+1_i,n+1_kXn+1_k  =  (4.185)  —  un+1—i,n+1—i  Conjugate Gradient Method One of the commonly used iterative methods to solve a system of linear algebraic equations is the conjugate gradient method. First let’s give the following definition. For a symmetric posi tive definite matrix [M], a set of vectors {P}k (k  =  0, 1,.  .  .  ,  N  —  1) is said to be M-orthogonal  or M-conjugate, if i,j=0,1,...,N—1;ij for any ij.  (4.186)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  66  The conjugate gradient method to solve the system of linear equations (equation (4.164)) starts from an initial arbitrary vector {p} 0  =  9 {r}  =  {B}  —  [Mj {X} 0 and builds up a se  quence of M-conjugate vectors {P}k. The iterative procedure for the conjugate gradient can be summarized as: 0 1. Specify initial approximate solution {X} 0 2. Calculate the initial residual vector {r}  {r}  =  3. Set {p} 0  0 {B}  =  —  (4.187)  [M] {X} 0  0 {r}  4. Fork=O,1,2,...dothefollowing: (a) Compute a scaler  ak  by  =  (4.188)  {P}k [M] {P}k  (b) Compute the residual vector =  {r}k  —  {r}k  by  [M] {P}k  ak  (4.189)  (c) Calculate a scaler j3,, by =  {r} [M]  {P}k  13k  (4.190)  (d) Construct a M-conjugate vector {P}k+j by {P}k+1  = {r}k+l  +  k 3 /  {P}k  (4.191)  (e) Compute the new solution vector {X}k+l by =  {X}k +  Uk {P}k  (4.192)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  67  Theoretically, the Nth solution vector should be equal to the true solution of equation (4.164) where N is the size the coefficient matrix [M] (N x N). Therefore, the conjugate gradient method should theoretically converge in N steps.  Bi-Coujugate Gradient Squared Method For solving large sparse symmetric or slightly nonsymmetric linear systems, the conjugate gra dient method is one of the most efficient iterative methods. However, when the system is not symmetric, as with the finite element formulation of solute transport equations, the conjugate gradient method is not applicable. There are some generalized conjugate gradient methods, one of which is the bi-conjugate gradient squared method (BCGS). Detail description of the BCGS technique  be found in Sonneveld (1989). The algorithm of BCGS is summarized in the  can  following way: 1. Specify initial approximate solution {X} 0 2. Calculate the initial residual vector {r} 0 {r}  =  3. Set {p} 0 4. Fork  =  0 {B}  =  [M] {X} 0  —  0 {q}  (4.193)  0 {r}  =  0,1,2,... until convergence do the following: {r}T{r}  =  {u}k  (4.194)  {r} [M] {q} =  ak  [M] {q}  {X}k +  Ok({P}k  {P}k  =  —  = {r}k  —  ak  [M]  (4.195)  + {u}k)  (4.196)  +  (4.197)  ({P}k  {u}k)  68  Chapter 4. NUMERICAL MODEL DEVELOPMENT  -  Pk+1  = {r}k+l  +  k+1 {u}k 3 1  {P}k+1  +  k+lC 3 / k 8 +1 {u}k  =  4.4.2  (4.198)  T {r} {r}k  (4.199) +  {u}k)  (4.200)  Solving Systems of Nonlinear Equations  There are several methods which can be used to solve systems of nonlinear algebraic equations. We will discuss two of them in the following section.  Picard Iteration Method For a system of nonlinear algebraic equations of the form: [M(X)] {X}  =  (4.201)  {B}  in which some or all of the coefficients in [M(X)] are functions of {X}, Picard iteration method can be summarized as follows: 1. Specify initial approximate solution {X} 3 2. Fork  =  1,2,3,... until convergence do the following:  (a) Construct the coefficient matrix [M(Xk_j)] (b) Solve the system of linear equations  [M(Xkl)1  {X}k  =  {B}  (4.202)  for {X}k by using one of the solution methods for systems of linear equations (c) Construct the error vector {R}k  =  {X}k  —  {}k using  (4.203)  Chapter 4. NUMERICAL MODEL DEVELOPMENT  69  Newton-Raphson Method For a system of nonlinear equations of the more general form: ,. 2 f(xi,x  .  .,x)  =  i  0  =  1,2,... ,N  (4.204)  or  N  (4.205)  (e.g., equations (4.100) through (4.107)), the Newton-Raphson method can be used for faster convergence. The algorithm of the Newton-Raphson method can be summarized as: 1. Specify initial approximate solution {X} 0 2. For /c  =  1,2,3,... until convergence do the following:  (a) Construct the Jacobi matrix [J(Xk_j)], where =  i,j Xj  =  1,2,...,N  (4.206)  {X}={X}k_l  (b) Compute the residual vector =  —fj({X}kl)  (4.207)  (c) Solve the system of linear equations: [J(Xk.l)] { X}k 6  =  (4.208)  for { X}k by using one of the solution methods for systems of linear equations 5 (d) Construct the new solution vector {X}k using: {X}k  =  {X}k_l + {SX}k  (4.209)  Chapter 5  COMPUTER MODEL DEVELOPMENT  In chapter 3, a set of mixed partial differential and nonlinear algebraic equations has been devel  oped to describe the simultaneous processes of water flow, heat transfer, and transport of reac tive multicomponent solute in variably saturated soils. In chapter 4, the Galerkin finite element method has been used to discretize the partial differential equations, and a coupled system of nonlinear algebraic equations has been developed. Solution methods of this system of equations have also been briefly discussed. In this chapter, computer implementations of the numerical model developed in the last chapter will be presented.  5.1  Overview of the Computer Model  The computer model is based on the finite element discretization in space and the finite differ ence approximation in the time derivatives, as discussed in the last chapter. The computer code is written in C language for its string and character handling capability. It uses a similar struc ture as the finite element computer code of Istok (1989), and some of his codes in FORTRAN, especially the element routines, are modified for use in this computer model. Some of the major features of the computer program are listed below: I. An automatic mesh generator is included to make discretization of the interested domain easier. In most cases, the automatic mesh generator will speed up considerably the pro cess of generating a finite element mesh. In certain cases, manual modification of the generated mesh may be necessary for special considerations. The mesh generator can  70  ChapterS. COMPUTER MODEL DEVELOPMENT  71  produce up to nine element types in one-, two-, and three-dimensions that can be directly used in the main finite element program. It also calculates certain node and element in formation, such as node numbers in an element and node connectivity, that is needed by the main program. 2. The main finite element program can solve one-, two-, and three-dimensional problems using up to 15 horizontal and vertical element types. For one- or two-dimensional prob lems, if gravity is going to be taken into account, the vertical variety of an element type should be used, otherwise the horizontal variety of the same element type should be used. If the existing element types cannot provide satisfactory results for certain problems, other element types can be added to the program easily. 3. It provides three numerical methods to solve the sets of algebraic equations resulting from the Galerkin finite element formulation: the banded matrix, the sparse matrix method, and the iterative method. (a) The banded matrix method is efficient for one-dimensional problems or small twoor three-dimensional problems. For large two- or three-dimensional problems, it requires excessive computer memory as well as excessive CPU time, and therefore is not practical for most existing computer systems. (b) The sparse matrix technique uses a linked list and allocates memory dynamically for non-zero entries of the coefficient matrix and fill-ins during the process of fac torization, and thus requires much less computer memory for large sparse matri ces. It is also more efficient in terms of computing time because less computation is done on zero entries of the coefficient matrix. The code implemented in this pro gram uses factorization and forward and backward substitutions to solve the sys tem of equations. It is modified from the SPARSE package written by Kundert and  ChapterS. COMPUTER MODEL DEVELOPMENT  72  Sangiovanni-Vincentelli (1988) of the University of California, Berkeley. (c) Another group of methods to solve large two- or three-dimensional problems is the iterative methods. There are many iterative methods available for varieties of prob lems. Two iterative methods are implemented in this computer model: conjugate gradient method for symmetric problems, such as the water flow and heat transfer problems, and the more general bi-conjugate gradient squared method for general nonsymmetric problems, such as problems of advective-dispersive solute transport in porous media. The algorithms of the conjugate gradient and the bi-conjugate gra dient squared method have been presented in the last chapter. More complete dis cussion of the theories and algorithms of the iterative methods can be found in Hage man and Young (1981). 4. The water flow equation, the heat transfer equation, and the solute transport equations are solved sequentially and independent of each other. This method is very efficient in com puter memory usage and can also be computationally much less intensive than solving these equations at the same time. 5. The system of nonlinear algebraic equations for the chemical equilibrium reactions is solved separately from the solute transport equations using the Newton-Raphson method. This module virtually stands alone and can be easily modified to take into account other types of chemical reactions with little effect on other parts of the computer model. 6. An automatic algorithm to find the right minerals that exist in the system at each time step is implemented. Minerals will precipitate if the soil solution is supersaturated, and dissolve if the soil solution is undersaturated. The mineral with the highest or lowest sat uration index will precipitate or dissolve first. The saturation index is defined as the ratio of the activity product of the components in the soil solution that form the mineral and  ChapterS. COMPUTER MODEL DEVELOPMENT  73  the solubility product of the corresponding mineral. 7. The computer model provides three options to simulate the transport processes of differ ent solutes: a single component system, a closed system, and an open system. A single component system is one which has only one nonreactive chemical in the solution, e.g. the transport of a nonreactive tracer. A closed system is a system in which the solution is isolated from the atmosphere. An open system is a system in which the solution is in constant contact with the atmosphere and the soil air phase. 8. The computer program is written in a modular form, therefore it is easy to modify part of the program or to write a different module for a certain task. For example, other solution methods of systems of linear algebraic equations can be used instead of using the three methods implemented in the computer program. 9. The boundary conditions can be constant or time-dependent. If the boundary conditions at certain nodes are time-dependent, the user is required to tabulate the functional relation between the boundary condition and time. The program will automatically calculate the boundary conditions at each time step for the right nodes. The program implements this feature in a very efficient and convenient way. 10. The input is divided into different types and is controlled by self-explaining keywords, therefore the input files are easier to read and modify. The computer program does not require in most cases that the data are placed in a predefined order, thus providing greater flexibility and is less prone to mistakes. 11. The program can restart from the last simulation run. At the end of each simulation, the program saves all the necessary information to a special file. When the program is started again, it will check to see if this special file exists. If it does exist, it will ask the user if it should restart from the end of the last simulation run. This feature provides the user with  ChapterS. COMPUTER MODEL DEVELOPMENT  74  a chance to check if the simulation is giving the right results before a long simulation is completed. It is also possible to change boundary conditions in the middle of a simulation.  5.2  Solution Methods and Data Storage Schemes  In solving the partial differential equations for water flow, heat transfer, and solute transport problems, one of the most important decisions is how to store the coefficient matrix resulting from the finite element and finite difference formulation of the partial differential equations. This matrix can contain hundreds of thousands of cells, and full storage of this matrix can take up excessive computer memory which may be beyond the capacity of many current computer systems. For example, for a problem with 2000 nodes in the finite element mesh, this full coef ficient matrix can consume up to 2000 x 2000 x 8 or 32 MBytes of computer memory assuming double precision is needed in the computation. Furthermore, full storage of this matrix may also require excessive computations on zero entries of the coefficient matrix. Of course, no modeler will ever use the full matrix method to store the coefficient matrix in practice. There are different storage schemes to take advantage of the sparse characteristics of the coefficient matrix. Yeh and Tripathi (1989) made some detailed analyses on the computer Cpu memory requirements of different data storage schemes. In the following sections, some imple mentation considerations will be discussed for the three solution methods used in the computer model: the banded matrix method, the sparse matrix method, and the iterative method.  5.2.1  Banded Matrix Method  There are two general groups of methods to solve a system of linear algebraic equations: direct methods and iterative methods. The banded matrix method is the most widely used direct solu tion method in the existing models (Rubin and James, 1973; Valocchi etaL, 1981; Jennings et aT, 1982; Kirkner et aT, 1984a, 1985; Lewis et aT, 1987). Its wide use is due to its simplicity in  ChapterS. COMPUTER MODEL DEVELOPMENT  75  algorithm and in implementation in a computer program. It is very efficient for one-dimensional problems, but becomes less efficient and often impractical for large two- and three-dimensional problems because of its excessive requirements on computer CPU memory and CPU time (Yeh and Tripathi, 1989). In the last chapter, we have mentioned that the coefficient matrix is a banded matrix. All the non-zero entries are within a band of specific width, with the diagonal of the matrix as its center. All entries outside this band are zeros. The banded matrix method takes advantage of this property and uses a vector to store only the entries within the band. All entries outside this band are discarded. The Choleski decomposition method is used to factorize the coefficient matrix in vector storage. During the factorization, all the fill-ins (the original zero entries that become non-zero after the factorization) fall within the diagonal band. In the computer program, the computer memory is dynamically allocated to store the coeffi cient matrix using vector storage. The size of the vector needs to be calculated for each specific problem. For a symmetric matrix, only the upper half of the band and the diagonal entries need to be stored. The size of the vector storage needed for a symmetric matrix can be computed by: SIZE  =  SBW(NDOF  —  SBW + 1) + (SBW  —  1)  (SBW)  (5.210)  where NDOF  =  the number of degrees of freedom, or the number of unknowns.  SBW  =  the semi-bandwidth of the matrix.  For a nonsymmetric matrix, all entries in the diagonal band must be stored. The size needed for the vector storage is computed by: SIZE  =  2 (NDOF)  —  (NDOF  —  SBW)(1 + NDOF  —  SBW)  (5.211)  where NDOF and SBW are as defined above. The vector storage is row-wise, i.e., it stores the first row first, then second, then third  then nth row. Algorithms can be easily developed to  ChapterS. COMPUTER MODEL DEVELOPMENT  76  establish the relationship between the location in the full coefficient matrix and its correspond ing location in the vector storage for both the symmetric and nonsymmetric matrices. From the above two equations, it is clear that the size of the vector in vector storage depends on NDOF, the number of unknowns (or number of equations), and SBW, the semi-bandwidth of the matrix. The larger are NDOF and SBW, the larger the vector size. NDOF is related to the size of the finite element mesh, and in the case of the sequential iteration method (SIA), NDOF is equal to the total number of nodes in the finite element mesh minus the total number of nodes with specified values of the state variable (the Dirichlet boundary condition or the first kind boundary condition). On the other hand, the semi-bandwidth of the matrix, SBW, is not only related to the size of the mesh, but also to the arrangement of the nodes in the mesh. SBW usually is the largest difference of node numbers in all the elements in the mesh. Therefore, in order to reduce the value of SBW, there are two general rules to follow: 1. Always number the nodes sequentially, and 2. Always number the nodes along the dimension with fewer nodes. There are some automatic mesh generators which can optimize the node numbering in a finite element mesh to produce the smallest semi-bandwidth. The automatic mesh generator developed for this computer model does not include this node numbering optimization, because even after the optimization, the banded matrix storage is still too wasteful for moderate and large two- and three-dimensional problems. There are still too many zero entries in the banded area, and much computation time is wasted in performing operations on these zero entries.  5.2.2  Sparse Matrix Method  Another direct technique to solve a system of linear equations is the sparse matrix method. It takes advantage of the fact that the coefficient matrix is sparse and allocates computer memory  ChapterS. COMPUTER MODEL DEVELOPMENT  77  only to non-zero entries and fill-ins during the subsequent factorization of the coefficient ma trix (Kundert, 1986). This storage scheme is more efficient in terms of CPU memory and CPU time than the banded matrix method for large sparse systems of linear equations, such as those resulting from finite difference and finite element formulations. However, the complexity and overhead in its implementation may offset this advantage for small and even moderately sized problems, and make it less efficient. The sparse matrix technique exploits the sparsity of a matrix by not storing entries that are zero. This is desirable for three reasons. The first and the most obvious is the reduction of the amount of computer memory required to store the coefficient matrix. The second advantage is that it takes less time during factorization because no time is required to access those entries that are zero and test to see if they are truly zero. The third advantage is that it avoids performing the trivial operations such as multiplication by zero and addition with zero. However, these advantages come with a price: not storing zero entries greatly complicates the data structure used to store the coefficient matrix because a simple two-dimensional array can no longer be used. Instead other types of data structure must be used. There are many ways of efficiently storing the nonzero elements of a sparse matrix. One of the most commonly used methods is the linked lists because of its simplicity and flexibil ity. The matrix is stored in an orthogonally linked list format, where every nonzero element is represented by a list node. To retain the two-dimensional structure of the matrix, every node in the list is linked to the one below it and to the right of it by pointers. Each node also contains the value of the nonzero element and matrix indices of the element. In C language, the data structure defining a element node is as follows: struct {  MatrixElement  double  Value;  irit  Row;  Chapter 5. COMPUTER MODEL DEVELOPMENT  mt  78  Ccl;  struct MatrixElement  *NextlnRow;  struct MatrixElement  *NextlnCol;  This linked list also requires three arrays of pointers, one contains pointers to the first el ement in every row (FirstinRow), one contains pointers to the first elements in each column (FirstinCol), and the third contains pointers to the diagonal elements (Diag). Using the above defined data structure, these arrays of pointers are defined as: typedef  struct MatrixElement  *Elementptr;  typedef  ElementPtr  *ArrayQfElementptrs;  ArrayofElementPtrs  Diag;  ArrayOfElementPtrs  FirstlnCcl;  ArrayOfElernentPtrs  FirstlnRow;  During the decomposition or factorization, some elements that are originally zero before factorization will become nonzero. Such elements are called fill-ins. It is desirable that the sparse matrix technique minimize the number of fill-ins, thus maintaining the sparsity of the matrix. This can be done by choosing the pivoting order. The Markowitz method (Markowitz, 1957) is one of several methods which can be used to minimize the number of fill-ins. It chooses as the pivot the structurally nonzero element defined as (r  —  1) (c  —  with the smallest Markowitz product, which is  1), where r is the number of nonzero elements in row i of the matrix  and c is the number of nonzero elements in column j of the matrix. Structurally nonzero ele ments are elements that are not guaranteed to be zero and, as a result, need to be entered into the linked list. Pill-ins are examples of structurally nonzero elements. It is worth noticing that structurally nonzero elements can be zero because of exact cancellation. When two or more  ChapterS. COMPUTER MODEL DEVELOPMENT  79  elements have the same minimum Markowitz product, the element with the largest magnitude should be chosen as the pivot. In order for decomposition to proceed to completion, none of the pivots may be equal to zero. Markowitz method avoids this by considering only those structurally nonezero elements as pivot candidates. However, as mentioned above, structural nonzeros cannot be guaranteed to be different from zero. Besides, if an element with small magnitude is selected as the pivot, excessive roundoff error may occur. Therefore the pivots must not only be different from zero, but also should be sufficiently different from zero. To assure this, a threshold is added to the Markowitz criterion. If the magnitude of an element is smaller than the threshold, it cannot be considered as a pivot candidate. The computer code for the sparse matrix implementation is modified from the SPARSE package written by Kundert and Sangiovanni-Vincentelli (1988) of the University of Califor nia, Berkeley. More detailed discussion on the implementation of the sparse matrix technique can be found in Kundert (1986).  5.2.3  Iterative Methods  Iterative methods are another group of numerical methods to solve a system of linear equations with a large and sparse coefficient matrix. Two iterative methods are implemented in this com puter model: the conjugate gradient method (CG method) and the bi-conjugate gradient squared method (BCGS method). The computer code for the iterative methods is modified from the NSPCG package (Oppe et al., 1988) of the Center for Numerical Analysis, the University of Texas at Austin. The algorithms of these two methods were given in chapter 4. In this section, we will discuss briefly some of the implementation issues.  ChapterS. COMPUTER MODEL DEVELOPMENT  80  Preconditioning of the Linear System In solving a system of linear equations of the form: [M] {X}  =  {B}  (5.212)  better results may be achieved by a technique called preconditioning. Preconditioning involves the selection of a matrix  1 [Q]  [M] {X}  =  [Q], called the splitting matrix, such that the preconditioned system:  [Q]’  {B}  (5.213)  is better conditioned than the original system, [M] {X} the selection of  [Q]  =  {B}. Clearly, one requirement for  is that it be easily invertible.  The preconditioning used in equation (5.213) is called left preconditioning. There are also right preconditioning:  ([Ml 1 [Q] ) ([Q1 {X})  =  (5.214)  {B}  and two-sided preconditioning:  ([QJZ’  [M] [Q] )([Q]R {X}) 1  =  [Q]’ {B}  There are many ways to select the splitting matrix  (5.215)  [Q], such as the Richardson method, the  Jacobi method, and the successive overrelaxation method. In this computer model, the Jacobi left preconditioning method is used. For the Jacobi method, the splitting matrix is selected as  [Q]  =  [Di, where [Dj is the diagonal of [M].  Data Storage for Iterative Methods The CO and BCGS methods with Jacobi preconditioning do not involve any kind of factoriza tion during the solution process, therefore fill-ins do not appear. This factor makes the storage scheme for iterative methods relatively simple and straightforward.  ChapterS. COMPUTER MODEL DEVELOPMENT  In this computer model, the coefficient matrix  81  [Ml is represented by two rectangular arrays  [COEF] and [JCOEF], one double and one integer. [COEF] stores the nonzero entries of the coefficient matrix [M], and the corresponding row in [JCOEF] stores the column numbers of these nonzero entries. Both arrays are dimensioned NDOF by MAXNZ, where NDOF is the number of degrees of freedom, or the number of unknowns in the system, and MAXNZ is the maximum number of nonzero entries per row in the matrix, with the maximum being taken over all rows. MAXNZ is normally equal to the maximum number of nodes connected to a node in the finite element mesh. For example, for a one-dimensional problem with linear 2-node elements, MAXNZ is 3; for a two-dimensional problem with linear 4-node elements, MAXNZ is 9; and for a three-dimensional problem with linear 8-node elements, MAXNZ is 27. Using this storage scheme, the matrix 11  0  0  14  15  0  22  0  0  0  0  0  33  0  0  14  0  0 44 45  15  0  0 45  [M]=  (5.216)  55  would be represented in the [COEF] and [JCOEF] arrays as: 11  [COEF]  =  14 15  22  0  0  33  0  0  14  44 45  15  45 55  (5.217)  ChapterS. COMPUTER MODEL DEVELOPMENT  82  and 145 200  [JCOEF]  3  =  0  (5.218)  0  145 145 There are several points that should be mentioned regarding this storage scheme: 1. If a row in matrix [M] has fewer than MAXNZ nonzeros, the corresponding rows in [COEFj and [JCOEF] should be padded with zeros. In the computer program, this step does not need to be performed explicitly because arrays [COEF] and [JCOEF] will be initialized to zeros before being used. 2. The nonzero entries in a given row of [COEF] may appear in any order, as long as the corresponding position in [JCOEF] stores its column number. However, if the diagonal element is not in column one, the computer program will place it in column one. For example, after this rearrangement, the above representation of [M] will be:  [COEF]  =  11  14  15  22  0  0  33  0  0  44  14 45  55  15 45  (5.219)  145 200  [JCOEF]  =  3  0  0  415 514  (5.220)  ChapterS. COMPUTER MODEL DEVELOPMENT  83  3. The actual storage in the computer program for [COEF] and [JCOEFI is by column, i.e., the first column will be stored first, then the second column, the third, and so on. In this way, the diagonal elements of the matrix are at the top of the arrays. 4. The advantage of this storage scheme is that it is relatively easy to implement and is read ily usable to solve the system of equations resulting from the finite element method. The disadvantage is that it is not very efficient for symmetric matrices. All nonzero entries must be stored in the matrix. However, this disadvantage may be of limited significance, because the system of equations resulting from the finite element formulation of the solute transport equations are nonsymmetric, therefore this disadvantage will not pose a limita tion on computer resources.  Stopping Tests For an iterative method to stop, a stopping test must be performed at each iteration. There are many kinds of stopping tests for this purpose. One requirement for selecting a stopping test for a specific problem is that it be relatively easy to perform. In other words, not much addi tional computation need to be done in order to perform the stopping test. There are two types of stopping tests built in the computer model. These two tests are: {r}  Test 1  {z}k  [Qj T {B} { 1 B}  [{  Test 2  <(  {zh]  where  [Q]  is the preconditioning matrix;  {X}k  is the current solution;  {r}k  =  {B}  —  (5.221)  —  [M] {X}k is the current residual;  (5.222)  ChapterS. COMPUTER MODEL DEVELOPMENT  { z},  =  [Q]’ {r}  84  is the current pseudo-residual, and is the tolerance level.  5.3  Chemical Equilibrium Model  In the last section, we discussed some of the implementation issues related to the solution of a large sparse system of linear equations. In this section, we will briefly discuss some of the issues related to the chemical equilibrium model. Equations (4.100), (4.104), (4.105), (4.106), and (4.107) form the complete chemical equi librium model for a system with I component species, Na aqueous species (Na  —  I complexed  species), N, sorbed species, and N precipitated species. It consists of I mass balance equa tions, Na  —  I complexation equations, N,  —  1 ion exchange equations, one charge balance  equation, and N precipitation equations. This set of equations is nonlinear. The number of equations rarely exceeds a few dozen. Therefore the solution methods and data storage schemes we discussed in the last section are not applicable in this case. Before we go any further, one more thing needs to be mentioned. Because hydrogen is always present in every chemical system, hydrogen is always automatically selected as one the component species by the computer model, and is always selected as the first component species. The mass balance equation of hydrogen is replaced by the solution charge balance equation which states that the net charge in the solution is equal to zero, or: Na  Zc Z j=1  =  0  (5.223)  where Z is the valence of the jth aqueous species. This eliminates the need for a transport equation for hydrogen.  ChapterS. COMPUTER MODEL DEVELOPMENT  5.3.1  85  Solution Method of the Chemical Equilibrium Model  Now the complete chemical transport model consists of I complexation equations, N 3  —  —  1 mass balance equations, Na  —  I  1 ion exchange equations, one charge balance equation on the  sorbing surface, N precipitation equations, and one charge neutrality equation for the soil so lution. The method used to solve this system of nonlinear equations is the iterative Newton Raphson method, which was given in chapter 3. The Newton-Raphson method is simple and easy to implement, and is very fast to converge to the true solution if the initial guess to the solution is close enough to the true solution. However, if the initial guess is far away from the true solution, the Newton-Raphson method may have convergence problems. For this method to achieve reliable and fast convergence in solving the nonlinear set of chemical equilibrium equations, some special considerations need to be made. The most problematic point for the Newton-Raphson method to fail is during the initializa tion process of the chemical system, because a good initial guess to the solution is not available at the beginning. If the Newton-Raphson method is directly applied to the system with a poor guess of the solution, it is most likely that the method will fail to converge. However, a good initial guess to the true solution is hard to come by. Considerable knowledge of the chemical system and primary calculation may be needed to obtain a good initial guess, which is not al ways practical. It is very desirable that the Newton-Raphson method give a reliable result even with a poorly guessed initial solution. This is made possible by the fact that a well-posed chem ical equilibrium system will have one and only one solution. To make the Newton-Raphson method converge during the initialization process with an arbitrarily guessed solution, the pro cedure used in this computer model is as follows: I. Set the initial guessed solution. For example, set the concentrations of aqueous species, sorbed species, and precipitated species all to 0.000001. 2. Because the activity coefficients of the aqueous species depend on the ionic strength,  ChapterS. COMPUTER MODEL DEVELOPMENT  86  which in turn depends on the concentrations of the aqueous species, there may be prob lems in the computation of the activity coefficients. To avoid any potential problem, the activity coefficients of the aqueous species are set to certain fixed values according to their charge during the initialization stage. The values used in the computer model are:  =  1.00  1 ifZ  =  0  3 8 . 0 7j  ifZ,=1  7j=O.(O  ifZ = 1 2  =  0.60  if otherwise  3. Using the guessed initial solution and the above activity coefficients, the Newton-Raphson method is employed to solve the system of chemical equilibrium equations. At each it eration, if the concentration of an aqueous or sorbed species obtained by the Newton Raphson method is negative, it is reset to its absolute value. This eliminates the possibil ity of a negative concentration and actually speeds up the convergence. 4. After the convergence has been achieved using the fixed activity coefficient values and the above preventive measure, the Newton-Raphson method is used again without the fixed activity coefficients and the above preventive measure, using the obtained solution as the initial guess. This initial guess is usually close enough to the true solution for the direct Newton-Raphson method to converge. By using the above procedure, the Newton-Raphson method has never failed to converge during many cases of simulations, unless the system is ill-posed. During each subsequent time step, the solution of the chemical system from the previous time step is a very good initial guess to the solution at the current time step. Therefore no special treatment is necessary.  ChapterS. COMPUTER MODEL DEVELOPMENT  5.3.2  87  Determination of the Correct Mineral Assemblage  In order to solve the chemical equilibrium equations, the number of precipitated species that exist in the system must be specified a priori before the calculation can be started. However, in a general reactive chemical transport model this information is usually unknown. Therefore a certain algorithm must be built into the transport model to search for the “correct” mineral assemblage that minimizes the Gibbs free energy. Without this capability, the transport model will not be able to handle complicated precipitation-dissolution reactions that take place during the reactive transport processes. A general transport model should be able to describe the dy namic disappearance and reappearance of precipitated species due to the concentration changes during the transport processes. A chemical system at thermodynamic equilibrium is at a state of minimum Gibbs free en ergy. This principle can be used in determining the correct mineral assemblage in a thermody namic equilibrium system. The status of a mineral with respect to the aqueous species that form SIj the mineral can be described by a saturation index (SI), which is defined as: I  SI  =  a logQyc)  —  og K}’  (5.224)  where SI is the saturation index for the jth precipitated species. A positive SI indicates that the precipitated species has a tendency to precipitate from the aqueous solution, while a negative SI indicates that the mineral has a tendency to dissolve into the solution. The magnitude of the positive or negative  reflects the degree of supersaturation or undersaturation of the jth  mineral species. At thermodynamic equilibrium, the saturation index of a precipitated species is zero. By defining a reaction progress variable,  (De Donder and Van Rysselberghe, 1936), a  measure of the extent to which a reaction has proceeded, the derivative of the Gibbs free energy of the jth precipitation reaction with respect to the reaction progress variable must be negative for each dissolving species and must be positive for each precipitating species. The magnitude of the derivative of the Gibbs free energy with respect to the progress variable  E ()  is the  ChapterS. COMPUTER MODEL DEVELOPMENT  88  rate of the Gibbs free energy change, and can be related to the saturation index by (Liu, 1988): =  2.3O3RT(SI)  (5.225)  For a system with N,, precipitated species, the total change in the Gibbs free energy for all the precipitated species is: N,,  N,,  Z  =  “3  j=1  2.303RT Z(S1a)  (5.226)  j=1  At thermodynamic equilibrium, the total change of the Gibbs free energy should be equal to zero: N,,  Z  j=1  N,,  UG =  Si  2.303RT Z(SI)  =  0  (5.227)  j=i  The saturation index can quantitatively identify which precipitated species are supersatu rated or undersaturated. The most saturated precipitated species with the largest positive satu ration index is the most likely species to precipitate, and the least saturated precipitated species with the largest negative saturation index is the most likely species to dissolve. For a system with more than one possible precipitated species, the procedure to determine the correct mineral assemblage implemented in the computer program is as follows: 1. Set the number of precipitated species in the system. During the initialization of the chem ical system, this number is initially set to zero, which means that no mineral exists in the system. For each subsequent time step, this number is set to the number of existing pre cipitated species in the system at the previous time step; 2. Solve the chemical equilibrium model using the Newton-Raphson iterative method; 3. Calculate the saturation index (SI) for each possible precipitated species (N,, in total); 4. Check the saturation index:  ChapterS. COMPUTER MODEL DEVELOPMENT  89  (a) If there is only one positive saturation index, the corresponding species is added to the existing mineral list; (b) If there is more than one positive saturation index, find the first largest saturation index, and add the corresponding species to the existing mineral list; (c) If there is one precipitated species with negative concentration, delete the species from the existing mineral list; (d) If there is more than one precipitated species with negative concentrations, find the first most negative concentration, and delete the corresponding species from the ex isting mineral list; (e) If any of the above is true, go back to step 2; (f) If none of (a), (b), (c) and (d) is true, the chemical system is in equilibrium. Stop.  5.4  General Solution Procedure  As we have mentioned before, the set of equations that describe simultaneous processes of water flow, heat transfer, advective-dispersive solute transport, and chemical equilibrium reactions are nonlinear and coupled. An iterative procedure must be used to solve this set of coupled partial differential and algebraic equations. The general procedure used to obtain a solution of this mathematical model, at each time step, is as follows: 1. Initialize the chemical system to equilibrium conditions. 2. Solve for temperature T at time step t+At/2 from equation (4.162), using the most recent estimates of C and bm. 3. Solve for pressure potential ibm at time step t + zt/2 from equation (4.161), using the newly obtained values of T.  Chapter 5. COMPUTER MODEL DEVELOPMENT  90  4. Repeat steps 2 and 3 until some prescribed convergence tolerance is met for both T and Ijbm,  or until the allowed maximum number of iterations has been reached.  5. Calculate water flow velocities at time step t + At/2. 6. Solve for total analytical concentrations Tk (Ic  =  1, 2,.  .  .  ,  I), one by one, at time step  t + At/2 from equation (4.163), using the newly calculated flow velocities. 7. Solve for various chemical concentrations in the equilibrium system using equations (4.100), (4.104), (4.105), (4.106), and (4.107) at time step t + zXt/2. This set of non-linear alge braic equations is solved using the Newton-Raphson method. 8. Calculate Ck,  k, 3  and Pk (Ic  =  1,2,.  ..  ,  I) using equations (4.101), (4.102), and (4.103),  respectively. 9. Repeat steps 6 through 8 until convergence for the total analytical concentration is achieved or the maximum number of iterations allowed is reached; 10. Calculate the total solute concentration of the soil solution C using: Na  C=zci 11. Repeat steps 2 through 10 until some prescribed convergence tolerance is met forT,  m’  andTk(k=1,2,...,I),suchas: H(new)  —  H(0)I  < 8  (5.228)  where H represents T, bm, or Tk, and 8 is the tolerance level. If convergence is not achieved within the allowed maximum number of iterations, the time step is halved. 12. Advance T, (4.156).  v’,,. and Tk (Ic = 1,2,.  .  .  ,  I) from time step t + At/2 tot + At using equation  ChapterS. COMPUTER MODEL DEVELOPMENT  5.5  91  Input and Output  The input data to the computer model are separated into a few input files. The name scheme for the input files is project—name. extension. The extension is indicative of the type of data the input file contains. For example, if the name of a project is ‘leach’, the input files used by the computer model are: leach. mes  finite element mesh data  leach. chin  chemical system information  leach. mat  data for material properties  leach. bic  boundary and initial condition information  leach. con  control data  At the end of a simulation, the program will write out an initial input file, leach, out, a series of output files named leachoO .out, leachOl out, leacho2 out .  .  and a  restart file, leach. res. The maximum number of output files it will write during the process of simulation is 21, but this number can be easily changed by making a small modification to the source code. The input is controlled by keywords. One of the advantages of using keyword-controlled input is that the input information does not need to appear in a predefined order in most cases. In addition, the data in the input files are in free format. They need not appear in the exact column locations with exact width. This format of input will greatly simplify the creation of input files and significantly reduce the possibility of making errors. In the remainder of this section, each of the input files will be given a more detailed discussion. Sample input files can be found in appendix A.  ChapterS. COMPUTER MODEL DEVELOPMENT  92  Finite Element Mesh Data File This input file, with an extension of .me s’, contains information about the finite element ‘  mesh. It is usually the output file from the automatic mesh generator, but can also be created or modified by the user. It includes the following information: • Dimension of the finite element mesh; • Number of nodes in the mesh; • Number of elements in the mesh; • Coordinates of each node in the mesh; • Element type, material number, and node numbers in an element; and • Number of nodes connected to each node in the mesh, and these node numbers. It seems appropriate here to also describe input information needed by the automatic mesh generator. The automatic mesh generator can read input data from a keyboard or from a file. The interested domain is divided into different ‘blocks’ according to its material properties, chemical properties, or any other considerations. Each block is given a material number. Different blocks may have the same material number. The material number is used by the computer program to determine which set of physical, hydrological and chemical properties to use. For each block, required information include the element type that defines the block, the element type that the block is going to be divided into, the node numbers that form the block, the number of divisions in each dimension, and a parameter for each dimension that determines how the block is going to be divided: with uniform, increasing or decreasing length in this dimension. The input data for the automatic mesh generator also contains the coordinates of all the nodes that define the blocks. The nodes that define a block should be in an appropriate order, and the same ordering pattern should be used in all blocks. The automatic mesh generator calculates the coordinates of  ChapterS. COMPUTER MODEL DEVELOPMENT  93  Table 5.1: Element types that can be used in the automatic mesh generator and the finite element model  Type 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Nodes 2 3 2 3 3 4 8 12 3 4 8 12 8 20 32  Description horizontal linear 1-d element horizontal quadratic 1 -d element vertical linear 1-d element vertical quadratic 1-d element horizontal linear 2-d triangle horizontal linear 2-d quadrilateral horizontal quadratic 2-d quadrilateral horizontal cubic 2-d quadrilateral vertical linear 2-d triangle vertical linear 2-d quadrilateral vertical quadratic 2-d quadrilateral vertical cubic 2-d quadrilateral linear 3-d parallelepiped quadratic 3-d parallelepiped cubic parallelepiped  each node, eliminates repeated nodes at block boundaries, determines the node numbers in each element, put them in an appropriate order, and computes the node numbers that are connected to each node. It can write to an output file, which can then be used for the finite element program. There are 15 types of elements that can be used in the mesh generator and the finite element model. These types are listed in table 5.1. Chemical System Data File The input file for chemical system data has an extension of’ chin’. It contains the following .  information: • Number of component species in the system; • Number of aqueous species in the system;  ChapterS. COMPUTER MODEL DEVELOPMENT  94  • Number of sorbed species in the system; • Number of possible precipitated species in the system; • Type of chemical system; • Stoichiometric coefficients of the aqueous species; • Stoichiometric coefficients of the precipitated species; • Equilibrium constants of the aqueous species; • Selectivity coefficients of the sorbed species; • Aqueous species that participate in ion exchange; • Solubility products of the precipitated species; • Valence of each chemical species in the system; and • Ion exchange capacity at each node. The type of chemical system is used to determine, internally, by the computer model to for mulate the chemical equilibrium equations. The choices are: SINGLE, CLOSE, and OPEN. For a SINGLE chemical system, the soil solution has only one chemical species, and this species is assumed nonreactive. Therefore, the SINGLE chemical system can be used to model the trans port process of a nonreactive solute in variably saturated and nonisothermal porous media. The CLOSE chemical system is used when the soil solution is isolated from the atmosphere. For a CLOSE chemical system, only hydrogen H+ is automatically selected by the computer model as the first component species. The mass balance equation for H+ is replaced by the charge neu trality equation of the soil solution, therefore only 1—1(1 is the number of component species in the system) transport equations are needed for a complete model. The OPEN chemical system  Chapter 5. COMPUTER MODEL DEVELOPMENT  95  is used when the soil solution is in constant contact with the atmosphere and the system must be considered as an open chemical system. For an OPEN system, hydrogen H+ and carbonate  CO are automatically selected as the first and second component species. Only I  —  2 trans  port equations are needed to form a complete model. The mass balance equations for H+ and  CO are replaced with the charge neutrality equation of the soil solution and the dissolution equation of gaseous CO 2 with known CO 2 partial pressure, respectively. Input Data for Material Properties The input file for the material properties has an extension of ‘.mat’. It contains data for each set (material number) of material properties. These properties include: • Water content as a function of pressure potential; • Hydraulic conductivities in each of the coordinate directions as functions of soil water content; • Thermal conductivity as a function of water content; • Longitudinal and transverse diffusivities; • Volumetric fractions of clay contents, mineral matters, and organic matters; and • Soil porosity and specific storativity. Because hydraulic conductivities are read and stored separately for each coordinate direc tion, the model can readily deal with water flow and solute transport problems in anisotropic porous media. If a soil is isotropic, input data need only to be given for one direction.  Boundary and Initial Condition Data File The input file with extension  ‘  .  bic’ contains information for the boundary and initial con  ditions. The boundary conditions are divided into different sections for water flow equation,  ChapterS. COMPUTER MODEL DEVELOPMENT  96  heat transfer equation, and solute transport equations. Initial and boundary conditions are spec ified for each component species for which a transport equation is needed. Boundary conditions can be either constant or a function of time. For a variable boundary condition, the relation be tween the boundary condition and time is given in tabular format. The program will save this information and assign it a ‘function number’. During each time step, the model will automati cally compute the boundary condition using the appropriate function. The model uses a variable ‘ich’ for each node to keep track of what type of boundary condition a node has. The scheme works in the following way: Constant Dirichlet boundary condition:  ich  =  1  Variable Dirichlet boundary condition:  ich  =  function—number  Constant Newmann boundary condition:  ich  =  —1  Variable Newmann boundary condition:  ich  =  No boundary condition specified:  ich  =  -  +  1  (function-number +1)  0  where function—number is a function number assigned when the input file is read. The function—number starts from 0 and increases by one each time a variable boundary condi tion is read. Control Data File The control data file has an extension of’. con’. It contains the following information: • Total number of time steps for the simulation; • Length of each time step; • Interval of time steps between which output is required; • Value of relaxation factor w • Maximum number of iterations allowed before the length for a lime step is halved;  ChapterS. COMPUTER MODEL DEVELOPMENT  • Tolerance level to stop iteration within a time step; and • Solution method. Choices are: BANDED, SPARSE, and ITERATIVE.  97  Chapter 6  MODEL VERIFICATION  An ideal approach to verify a numerical model is to compare the results from the numerical model with the analytical solution of the mathematical model on which the numerical model is based. Unfortunately, such analytical solutions are not available for problems involving mul ticomponent reactive solute transport in variably saturated and nonisothermal soil conditions. Instead, the approach used to verify the computer model developed is to verify the individual components that form the complete model. There are four components in the model: the water flow component, the heat transfer component, the solute transport component, and the chemical equilibrium component. In the following sections, these components will be individually run and the results from these components will be compared to the analytical solutions available from the literature.  6.1  Verification of the Water Flow Component  The problem used to test the water flow component is a two-dimensional, vertical, saturated, ho mogeneous, isotropic flow field bounded on top by a water table and on the other three sides by impermeable boundaries (Freeze and Cherry, 1979). The problem is illustrated as in figure 6.1. Analytical solution of this problem is given by Tóth (1962). The governing water flow equation for this problem is:  h 2 8  +  h 2 8 =  0  (6.229)  98  Chapter 6. MODEL VERIFICATION  0/  99  D / / / / / / / / / / /  / / / / / / / / / / /  / / / /////////////////////////////////  z=0  XS  x=0  Figure 6.1: Region of flow for TOth’s analytical solution. where h  =  b + z is the total water potential. The boundary conditions are forx=0,0zzoorx=s,0zzo  Ox  forz=0,0<x<s 12  =  where c  forz  +cx 0 z  =  =  (6.230)  z , 0 0 < x <s  tan a.  The analytical solution, obtained by separation of variables, is h(x. z)  = 0  +  cs 2  —  4cs 2 rn=O  [(2rn ± 1) rx/sj cosli [(2rn + 1) rz/.s] (2m. + 1)2 cosh [(2ni + 1) irzo/sj  This problem is also solved by the computer model’s water flow component, with s =  1.0, and a  =  (6.231) =  2.0,  15°. The flow region is discretized into a 20x10 finite element mesh. The  total number of nodes in the mesh is 231. Because it is a steady-state problem, the solution is  Chapter 6. MODEL VERIFICATION  100  F 1.47 1.4 1.33 1.27  A  /  /  /  1  ND  ‘.  N  ------  N  /  1 o.  1.07 /  B  /  C I  0  0.5  1 x  I  1.5  0 2  Figure 6.2: Equipotential net obtained from the computer model. obtained after only one time step. The equipotential lines are shown in figure 6.2. The equipo tential net is very close to the one shown in Freeze and Cherry (1979). The total error for all nodes in the mesh is 0.037959, and the average error for each node is 1.6432 x 10, or less than 0.015% of the potential at each node. The differences between the numerical solution and the analytical solution at z  =  0.5 are shown in figure 6.3. The above results show that the nu  merical solution of this problem from the computer model agrees very well with the analytical solution given by Tóth (1962).  6.2  Verification of the Heat Transfer Component  The problem used to verify the heat transfer component is a one-dimensional heat conduction problem. The heat conducting object is a plane slab having a finite thickness in one direction but having an infinite extent in the other directions. Therefore edge effects are to be neglected so that only the coordinate measured in the direction of the finite thickness is needed to describe positions. This problem is illustrated in figure 6.4. The governing equation describing this one-dimensional heat conduction problem along the  Chapter 6. MODEL VERIFICATION  101  0.0001  8e-05 6e-05 4e-05 2e-05 0 1 I  -2e-05 -4e-05 -6e-05 -8e-05 -0.0001 0.5  0  1.5  1  2  x Figure 6.3: Error distribution along z  =  0.5 for the water flow problem.  x-direction (with x origin at the center of the infinite slab) is as follows: T 2 8  (6.232)  where a  =  —b—-.  (6.233)  in which  p  =  heat conductivity,  =  density, and  c= specific heat.  a is called the thermal diffusivity. The slab is initially at a uniform temperature T. The tem perature at the surface of the slab is then suddenly changed to and nnintained at a constant tem perature El . The initial and boundary conditions can be stated as: 3 TrzzT;  for t  =  0  Chapter 6. MODEL VERIFICATION  102  1’  T=T 1 at t = 0  T=  TTs for t> 0  for t> 0  +  x  Figure 6.4: Heat conduction in the infinite slab.  Chapter 6. MODEL VERIFICATION  103  Table 6.2: Parameters used in the infinite slab simulation. Thickness of the slab L Density p Specific heat c , 2 Thermal conductivity A  Dx  fort> Oandx  =0  8 T=T  =  0.4 rn 1600 Kg/rn 3 1000 J/Kg•K 4000 J/mhrK  (6.234)  0  fort>Qandx=  The analytical solution to equation (6.232) with initial and boundary conditions as in equa tion (6.234) at time t is (Chapman, 1974): T(x, 1)  =  3 + 2(T T  —  ) 3 T  2 e’  1  l —72:  (n  L2 L  )  (6.235)  The computer program’s heat transfer component is also used to solve this heat conduction problem in the infinite slab, and the results are compared with the analytical solution. The slab dimension and physical and thermal properties used in the simulation are listed in table 6.2. The slab initially has a uniform ternperature distribution of 100°C. Its surface temperature is then suddenly reduced to and held at a constant temperature of 50°C. The slab is divided into 40 2-node elements, with increasingly shorter elernents close to the surface. Figure 6.5 shows the temperature distribution from the center of the slab to its surface at 9.25 hours after the sudden temperature drop from the analytical solution and the ternperature distributions at 0.05, 4.25, and 9.25 hours obtained from the nurnerical simulation. It is clear that the numerical solution is extremely close to the analytical solution. In figure 6.5, the lines representing analytical and numerical results at 9.25 hours are almost identical, indicating a very good agreement between the numerical solution and the analytical solution. The error distribu tions at the corresponding times are shown in figure 6.6. Shortly after the sudden drop in the  Chapter 6. MODEL VERIFICATION  100  6  6  6  104  9  9  96  69  6  90  Numerical Numerical Numerical Analytical  t t t t  0.05 4.25 9.25 9.25  = = = =  hr h hr o hr  80  ---  70  ,‘-‘-  H  ___%__  t_.  60  50 0.00  t  ___s 9 _s__s_.  0.02  I  I  I  I  0.04  0.06  0.08  0.10  0.12  I  I  I  0A4  0.16  0.18  0.20  Distance from center (m) Figure 6.5: Temperature distributions from the computer model and the analytical solution of the infinite slab problem. surface temperature, the error is relatively large at sections close to the surface. At 0.05 hours, the average difference between the numerical solution and the analytical solution is 0.03686°C, or less than 0.05%. The biggest difference is about 0.16°C. At 9.25 hours, the average error is reduced to about 0.007°C, or about 0.01%. To achieve even higher accuracy, a finer finite ele ment mesh and shorter time steps can be used.  6.3  Verification of the Solute Transport Component  A one-dimensional solute transport problem is used to verify the solute transport component of the computer model. The governing equation of the advective-dispersive transport process of a nonreactive solute in a saturated, homogeneous, and isotropic porous medium under steady state, uniform, one-dimensional flow is: 80 at  =  C 2 3 D — 1 8x  ac —  8x  (6.236)  Chapter 6. MODEL VERIFICATION  105  0.05 0.00  -0.05  -0.10 -0.15 -0.20 0.00  0.02  0.04  0.06  0.08  0.10  0.12  0.14  0.16  0.18  0.20  Distance from center (m) Figure 6.6: Error distributions along the thickness of the infinite slab. where x is a coordinate direction taken along the flowline, Y is the average groundwater velocity, U  v/n, v being the Darcy velocity and n the porosity, D 1 is the coefficient of hydrodynamic  =  dispersion in the longitudinal direction, and C is the solute concentration. Assume that a nonreactive solute at concentration C is continuously injected into a steadystate flow regime at the upstream end of a column packed with a homogeneous granular medium. The initial solute concentration in the column is zero. The initial and boundary conditions are described mathematically as: 0=0  fort=Oandz0  O  fort> Oandx  =  0  fort> Oandx  =  cc  =  C  0=0  (6.237)  The analytical solution to equation (6.236) with the above initial and boundary conditions for a saturated homogeneous porous medium is (Ogata, 1970): C  =  1  erfc  (x—Ut’\ + exp 2)  ()  erfc  /x+Ut\ ç2)  (6.238)  Chapter 6. MODEL VERIFICATION  106  Table 6.3: Parameters used in the column transport simulation. Length of the column L Average flow velocity U Soil porosity n Longitudinal diffusivity a 1  0.5 m 0.02 m!hr 0.3 0.02 m  where erfc is the complementary error function, and x is the distance along the flow direction. The numerical solution of equation (6.236) with boundary and initial conditions as in equa tion (6.237) is also obtained from the computer model’s solute transport component. The pa rameters used in the numerical solution are listed in table 6.3. The column is divided into 100 2-node uniform elements. The time steps are 0.001 hours initially and 0.01 hours for the rest of the simulation. The breakthrough curves predicted from the analytical solution and the computer model are shown in figure 6.7. The differences between the analytical and numerical solutions are given in figure 6.8. Figure 6.7 shows that the break through curves obtained from the computer model and from the analytical solution are almost identical at corresponding times, indicating a very good agreement between the numerical and the analytical solutions. During the initial step change of solute concentration at the upstream of the column, the error of the numerical solution is relatively large due to the sharp concentra tion gradient. The error becomes increasingly smaller as time goes on. Figure 6.8 also shows that the numerical error is the greatest at the front. To reduce the numerical error, an even finer mesh and smaller time steps can be used.  6.4  Verification of the Chemical Equilibrium Component  The approach used to verify the chemical equilibrium component of the computer model is to use the chemical equilibrium code to solve a few cases of equilibrium problems and check to see  Chapter 6. MODEL VERIFICATION  107  1.0  0.8 C 0  0.6  I  C C-)  C 0  0.4  0.2  0.0 0.0  0.1  0.2  0.3  0.4  0.5  Distance (m) Figure 6.7: Breakthrough curves from the computer model and the analytical solution.  0.005 0.000 -0.005 I..  C I-.  I-’  -0.0 10  Lu  -0.015 -0.020 -0.025 0.0  0.1  0.2  0.3  0.4  0.5  Distance (m) Figure 6.8: Error distributions along the column for the solute transport problem.  Chapter 6. MODEL VERIFICATION  108  Table 6.4: Chemical Model Verification: Chemical Reactions and Equilibrium Constants Reaction I 2 3 4 .5 6 7 8 9 10 11 12 13 14  Species Component Species H=H CO = CO Na=Na + = Ca 2 Ca + 2 Dissociation of Water O—H=OH 2 H Complexation H + CO = HCOJ 2H + CO = 3 C0 2 H +H+CO=CaHCO 2 Ca Na + 3 + CO = NaHCO +CO=CaCO 2 Ca 3 Na+CO=NaCO 2 +H Ca 0 2 = CaOH Ion Exchange Na+=Na+ —  15 16  2 2Na = Ca Ca 2 + 2Na Precipitation 2 + CO = CaCO Ca (fl 3 Dissolution of CO 2 CO H 0 = C0 2 (g) 2 +  2H  +  —  K 10 Iog 0 0 0 0 —13.99 10.33 16.68 11.33 10.08 3.15 1.27 —12.60 1(13=1 K 1 4 = 3.0 8.47 23.14  how well the results agree with the laws of mass action and mass balance. We will use a H+_ +CO system for this purpose. The system has 4 component species, 12 aqueous 2 Na+Ca species, 2 sorbed species, I possible precipitated species, and if the system is an open system, the dissolved gaseous species, C0 (g). These species and the reaction constants are listed in 2 table 6.4. The cases that are to be solved are listed in table 6.5. For the open system, the total concen tration of CO is calculated using the known partial pressure of C0 (g). In the atmosphere, 2 the C0 (g) partial pressure is 0.00033 bar (Bohn et aL, 1985), or 33 Pa. For all cases, the ion 2  Chapter 6. MODEL VERIFICATION  109  exchange capacity is 0.00005 eqIL. The results from the chemical equilibrium model are sum marized in tables 6.6 through 6.9. It should be pointed out that all the results are calculated by the program. The precision used by the program is much better than the numbers shown in the tables. If the numbers shown in the tables are directly used to calculate the computed equilib rium constants, the results may be a little less accurate due to round-off errors. Table 6.5: Cases to be solved by the chemical equilibrium model. Cases 1 2 3 4  System CLOSE CLOSE OPEN OPEN  Total Concentration of Each Component (mo]JL) + = 0.001 2 Tco2_ = 0.002, TNa+ = 0.001, T Tco2_ = 0.002, TNa+ = 0.001, TcJ2+ = 0.0005 + = 0.001 2 2 = 33 Pa, TNa+ = 0.001, T Pco = 33 Pa, = TNat 0.0005, TCa2+ = 0.001 2 pc0  There are some general remarks regarding the results that can be made: 1. For all cases, the results from the computer model agree extremely well with the laws of mass action and mass balance. The chemical equilibrium component of the computer model provides very accurate solution to chemical systems under thermodynamic equi librium. 2. In case 1, mineral CaCO 3 (4) exists in the system, while in case 2 with the total concentra tion of Ca 2 reduced by half, the mineral completely dissolved, and the actual solubility product is less than the real solubility product, indicating that the solution is undersatu rated with respect to CaCO (4). 3 + only half of that in case 1, the pH value 2 3. In case 2, with the total concentration of Ca decreases from 8.98 to 7.83. 4. For the open chemical system (cases 3 & 4), the pH values remain relatively insensitive to + concentrations. In case 3, with the Na+ concentration of 0.001 2 the change of Na+ or Ca  Chapter 6. MODEL VERIFICATION  110  Table 6.6: Solution from the chemical equilibrium model: case 1. Species  H CO Na 2 Ca 0H  Concentration Activity Law of Mass (mollL) Action Coefficient Soil Solution 1.0908e—09 0.9587 5.3502e—05 0.8447 9.9552e—-04 0.9587 8.7756e—05 0.8447 l.0024e—05 0.9587 [Hj[OH—j  K K (theoretical) (computed) 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 l.0050e—14 l.0050e—14  HCO  1.0540e—03  0.9587  2.1380e+10 2.1380e+10  3 C 2 H 0  2.3708e—06  1.0000  4.7970e+ 16 4.7970e+ 16  CaHCO  7.8128e—07  0.9587  2.l380e+ll 2.1380e---l1  3 NaHCO  5.4216e—07  1.0000  1.2020e+ 10 l.2020e-{-10  3 CaCO  4.7302e—06  1.0000  1.4120e+03 1.4120e+03  NaCO  8.3389e—07  0.9587  CaOH  1 .8655e—08  0.9587  1.8535e+01 1.8535e+01  [NT+j[ — 2 j  a 1 2 1  Ionic strength of the solution: Charge balance of the solution:  2.5230e— 13 2.5230e— 13 1.3131 e-03 4.7 123e-20  Na  3.0992e—06  Sorbing Surface 0.0620  2 Ca  2.3450e—05  0.9380  2  2+i  Charge balance on the sorbing site: Mineral Phase (4,) 3 CaCO j[CO 2 [Ca Mass Balance Component Total Dissolved Sorbed CO 2.0000e—03 1.1167e—03 0.0000e+00 Na l.0000e—03 9.9690e—04 3.0992e—06 1.0000e—03 9.3286e—05 2 Ca 2.3450e—05 8.8326e—04  3.0000e+00 3.0000e+00 0.0000e+00 3.3500e—09 3.3500e—09 Precipitated 8.8326e—04 0.0000e+00 8.8326e—04  Chapter 6. MODEL VERIFICATION  111  Table 6.7: Solution from the chemical equilibrium model: case 2. Species  H CO Na 2 Ca OW  Concentration Activity Law of Mass (molIL) Coefficient Action Soil Solution 1.58l3e—08 0.9453 7.l137e—06 0.7987 9.9754e—04 0.9453 4.6556e—04 0.7987 7.1116e—07 0.9453 [H][OH—j  K K (theoretical) (computed) 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0050e—14 1.0050e--14  HCO  1.9208e—03  0.9453  2.1380e-1-10 2.1380e+10  C0 2 H 3  6.0903e—05  1.0000  4.7970e+ 16 4.7970e+ 16  CaHCOt  7.1419e—06  0.9453  2.1380e+11 2.1380e+l1  3 NaHCO  9.6269e—07  1.0000  1 .2020e+ 10 1 .2020e+ 10  3 CaCO  2.9828e—06  1.0000  l.4120e+03 1.4120e+03  NaCO  1.0504e—07  0.9453  l.8535e+01 1.8535e+01  CaOH  6.6383e—09  0.9453  2.5230e— 13 2.5230e— 13  Ionic strength of the solution: Charge balance of the solution:  2.4085e—03 1.32 12e— 19  Na  1.3920e---06  Sorbing Surface 0.0278  2 Ca  2.4304e—05  0.9722  Charge balance on the sorbing site:  E:1  (11)2  Mineral Phase None j[CO 2 [Ca Mass Balance Component Total Dissolved Sorbed CO 2.0000e—03 2.0000e—03 0.0000e+00 Na 1.0000e—03 9.9861e—04 1.3920e—06 2 Ca 5.0000e—04 4.7570e—04 2.4304e—05 (4) 3 CaCO  3.0000e+00 3.0000e+00  0.0000e+00 3.3500e—09 2.1125e—09 Precipitated 0.0000e—00 0.0000e+00 0.0000e+00  Chapter 6. MODEL VERIFICATION  112  Table 6.8: Solution from the chemical equilibrium model: case 3. Species  H 4 CO 4 Na 2 Ca OH-  Concentration Activity Law of Mass Action (mollL) Coefficient Soil Solution 3.9309e—09 0.9530 2.0662e—05 0.8247 9.9704e—04 0.9530 2.3837e—04 0.8247 2.8l52e—06 0.9530 [H1[OHI  K K (theoretical) (computed) 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0050e—l4 1.0050e—14  HCO  1.4322e—03  0.9530  2.1380e+10 2.1380e-fl0  3 C 2 H 0  1.1471e—05  1.0000  4.7970e+ 16 4.7970e+ 16  CaHCO  2.8155e—06  0.9530  2.1380e+11 2.1380e-]-11  3 NaHCO  7.2905e—07  1.0000  1 .2020e+ 10 1 .2020e+ 10  3 CaCO  4.7302e—06  1.0000  1.4120e-l-03 1.4120e+03  NaCO  3.1491e—07  0.9530  1.8535e+01 1.8535e+01  CaOH  1.3894e—08  0.9530  2.5230e— 13 2.5230e— 13  Ionic strength of the solution: Charge balance of the solution:  1.7356e—03 —4.7 146e—20  4 Na  l.9183e—06  Sorbing Surface 0.0384  24 Ca  2.4041e—05  0.9616  [2+  ([:i)2  Charge balance on the sorbing site: Mineral Phase (4) 3 CaCO 7.3003e—04 ] [COt] 2t [Ca Mass Balance Component Total Dissolved Sorbed 1.0000e—03 9.9808e—04 4 Na 1.9183e—06 1.0000e—03 2.4593e—04 24 Ca 2.4041e—05  3.0000e+00 3.0000e-f-00  0.0000e+00 3.3500e—09 3.3500e—09 Precipitated 0.0000e—j-00 7.3003e—04  Chapter 6. MODEL VERIFICATION  113  Table 6.9: Solution from the chemical equilibrium model: case 4. Species  11 CO Na 2 Ca OTf  Law of Mass Concentration Activity (mollL) Coefficient Action Soil Solution 4.7772e—09 0.955 1 1.3801e—05 0.8323 4.9879e—04 0.9551 3.5045e—04 0.8323 2.3060e—06 0.9551 [Hj[OHj  K K (theoretical) (computed) 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0050e—14 1.0050e—14  HCO  1.1731e—03  0.9551  2.1380e+10 2.l380e-j-10  3 C 2 H 0  l.1471e—05  1.0000  4.7970e+16 4.7970e+ 16  CaHCO  3.4216e—06  0.9551  2.1380e+11 2.1380eH-11  3 NaHCO  3.0012e—07  1.0000  1.2020e+ 10 1.2020e+ 10  3 CaCO  4.7302e—06  1.0000  1.4120e+03 1.4120e+03  NaCO  1.0619e—07  0.9551  1.8535e+01 1.8535e+01  CaOH  1.6885e—08  0.955 1  2.5230e—13 2.5230e— 13  Ionic strength of the solution: Charge balance of the solution: Na 2 Ca  7.9884e—07 2.4601e—05  —3.4652e—20 Sorbing Surface 0.0160 0.9840  Charge balance on the sorbing site:  ( [Ni)  Mineral Phase ][COH 2 [Ca Mass Balance Total Component Dissolved Sorbed Na 5.0000e—04 4.9920e—04 7.9884e—07 2 Ca l.0000e—03 3.586le—04 2.4601e—05 3 (fl CaCO  6. 1679e—04  2  3.0000e+00 3.0000e+00 6.7763e—21 3.3500e—09 3.3500e—09 Precipitated 0.0000e-j-00 6.1679e—04  Chapter 6. MODEL VERIFICATION  114  molt, the pH value is 8.43. In case 4, with the Na+ concentration reduced to 0.0005 molIL, the pH value is 8.34, which is slightly higher than the pH value of 8.3 for a solution 3 (4) and with the CO 2 level of the atmosphere (Bohn et al., in equilibrium with CaCO 1985). This is due to the presence of Na+ which increases the pH value of the solution.  Chapter 7  MODEL DEMONSTRATIONS  In the previous chapters, we have presented the development of the mathematical model, the nu merical formulation of the mathematical model, the computer implementation of the numerical model, and the verification of the various components in the computer model. In this chapter, the computer model will be used to simulate a number of hypothetical one-, two-, and threedimensional problems to demonstrate its applicability in different situations. These problems are representative of some of the possible problems which may be encountered in practice.  7.1  Simulation of a One Dimensional Problem  The first problem solved with the computer model is a vertical soil column. The length of the column is one meter. Recharge takes place at the top end of the column and the discharge takes place at the bottom. The recharge and discharge rates are set to be equal to 0.005 mlhr. The com ponent species in the soil solution are hydrogen, sodium, calcium and carbonate. The system is considered as an open chemical system. The physical processes considered include advection, diffusion, heat conduction, condensation, vaporization, and dispersion. The chemical reactions that are taken into account are complexation, ion exchange, precipitation and dissolution. The soil inside the hypothetical column is a sandy soil. The hydraulic conductivity and water con tent as functions of pressure potential are shown in figure 7.9. The heat conductivity of the soil as a function of water content can be found in figure 7.10. Other material properties and pa rameters used by the computer model are listed in table 7.10. These properties are hypothetical and may not represent a specific type of soil. Because the ion exchange capacity is expressed 115  Chapter 7. MODEL DEMONSTRATIONS  116  0.016  .--——  0.3  0  /  0’  >-.  —  t  So  —  Z  /  /  /  .  V  J  /  0  0.008  /  I  /  I 4 /  0.004  /  0.2  /  C  V  0.l  v  / •..rV  0  ‘0  -o 0_o 0_0_0  0.000 -2.0  -1.6  I  I  -1.2  -0.8  I  -0.4  I  0.0 -2.0  Pressure potential (m)  -1.6  I  I  I  -1.2  -0.8  -0.4  0.0 0.0  Pressure potential (rn)  Figure 7.9: Hydraulic characteristic curves of the soil. Table 7.10: Simulation Parameters (One-Dimensional) Parameter fin, Porosity F, Fraction of clay Fm, Fraction of mineral , Fraction of organic matter 0 F a, Longitudinal diffusivity 69 Ion exchange capacity N ,  Value 0.3 0.2 0.65 0.05 0.02 m 0.0005 eq/L  in equivalents per liter of soil solution, it is also a function of the soil water content. The ion exchange capacity given in table 7.10 is its value when the soil is saturated. The actual ion ex change capacity expressed in equivalent per liter of soil solution for each node at each time step is calculated automatically by the computer program. It should be noted that expressing ion ex change capacity in terms of equivalent per liter of soil solution is for the convenience of writing the chemical equilibrium equations. Ion exchange capacity expressed in terms of equivalent per kilogram of soil solids will remain the same. There are 16 chemical species in the equilibrium system, including 12 aqueous species, 2  Chapter 7. MODEL DEMONSTRATIONS  10000  117  -  80006000 ‘  -  4000 2000  0  0.0  I  0.1  0.2  I  I  0.3  0.4  Water content (vol/vol) Figure 7.10: Heat conductivity of the soil. sorbed species, 1 possible precipitated species, and 1 gaseous species (C0 (g)). These chem 2 ical species and their reaction constants are listed in table 7.11. The dissolution of C0 (g) in 2 table 7.11 is written with respect to the component species H+ and CO, and the reaction con stant is modified accordingly. The partial pressure of CO 2 corresponding to the reaction con stant given in table 7.11 is in Pa 2 (N/rn ) . Table 7.12 lists the stoichiometric coefficients of each +. H+ is always automatically 2 species in terms of component species H+, CO, Na+, and Ca selected as the first component species by the computer program for reactive solute transport. However, a mass balance equation for H+ is replaced with a charge neutrality equation of the soil solution, therefore no transport equation for H+ is necessary. The charge neutrality equation of the soil solution can be written as: Na  Z  =  0  (7.239)  2=1  where Z is the valence of the jth aqueous species. The chemical system is considered as an open system. The carbonate in the soil solution is  Chapter 7. MODEL DEMONSTRATIONS  118  Table 7.11: Chemical Reactions and Equilibrium Constants Reaction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Species Component Species CO = CO Nat=Nat t = Ca 2 Ca t 2 Dissociation of Water 0 Ht = OH9 H Complexation Ht+CO=HCO 2Ht + CO = 3 C0 2 H t+Ht+CO=CaHCOt 2 Ca Na + Ht + CO = NaHCO 3 t +CO =CaCO 2 Ca 3 Nat +CO =NaCO t + 1420 Ht = CaOH 2 Ca t Ion Exchange =Na Na t t + 2Na 2 t + 2Na 2 Ca t = Ca t Precipitation t + CO = CaCO 2 Ca (4) 3 Dissolution of CO 2 t +CO 2H O=CO H ( 2 g) —  —  —  K 10 Iog 0 0 0 0 —13.99 10.33 16.68 11.33 10.08 3.15 1.27 —12.60 1(13=1 1(4 = 3.0 8.47 23.14  Chapter 7. MODEL DEMONSTRATIONS  119  Table 7.12: Stoichiometric Coefficients  Reaction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Species H CO Na Ca OHHCO CO 2 H 3 CaHCO 3 NaHCO 3 CaCO NaCO CaOFP Na 2 Ca (4) 3 CaCO (g) 2 CO  H 1 0 0 0 —1 1 2 1 1 0 0 —1 0 0 0 2  Components CO Na Ca 2 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 0  Chapter 7. MODEL DEMONSTRATIONS  120  in dynamic equilibrium with the gaseous C0 (g). The partial pressure of C0 2 (g) in the soil is 2 assumed to be constant and uniformly equal to the partial pressure of C0 (g) in the atmosphere 2 throughout the soil column. This assumption allows attention be focused on the task of illus trating the major aspects of the model. In actual soils, the partial pressure of C0 (g) is usually 2 larger than that in the atmosphere due to root respiration and biological reactions. Because the partial pressure of C0 (g) is known, no mass balance equation for CO is required to solve 2 the chemical equilibrium system, and hence no transport equation for CO is needed. Two one-dimensional cases are presented to investigate the behavior of the computer model. The first case emphasizes the phenomenon of ion exchange in the soil column. The originally dominant species will be replaced by another species. Initially the Na concentration in the + concentration, and not surprisingly Na+ is the dominant 2 soil column is ten times of the Ca +, 2 species on the exchange sites. The recharging water has equal concentrations of Na+ and Ca + is expected to replace Na+ on the exchange sites and becomes the dominant species. 2 and Ca The second case represents a situation where leaching takes place by recharging the soil col umn with water of lower chemical concentration at top of the column. Initially the soil column +. The incoming water, e.g. irrigation water, 2 has relatively high concentrations of Na+ and Ca has much lower salt concentrations. The computer model will be used to investigate how the leaching process takes place. The detailed initial and boundary conditions are summarized in table 7.13. The Dirichlet boundary conditions given in table 7.13 for solute transport equations (pre scribed concentrations) need some special attention. In the solute transport equations, the total analytical concentration of each component species (except Ht whose transport equation is re placed with a charge neutrality equation, and COZ whose transport equation is replaced with the dissolution equation of CO 2 with known partial pressure of C0 ) is selected as the primary 2 dependent variable. The Dirichlet boundary condition means that the total analytical concentra tion is specified along the boundary. Because the total analytical concentration is expressed as  Chapter 7. MODEL DEMONSTRATIONS  121  Table 7.13: Initial and Boundary Conditions: One-dimensional Problem Case 1&2 Case l&2  Case 1 2  IC and BC for Water Movement 0<z<lm ‘m—0.3m K(’+l)=0.005m/hr  z=lm  z=0 K(+1)=—0M05hr IC and BC for Heat Transfer T=0°C 0<z<lm T=20°C z=lm No heat flow cross the bottom boundary IC and BC for Solute Transport Components (mol/L) Na+ + 2 Ca 0<z<lm 0.001 0.001 0.00003 0.00025 z = 1 m 0z<lm 0.001 0.0001 0.001 0.001 z=lm  1=0 t0 1>0 1=0 1>0 I 0  1=0 I 0 1=0 1>0  moles per liter of soil solution, its expressed value may change when soil water content changes, even if the number of moles of this species remains unchanged. On the other hand, while the total analytical concentration is held constant, as in the case of constant Dirichlet boundary con ditions, the actual dissolved, sorbed, and precipitated concentrations of this species will be in creased or decreased as water content is increased or decreased. This behavior may potentially cause problems and also is not very realistic. Because it is the aqueous species that undergo ad vective and dispersive transport processes, a more realistic scenario is to specify dissolved con centrations of component species in the solution. In the case of constant Dirichlet boundary con dition, the dissolved concentration rather than the total analytical concentration of the species should be held constant. However, the total analytical concentration is required if precipitation  and dissolution processes are to be dealt with (Yeh and Trapathi, 1989). A compromise solu tion to this dilemma is to specify the total analytical concentration at the boundary. Internally,  Chapter 7. MODEL DEMONSTRATIONS  122  in the computer program, the dissolved concentration of the species is computed from the total analytical concentration, and is held constant if under constant Dirichiet boundary condition, while the sorbed and the precipitated concentrations and thus the total analytical concentration of the species are updated at each iteration and at each time step. Therefore the concentrations at Dirichiet boundaries given in table 7.13 for solute transport equations will not actually be held constant. They will vary with water content. However, the actual number of moles of each sorbed or precipitated species at the Dirichlet boundary will remain the same. For both cases, the one meter long column was discretized into 40 2-node uniform elements. Thus the grid size was 0.025 m. Initially the time steps were set at a small value, 0.01 hour to reduce the error caused by the initial step change at the boundaries. Gradually the time steps were increased to 0.05 hour, 0.1 hour, and finally 0.3 hour. The duration of the simulation was about 78 hours in real time. The tolerance level was set at 0.000001. The selection of grid size and time steps was based on the Peclet number, P ber, C  =  =  /\z/aj < 2, and the Courant num  VAt/Az < 1, as well as the finite element method criterion of Meyers (1978),  <l/12 to reduce discretization error and numerical dispersion. The backward 2 VajAt/(Az) difference discretization of the time derivative was used (the relaxation factor w  =  0). This  formulation is unconditionally stable. The banded matrix method was used to solve the onedimensional problems. Figures 7.11 to 7.20 show the simulation results of cases 1 and 2. Results are given at 0, 33, and 78 hours to show the initial condition, transitional state, and final state at the end of the sim ulations. For both cases, the water flow became stable in just a few hours, and the flow regime was in a steady state. The water flow velocity was equal to the recharging and discharging rate, 0.005 rn/hr. Because the column was maintained in a saturated or near saturated condition, the effects of temperature and solute were insignificant. The water pressure gradient was the dom inant driving force of the water flow. Figure 7.11 shows the temperature profile along the soil column. It is shown that the temperature propagated rather slowly into the soil column, which  Chapter 7. MODEL DEMONSTRATIONS  1.0 0.8  I  123  I  I  -  fr  0.6-  /  0 d  /  t=o  —  t=33hr t=78hr --a----  /  0.4  0  5(0  15  20  25  Temperature ( C) Figure 7.11: Temperature distribution along the soil column. is usually true in the real world. Because the initial and boundary conditions for water flow and heat transfer were the same for both cases, and the influence of solute concentration was at its minimum, the temperature distribution for case 2 was almost identical to that in case 1, and therefore is not presented. Figures 7.12 through 7.15 show the concentration profiles along the soil column for case 1. Ca and Na+ concentration distributions on the sorbing sites. + Figures 7.12 and 7.13 show the 2 + in the column was one tenth of the total concentration 2 Initially the total concentration of Ca of Na+, and therefore the ion exchange sites were initially dominated by Na+. At time 0, the + was 2.979 x 1 O molJL of soil, compared to the sorbed Na+ con 2 sorbed concentration of Ca + and Na+ concentrations 2 centration of 9.042x i0 molIL of soil. It should be noted that Ca in figures 7.12 and 7.13 are expressed in terms of mole per liter of soil, eliminating the effects of + 2 water content change on the values of sorbed concentrations. At the top the column, the Ca concentration in the recharging water was maintained to be equal to that of Na+. As the recharg Ca gradually replaced Na+ on the exchange sites. After the replacement + ing water advanced, 2 Ca concentration was 7.2189x iO mol/L of soil, compared to + was completed, the sorbed 2  Chapter 7. MODEL DEMONSTRATIONS  1.0 0.8 0.6  I  —  124  I  I  -  -  —  -  •‘---  t = t=  -  0 33 h 78 hr  040.2  -  -  0.0 0  2.Oe-05  4.Oe-05  I  I  6.0e05  8.Oe-05  I .Oe-04  Concentration (mol/L) Figure 7.12: Sorbed Na+ concentration distribution along the soil column (case 1). the sorbed Na+ concentration of 5.6221><  10  + 2 mob/L of soil. The replacement of Na+ by Ca  on the exchange sites is consistent with the knowledge that the exchange sites have a preference (Ca in this case) over monovalent ions (Na+ in this case). This phenomenon + for bivalent ions 2 is correctly siumlated by the computer model. + concentration distribution along the soil column. Ini 2 Figure 7.14 shows the dissolved Ca + was mainly concentrated on the exchange sites. The dissolved Ca 2 + concentration 2 tially Ca was extremely low in the soil solution (1.9039 x iO molfL). As the recharging water with higher  + 2 Ca  Ca concen + concentration moved downwards along the column, the dissolved 2  tration was increased to 2.4913 x l0’ mollL. The dissolved Na+ concentration distribution along the column is shown in figure 7.15. The unusual shape of the breakthrough curve warrants a more detailed analysis. At the top end of the Ca and hence + column where the recharge took place, originally sorbed Na+ was replaced by 2 was released into the soil solution. Because the total analytical concentration of Na+ was held constant at the top end of the colunm (boundary condition), the dissolved Na+ concentration was therefore maintained higher than the initial value. If there was no Na+ being released from the  Chapter 7. MODEL DEMONSTRATIONS  125  1.0 0.8 0.6  t=0 = 33 hr t=78hr  +  -a 0.4  3  0.2 0.0 2.5e-05  ------  3.5e-05  4.5e-05  5.5e-05  6.5e-05  7.5e-05  Concentration (mol/L) + concentration distribution along the soil column (case 1). 2 Figure 7.13: Sorbed Ca  1.0 0.8 0.6  t=0 = 33 hr t=78hr  — -+---°  0.4 0.2 0.0 1 .Oe-07  1.Oe-06  1.Oe-05  1.Oe-04  1 .Oe-03  Concentration (molIL) Figure 7.14: Dissolved  + 2 Ca  concentration distribution along the soil column (case 1).  126  Chapter 7. MODEL DEMONSTRATIONS  1.0 0.8 t=0  0.6  t= 33 hr C)  t=78hr  --  0.4 0.2 0.0 6.Oe-04  9.Oe-04  1.2e-03  1.5e-03  Concentration (mol/L) Figure 7.15: Dissolved Na concentration distribution along the soil column (case 1). exchange sites along the column into the soil solution, this concentration gradient of Na+ alone would eventually cause the Na+ concentration in the solution to reach the level at the top of the column. At the same time when the transport of dissolved Na+ was proceeding, the sorbed Na+ was also being replaced by Ca2+ on the exchange sites. This would cause the Na+ concentra tion in the solution to be even higher. Because the longitudinal diffusivity was relatively small, the solute transport was predominantly advective. The dispersive flux of Na+ upwards due to the concentration buildup was much less than the advective flux of Na+ downwards due to the flow of recharging water. The combined effect of downwards transport of Na+ and the release of Na+ from the exchange sites caused the accumulation of Na+ at the front of the breakthrough curve. However, after the sorbed Na+ along the whole column was exchanged, the dissolved concentration of Na+ would gradually return to the level of the top end, which is clearly shown in figure 7.15. Figures 7.16 through 7.20 show the results for case 2. In case 2, the soil column initially had +. The leaching water from the top end of the column has 2 high concentrations of Na+ and Ca + being higher than 2 much lower concentrations of Na+ and Ca+, with the concentration of Ca  Chapter 7. MODEL DEMONSTRATIONS  127  1.0 0.8 0.6 a  t=0 t=33hr  t=78hr  ••  0.4 0.2 0.0 0  2.Oe-04  4.Oe-04  6.Oe-04  8.Oe-04  1.Oe-03  Concentration (mol/L) Figure 7.16: Dissolved Na+ concentration distribution along the soil column (case 2). that of Na+. The leaching of Na+ is clearly shown in figure 7.16. At the end of the simulation, + was 2 about 80% of the column was completely leached. On the other hand, the leaching of Ca + was completely leached only for a 2 much slower (figure 7.17). At the end of the simulation, Ca + from the column 2 little over 50% of the soil column. The reason for the slower leaching of Ca is because of the dissolution of the originally precipitated CaCO (4) (figure 7.20). Initially, the 3 soil solution was supersaturated and precipitation of CaCO (t) was the result. When the leach 3 ing water moved down, the soil solution became undersaturated and dissolution of CaCO (4) 3 Ca concentration in the + occurred. The dissolution of CaCO 3 (4) temporarily increased the 2 soil solution (figure 7.17) as well as on the exchange sites (figure 7.19) to a level even higher + in the soil solution created a larger reverse 2 than the initial value. This accumulation of Ca +. 2 concentration gradient and resulted in slower downwards leaching of Ca Figure 7.18 shows the sorbed Na+ concentration distribution along the soil column. The general trend is that the sorbed Na+ concentration was reduced because in the leaching water, + concentration was higher than Na+ concentration while initially both had the same con 2 Ca centration. However, the sorbed Na+ concentration along the column was first reduced to an  Chapter 7. MODEL DEMONSTRATIONS  1.0  128  p  \$  0.8 0.6 a)  t=o = 33 hr --i--t=78hr -o  0.4  -o El  /  /  0.2 I  0.0 0  0.0001  0.0002  I  0.0003  0.0004  0.0005  Concentration (molJL) + concentration distribution along the soil column (case 2). 2 Figure 7.17: Dissolved Ca  1.0 -  -  0.8 -  0.6  I  /  /  -  t=0 = 33 hr t=78hr  a  --a--  I  0  1.Oe-06 2.Oe-06 3.Oe-06 4.Oe-06 5.Oe-06 6.Oe-06 Concentration (mol/L)  Figure 7.18: Sorbed Na+ concentration distribution along the soil column (case 2).  Chapter 7. MODEL DEMONS TRATIONS  129  1.0 0.8 0.6  t=0 = 33 hr t=78hr t  --i--••  0.4 0.2 0.0 7.2e-05  7.3e-05  7.4e-05  7.5e-05  Concentration (mol/L) Ca concentration distribution along the soil column (case 2). + Figure 7.19: Sorbed 2  1.0 0.8 +  I  0.6  t=0 33 hr 78 hr  0.4 E  0.2 0.0 0  I  I  I  4.Oe-05  8.Oe-05  1.2e-04  1.6e-04  Concentration (molIL) Ca concentration distribution along the soil column (case 2). + Figure 7.20: Precipitated 2  Chapter 7. MODEL DEMONSTRATIONS  130  even lower value before it was increased to the final concentration. This is because the exces + in the soil solution discussed in the previous paragraph caused the Ca 2 + 2 sive buildup of Ca concentration on the exchange sites to be higher (figure 7.19). Figure 7.19 shows that the sorbed + concentration was actually increased after the leaching. This is due to the fact that the 2 Ca + than that of Na+ and that the exchange sites 2 leaching water had a higher concentration of Ca has a preference for bivalent ions over monovalent ions.  7.2  Simulation of a Two Dimensional Problem  In this section, we are going to present the solution of a two-dimensional problem by the com puter model. A subsurface drainage system is used in the simulation to investigate the behavior of the developed model in a two-dimensional domain. The parallel drains spaced at 8 m are installed at a depth of 1.5 m. There is an impermeable layer at 2.5 m below the ground surface. A recharge rate of 0.0005 mlhr is uniformly maintained for the duration of the simulation. The condition is simplified to a two dimensional problem as sketched in figure 7.21. For the purpose of demonstration only, we are going to use the same chemical composition as in the previous section. The chemical species and their respective reaction constants are listed in table 7.11, and the stoichiometric coefficients are listed in table 7.12. We are also going to use the same retention curves as shown in figure 7.9 and the same heat conductivity as a function of water content as shown in figure 7.10. Other material properties and simulation parameters are listed in table 7.14. As in the cases of one-dimensional problems, the ion exchange capacity given in table 7.14 is for saturated soil. The actual value for each node in the mesh at each time step is calculated automatically by the computer program. Two cases were run to examine the behavior of the computer program in a two-dimensional domain. The first case represented the leaching of the soil of high solute concentrations with water of lower chemical concentrations. The concentrations of the leaching water were held  Chapter 7. MODEL DEMONSTRATIONS  R  =  131  0.0005 rn/hr  Figure 7.21: A subsurface drainage system used in the simulation.  Table 7.14: Simulation Parameters (Two-Dimensional) Parameter Dimension of the Domain Pu, Porosity F, Fraction of clay , Fraction of mineral 1 F , Fraction of organic matter 0 F a,, Longitudinal diffusivity , transverse diffusivity 1 a Nq, Ion exchange capacity  Value 4 mx 2.5 m, vertical 0.3 0.2 0.65 0.05 0.2 m 0.02 m 0.0005 eqfL  Chapter 7. MODEL DEMONSTRATIONS  132  constant during the simulation. The second case emphasized the process of replacing sodium Ca concentration was increased while con + on the soil ion exchange sites by calcium. The 2 centration of Na+ was held constant. For both cases, the water table was initially at the surface, and the system was in an equilibrium state. The temperature was uniformly at 20 °C initially throughout the domain, and remained little changed during the simulations. The detailed initial and boundary conditions are presented in table 7.15. The 4 mx2.5 m domain was discretized into a 40 x 25 mesh. The mesh was produced with the automatic mesh generator developed for use with the computer model. The output from the mesh generator were directly used in the main finite element program. The total number of elements in the simulations is 1000, and the total number of nodes is 1066. The mesh is denser at the surface where the concentration gradi ents are greater. The time steps were increased gradually from 0.005 hour initially to 0.5 hour after the initial shocking effects due to sudden changes in moisture potential and chemical con centrations were eased. The tolerance level was set at 0.000001. The backward finite difference approximation of the time derivatives was used (co  =  1.0). The iterative methods were used to  solve the resulting systems of linear equations. Figure 7.22 shows the contour lines of the total water potential in the domain and the water table positions in both case I and case 2 at about 114 hours and about 250 hours after the simula tion started. Chemical concentrations did not have noticeable effect on the moisture flow in this situation, therefore separate graphs for case 1 and case 2 are not necessary. The water table kept dropping during the whole simulation, causing the pressure potential to decrease, although the rate of decline of water table was reducing as the simulation continued. This is because of the narrow drain spacing and the relatively low recharge rate at the surface. The potential gradient was the greatest initially in the immediate vicinity of the drain, and gradually decreased with time, which resulted in lower water flow velocity. The equal potential contour lines are curvi linearly perpendicular to the three impervious boundaries. This means that there was no water flow cross these boundaries, which was in agreement with the specified boundary conditions.  Chapter 7. MODEL DEMONS TRATIONS  133  Table 7.15: Initial and Boundary Conditions: Two-dimensional Problem Case 1&2  Case 1&2  Case 1 2  IC and BC for Water Movement 0<x<4.0m,0<z<2.Sm ?,bm=2.5zm x=0,z=l.Om m=0 K( + 1) = 0.0005 hr 0 < x < 4.0 m, z = 2.5 m No water flow cross all other boundaries IC and BC for Heat Transfer 0<x<4.Om,0<z<2.5m T=20°C No heat flow cross all boundaries IC and BC for Solute Transport Components (molJL) Na+ + 2 Ca 0<x<4.Om,0<z<2.5m 0.001 0.001 0.00003 0.00035 x 4.0 m, z = 2.5 m 0 0<x<4.Om,0<z<2.5m 0.001 0.0001 0<x<4.Om,z=2.5m 0.001 0.001  t=0 t0 t t  0 0  t=0 t 0  t=0 t 0 t=0 t0  Figures 7.23 to 7.27 show the simulation results for case 1, in which the soil with higher solute concentration was leached using water of lower solute concentration from the soil sur face. Results are given at times 114 hours and 250 hours, with cumulative applied water of 5.7 cm and 12.5 cm, respectively. Dissolved concentrations of component species are expressed as number of moles per liter of soil solution (molfL). Sorbed and precipitated concentrations have been multiplied by soil water content at each node, and are expressed as number of moles per cubic decimeter of soil (mol/dm ) to eliminate the effect of water content variation on sorbed 3 and precipitated concentrations. Figure 7.23 shows the dissolved concentration contour lines of sodium Na+ in the domain. As water moved down and towards the drain, sodium in the soil solution was leached and was carried out of the system by the drainage water. The bottom contour line in figure 7.23(a) and (b) represents the initial dissolved concentration of sodium. At the end of the simulation, the  Chapter 7. MODEL DEMONSTRATIONS  134  2.5 tern:20  /  1.65  .-,  0.5  Drain 1.45 I  0.0  0.5  I  1.0 1.5 2.0 2.5 3.0 1-lorizontal Distance (m)  I  3.5  0.0  4.0  (a) 2.5  .  /  1.48 1.43 138 1.33 1.28  /  /  /  Drain /  0.0  I  0.5  Iii  II  1.0 1.5 2.0 2.5 3.0 Horizontal Distance Cm)  -  -  I  3.5  io0.5 0.0  4.0  (b)  Figure 7.22: Water potential contour lines and water table positions at (a) 114 hours, and (I,) 250 hours. leaching effect was observed below the drain level. The sorbed concentrations of sodium and calcium in the domain are shown in figure 7.24 and 7.25, respectively. The similar leaching effect as in the case of dissolved sodium was ob served for the sorbed sodium, while the sorbed concentration of calcium was actually increased. Initially, the concentrations of sodium and calcium were equal in the soil. Because the exchange sites have a preference for bivalent ions over monovalent ions, the exchange sites were domi nated by calcium. And because the concentration of calcium was larger than that of sodium in the leaching water, sodium on the exchange sites was further replaced by calcium. The sorbed  Chapter 7. MODEL DEMONSTRATIONS  0 /  / ..  -  Drain I  0.0  I  0.5  I  135  0.00098 0.0007 0.0005 0.0003 0.0001 I I  1.0 0.5 0.0  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  3.5  4.0  (a) 2.5 2.0 ‘.5?  (5  0.00098  o:0007z:::  I  Drain  -/  I  0.0  0.5  0.0005 0.0003 0.0001 I I  -  1.0 0.) -  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  0.0 3.5  4.0  (b)  Figure 7.23: Dissolved sodium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1).  Chapter 7. MODEL DEMONSTRATIONS  136  20 --  -  .Lue-tiu  / / I  0.0  eli 1 1.v  --  4.2e-06 2.9e-06 1.6e-06 5.5e-07  Drain  0.5  I  I  I  -  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  1.5  I  3.5  0.5 0.0  4.0  (a)  2.5 -  -  2.0 1.5 -C  66  / Drain  .2e-06  -  /  l.6e-06 5.5e-07 I  0.0  0.5  —  I  -  I  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  3.5  I.0  0.5 0.0  4.0  (b)  Figure 7.24: Sorbed sodium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1). sodium was less than 1% of the sorbed calcium after the leaching. The dissolved concentration contour lines of calcium are shown in figure 7.26. Before the leaching, the pH value of the soil solution was about 8.4, and calcite was formed in the soil. After the leaching, the pH of the soil solution was reduced to about 7.6, and solubility of calcite was greatly increased. The previously precipitated calcite was dissolved, causing a build-up of calcium in the soil solution. Therefore, at the end of the simulation (250 hours), the leaching effect on the dissolved calcium was observed only to the depth of 0.25 m below the soil surface. The build-up of the dissolved calcium in the soil solution in turn had a retarding effect on the  Chapter 7. MODEL DEMONSTRATIONS  137  2.0  (  )  T47e-05 7.41e-05 7.35e-05 7.29e-05 7.23e-05  /  / Drain  I  0.0  0.5  .  1ob . —  0.5 I  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  I  3.5  0.0 4.0  (a) 2.5  — .  70 7.41e-05 7.35e-05 7.29e-05 7.23e-05  -  /  /  --  Drain I  0.0  0.5  I  1 .  0.5 I  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (rn)  0,0 3.5  4.0  (b)  Figure 7.25: Sorbed calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1). dissolution of the precipitated calcite, which is shown in figure 7.27. The simulation results for case 2 are given in figures 7.28 to 7.31. This case was formu lated to illustrate the capability of the computer program to simulate ion exchange in the solidsolution complex. The participating species in the ion exchange process were sodium Na+ and t The initial and boundary conditions for the water flow and heat transfer equations 2 calcium Ca in case 2 were the same as in case 1. Sodium concentration was initially 10 times of calcium + was 2 concentration in the whole domain. After the simulation started, the concentration of Ca increased by 10 times and kept constant while the concentration of Na+ remained unchanged  Chapter 7. MODEL DEMONSTRATIONS  138  ---.  -ru  2.5 2.0  -  1.5 n nnn,e ‘J.uviJ_,u  /  /  / Drain  I  0.0  I fl Ia;  -  0.00031 0.00025 0,00021 0.00016  —  0.5 I  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  0.5  tO  0.0 3.5  4.0  (a)  2.5 2.0  1.51  -  /  C)  ,-—  Drain  0.00031 0.00025 0.00021 0.00016  1.0 Z  ------  0.5 0.0  0.0  0.5  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (rn)  3.5  4.0  (b)  Figure 7.26: Dissolved calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1). at the soil surface. Figures 7.28 and 7.29 show the sorbed concentration contour lines for sodium and calcium, Ca is evident. The exchange ± respectively. The replacement of Na+ on the exchange site by 2 site was initially dominated by iSa± as the total concentration of Na+ was 10 times higher than +. When the solution with equal concentrations of Na+ and Ca 2 + moved down and 2 that of Ca towards the drain, the concentration of Na+ on the exchange sites was reduced to about 1/20 of the original value.  + 2 Ca  became the dominant occupant. This behavior is in line with the well  known knowledge that ion exchange sites have a preference for bivalent ions over monovalent  Chapter 7. MODEL DEMONSTRATIONS  139  2.5 2.0  0.00015 0.00013 9e-05 Se-OS le-0S  J / Drain I  0.0  0.5  I  n  i .  -  I  0.5 0.0  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  3.5  4.0  (a) 2.5 2.0  0.00015 0.00013 9e-0S Se-OS le-05  J  /  Drain I  0.0  0.5  I  .  0.5  ---  -  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (in)  0.0 3.5  4.0  (b)  Figure 7.27: Precipitated calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 1). ions. At the same time, the dissolved concentration of calcium also increased (figure 7.30). Be cause of the replacement of sodium with calcium on the exchange sites, the transport of calcium was retarded to a certain degree. The dissolved Na+ concentration contour lines in the domain for case 2 is presented in fig ure 7.31. Careful study of the contour lines in figure 7.31(a) and (b) reveals that there is a zone in the domain where the sodium concentration is greater than that at the soil surface (contours lines for 0.001 and 0.00105 mol/L). Figure 7.31(c) shows the distribution of the dissolved sodium  Chapter 7. MODEL DEMONSTRATIONS  -  140  -  20 J5 9e-05 6e-05 4e-05 Ic-OS 6e-06  / Drain I  0.0  0.5  I  I  I  io .  0.5 I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  0.0 3.5  4.0  (a) 2.5  3/  9e-05 6e-05 4e-05 Ic-OS 6e-Oé  / Drain I  0.0  0.5  io .  0.5 I  I  1.0 1.5 2.0 2.5 3.0 Florizonta] Distance (m)  0.0 3.5  4.0  (b)  Figure 7.28: Sorbed sodium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 2). concentration along the vertical line that passes through the drain (x  =  0), in which this ef  fect is more clearly seen. This phenomenon of accumulation of sodium in the soil solution can be explained as follows. At the soil surface where the recharge took place, initially sorbed Na+ + and hence was released into the soil solution. Because the total analytical 2 was replaced by Ca concentration of Na+ was kept unchanged at the surface when the simulation started, the dis solved iSa+ concentration was higher than the original value because of the released Na+ from the ion exchange sites. The dissolved Na+ concentration at the surface was then held constant during the entire simulation (the Dirichlet boundary condition). This concentration gradient of  Chapter 7. MODEL DEMONSTRATIONS  141  2.5 20 1.51 _7  ,,c  o in 1.’.I -  6e-05 Se-OS 4e-05 3e-0S  / Drain I  0.0  0.5  0.5 I  0.0  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  3.5  4.0  (a) 2.5 2.0  .7 ,  ,-‘c ,e—,..,  ‘C  -,  .,  ,.  /  6e-05 Se-OS  Drain  4e-05  1U  0.5  3e-05 I  0.0  0.5  I  I  I  I  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  0.0 3.5  4.0  (b)  Figure 7.29: Sorbed calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 2). Na+ in the soil solution would gradually increase the Na+ concentration in the solution below the surface to the level at the surface due to the processes of advection and dispersion. This is one source of the Na+ increase in the affected domain. While the transport of dissolved Na+ + on the exchange site and be 2 was proceeding, the sorbed Na+ was also being replaced by Ca ing released into the soil solution. This would increase the Na+ concentration in the solution even further. This is another source of the Na+ accumulation. The combined effect of the Na+  Chapter 7. MODEL DEMONSTRATIONS  142  2.5 2.0 L51 fl flfl!VV2  1 0  0.00017 0.00011 Se-OS 2e-07  4”  /  Drain I  0.0  .0  JjJVL’LJ  /  0.5  I  .  0.5 I  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  0.0 3.5  4.0  (a) 2.5 -  —  20 1.51  f_i Iiflfl’fl U.UUULJ  F’  1 0  0.00017 0.00011 Se-OS  / Drain  . -  0.5  -  2e-07  I  0.0  0.5  I  I  I  I  I  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  I  3.5  0.0 4.0  (b)  Figure 7.30: Dissolved calcium concentration contour lines at (a) 114 hours, and (b) 250 hours (case 2). transport down from the soil surface and the replacement of Na+ from the exchange sites pro duced the observed phenomenon. After the sorbed Na+ along the flow path was completely ex changed, the dissolved concentration of sodium would gradually return to the level at the soil surface, which is clearly shown in figure 7.3 1(c).  Chapter 7. MODEL DEMONSTRATIONS  143  2.5 2.0  1.51 0.00105 0.001 0.00095 0.00085 0.00075  / Drain  r’  bSJ  0.5 0.0  0.0  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  0.5  3.5  4.0  (a) 2.5 2.0 1,51 -‘/7,  .  ,1  I fl l.’J  0.001 0.00095 0.00085 0.00075  Drain  ‘C bO  x  0.5 0.0  0.0  0.5  1.0 1.5 2.0 2.5 3.0 Horizontal Distance (m)  3.5  4.0  (b) 2.5  2.0 S  1.5 1.0 0.5 0.0 0.0006  0.0008  0.0010  0.00 12  Concentration (MoIIL) Cc)  Figure 7.31: Dissolved sodium concentration contour lines at (a) 114 hours, (b) 250 hours, and (c) concentration distributions along vertical line at x = 0 (Case 2).  144  Chapter 7. MODEL DEMONS TRATIONS  7.3  Simulation of a Three Dimensional Problem  In this section, we are going to demonstrate the capability of the computer model to solve threedimensional problems. Assume that a 2 mx2 mx 1 m box is filled with a hypothetical type of soil. At the center of the top surface, there is a 10 cmx 10cm of water ponding which is kept at 2 cm deep. Assume there is no evaporation at the surface. There is no water outlet at any of the other surfaces. This problem is illustrated in figure 7.32, with the volume formed by ABCD EFGH being the container. The ponding area is centered at point 0. Only one-quarter of the box is needed to be simulated because of symmetry. This volume of 1 mx 1 mx 1 mis formed by AIOJ-EKLM in figure 7.32. The same retention curves, heat conductivity, and chemical composition of the soil solution of sections 7.1 and 7.2 will again be used in this simulation. The material properties are the same as in section 7.2. C  D  A S 1  E  K  F  Figure 7.32: Illustration of a three-dimensional box filled with a porous medium. The soil inside the box initially had a uniform pressure potential of —0.8 m, and therefore  Chapter 7. MODEL DEMONSTRATIONS  145  was unsaturated. The temperature was 20 °C initially and remained little changed during the simulation, i.e. there was no external heat sources or sinks. The total analytical concentrations of Na+ and Ca 2 were 0.00 1 mollL and 0.0005 mollL, respectively. The total analytical con + at the surface below the ponding water were both kept at 0.001 2 centrations of Na+ and Ca molJL. Table 7.16 lists the complete initial and boundary condition for the simulation. It should be pointed out that although the initial total analytical concentration of Na in the soil and the total analytical concentration of Na+ at the boundary underneath the ponding water were both equal to 0.00 1 molfL, they were actually different in terms of dissolved Na+ concentration in + concentration caused 2 the soil solution. Firstly, as we have discussed before, the increase in Ca the release of Na+ from the exchange sites into the soil solution, and secondly, the difference in water content caused the difference in the dissolved concentration. As pointed out previ ously, the concentrations are expressed in moles per liter of soil solution, and the total analyti cal concentration of a component species is equal to the summation of its dissolved, sorbed and precipitated concentrations. Initially the soil in the box was unsaturated while the soil below the ponding water was saturated. Therefore the sorbed Na+ concentration of the soil below the ponding water had a lower expressed value than that elsewhere in the box. If the total analytical concentrations are equal for both saturated and unsaturated soils, the dissolved concentration of the saturated soil will be higher than that of the unsaturated soil because of the above reason. The 1 mx 1 mx I m cube is discretized into a 9 x9 x9 finite element mesh, with a total of 729 elements and 1000 nodes. The mesh is denser close to the ponding water. The initial time steps were relatively small (0.001 hour) to reduce the simulation error caused by the sudden change of water pressure and solute concentrations. The time steps were then gradually increased to 0.01, 0.1, and finally 0.5 hour. The backward difference (w  =  1.0) method was again used to approx  imate the time derivatives. The tolerance level was set at 0.000001. The iterative methods were used to solve the systems of equations. Figures 7.33 through 7.37 show the simulation results at 28 hours and 78 hours at the y  =  Chapter 7. MODEL DEMONSTRATIONS  146  Table 7.16: Initial and Boundary Conditions: Three-dimensional Problem IC and BC for Water Movement O<x< l.Om,O <y<l.Om,O<z< l.Om 0.95m<x< l.Om,0.95m<y< l.Om,z=l.Om No water flow cross all other boundaries IC and BC for Heat Transfer T=20°C 0<x< l.Om,0<y<l.Om,0<z< 1Dm No heat flow cross all boundaries IC and BC for Solute Transport Components (molfL) Na+ + 2 Ca 0.001 0.0005 x < 1.Om,O 1.Om,0 z 1.Om 0 y 1.0m,z=z 1Dm 0.95m< x < l.Om,0.95m<y 0.001 0.001 —O.8m ?bm =OM2m  ?bm=  t=0 t>0 t 0 t=0 t 0  t=0 I 0  1.0 m plane. The ponding water is at the upper right corner of each graph. Figure 7.33 show contour lines of the total water potential at the y  =  1.0 m plane. The initial pressure potential  was —0.8 m and therefore the soil was unsaturated throughout the domain. Moisture started to redistribute because of gravity and the potential gradient caused by the ponding water. At the end of simulation (78 hours), the bottom part of the box became saturated (figure 7.33(b)), while the soil water content at the upper part of the box and away from the ponding water decreased. + concentration contour lines at the y 2 Figure 7.34 shows the dissolved Ca  =  1.0 m plane.  Ca concentration in the ponding water was higher than the initial Ca + + concen 2 Because the 2 Ca concentration in the soil solution increased as the water advanced + tration in the soil, the 2 + trans 2 from the ponding site to the rest of the soil in the box. The boundary condition for Ca port at the ponding site was set such that the soil solution was saturated with CaCO (fl. 3 + and Na+ concentration contour lines at the 2 Figures 7.35 and 7.36 show the sorbed Ca y  =  + was 2 1.0 m plane, respectively. Although the initial total analytical concentration of Ca  + was still the dominant species on the exchange sites, occupying about 2 only half of Na+, Ca 91% of the exchange sites. This is due to the fact that the exchange sites have a preference  Chapter 7. MODEL DEMONSTRATIONS  0.5 0.4 0.3 0.2 0.1  147  1.0  p I  P  --:  0.8 0.6  .  0.4  y 1.0 m =28 hr =  (a)  0.2 0.0  0.5 0.4 0.3 0.2 0.1  0.2 I  0.4 0.6 x(m)  0.8  1.000 1.0  I  N  0.8 0.6  .  0.4 y  =  1.0 m  t  =  78 hr (b)  0.2 0.0  0.2  0.4 0.6 x(m)  Figure 7.33: Total water potential distribution at they 78 hours.  =  0.8  1.0 m plane after (a) 28 hours, and (b)  Chapter 7. MODEL DEMONSTRATIONS  148  I  2.40e-04 2.00e-04 1.70e-04 1.40e-04 1 lOe-04  1  1.0  I  / N,  -  0.8 06 Q4N  y=1.Om 02  t =28 hr (a)  0.0  0.2  0.4 0.6 x(m)  0.8  1.000 1.0  2.40e-04 2.OOe-04 1.70e-04 1.40e-04 1.lOe-04  /  (  I / / /  / 0.8  N. -  0.6 04  y=lOm 02  t =78 hr  (b)  0.0  0:2  Figure 7.34: Dissolved Ca 2 distribution at they hours.  0:4 0:6 x(m) =  0.8  1.00.0  1.0 m plane after (a) 28 hours, and (b) 78  149  Chapter 7. MODEL DEMONSTRATIONS  1.0  7.20e-05 7.15e-05 7.lOe-05  0.8  7.05e-05 7.OOe-05  0.6 0.4  y  =  I N  1.0 m 0.2  t =28 hr  (a)  0.0  0.2  0,4  0.6  0.8  .00.0  x(m) 1.0  7.20e-05 7. 15e-05 7.lOe-05 7.05e-05 7.OOe-05  0.8 0.6 0.4  y t  =  1.0 m  =  78 hr  (b)  N  0.2 I  I  0.0  0.2  Figure 7.35: Sorbed Ca 2 distribution at the y hours.  0.4 0.6 x (m) =  0.8  1.00.0  1.0 m plane after (a) 28 hours, and (b) 78  + in this case) over monovalent ions (Na+ in this case). At the ponding 2 of bivalent ions (Ca Ca concentration was higher than in the rest of the soil and was comparable to + site where 2 Ca was even more dominant on the exchange + the Na+ concentration in the ponding water, 2 sites, occupying about 96% of the total exchange sites. As the ponding water advanced, Na+ +. The sorbed Na+ concentration decreased 2 on the exchange sites was gradually replaced by Ca + concentration increased (figure 7.35). 2 (figure 7.36) while the sorbed Ca Figure 7.37 shows the dissolved Na+ concentration contour lines at the y  =  1.0 m plane.  As we pointed previously in the section, the Na+ concentration in the ponding water was higher than the initial Na concentration in the soil, therefore the general trend should be that the dis solved Na+ concentration in the soil gradually increases as the ponding water advances from  Chapter 7. MODEL DEMONSTRATIONS  150  5.70e-06 6.OOe-06 7.OOe-06 8.OOe-06 9.OOe-06  1.0  ‘I “-  N  0.8 0.6  -  -  0.4  -N::-  y=1.Om t =28hr \a)  --JN:z: I  0.2  0.0  5.70e-06 6.OOe-06 7.OOe-06 8.OOe-06 900e-06  I  0.4 0.6 xQn) I  i/I:  /  I  /1/  /  0.8  1.0  00 1.0  /1  /  /  0.2  0,8 06  -  0.4k  y=l.Om t =78hr  ‘.-----.EzZ/ I  0.0 Figure 7.36: Sorbed Na distribution at they  0.2  =  I  0.4 0.6 x (m)  I  0.8  1.0  0.2 00  1.0 m plane after (a) 28 hours, and (b) 78 hours.  the ponding site to the rest of the soil. Indeed this trend can be observed from figure 7.37. Fur thermore, there also exists a region near the top surface where the dissolved Na+ concentration was even higher than that at the ponding site. The cause of the Na+ build-up is of course the release of Na+ from the exchange sites into the soil solution. However, this factor alone cannot cause such build-up because no such build-up was observed at the right part of the box where siniilar release of Na+ from the exchange sites was taking place. Another factor that caused the build-up of Na+ in the soil solution is the decreasing water content. For a certain amount of Na+ released from the exchange sites into the soil solution, the soil with lower water con tent will have a larger increase of dissolved Na+ concentration than the soil with higher water content. In the present case, the release of Na+ from the exchange sites accompanied by the  Chapter 7. MODEL DEMONS TRATIONS  9.85e-04 9.80e-04 9.75e-04 9.70e-04 9.60e-04 9.50e-04  151  1.0 •  -  -  •  0.8 0.6  S.  0.4 -  y  =  1.0 m 0.2  t =28 hr  (a)  0.0  I  I  I  0.2  0.4  0.6  0.8  1.0  00  x(m) 1.0  9.85e-04  9.80e-04 0.8  9.75e-04 9.70e-04 9.60e-04 9.50e-04  0.6 0.4  y  =  t  =  1.0 m 78 hr  (b)  0.2 0.0  0.2  Figure 7.37: Dissolved Na distribution at they hours.  0.4 0.6 x (m) =  0.8  1.000  1.0 m plane after (a) 28 hours, and (b) 78  decrease of water content near the top surface of the soil caused the Na+ build-up in the soil solution observed from figure 7.37.  Chapter 8  SIMULATIONS OF IRRIGATION AND LEACHING  In the last chapter, a number of one-, two-, and three-dimensional problems were simulated using the developed computer model to demonstrate the capability of the model to solve vari ous types of problems. The simulation results show that the computer model is able to predict correctly some of the phenomena that are known to happen in practical situations, such as ion exchange, salt leaching, and mineral precipitation and dissolution. In this chapter, we are going to use the model to investigate in more detail the processes of salinization and salt leaching in soils under irrigation. A more realistic and complete chemical composition will be used in the simulations. First a relatively simple irrigation with leaching problem without considering ion exchange, taken from literature, is simulated for comparison of the present model and the one from literature. Then simulations are carried out to investigate the salinization process of a soil under irrigation without proper consideration of salt leaching, and the subsequent leaching of the saline soil by applying more irrigation water than crop water requirement. Ion exchange will be taken into consideration in the simulations.  8.1  A Simple Irrigation Problem  A sample problem from imünek and Suarez (1994) was simulated using the developed model for comparison of the present model and the UNSATCHEM-2D model developed by imiinek and Suarez (1994). A one meter deep homogeneous soil profile was assumed under irrigation. The water retention curve of the hypothetical loam soil is described by a closed form function  152  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  153  of van Genuchten (1980) as (8.240)  (1+ah)m and the unsaturated hydraulic conductivity is given by Mualem (1976): K(S) =  isi  [i  —  (1  —  S)m]  (8.241)  where 0,. and 0 are the residual and saturated moisture contents ) /m 3 (m , respectively, a (1/rn), n (dimensionless), and m = 1  —  1/n (dimensionless) are the parameters of the hydraulic char  acteristics, K 3 is the saturated hydraulic conductivity of the soil, and Se is the relative saturation  =  z,. 3 :  (8.242)  The parameters used by im(inek and Suarez (1994) for the unsaturated hydraulic properties were: 0,. = 0.000, O = 0.480, n = 1.592, a = 1.5022 m , m = 1 1  —  1/n = 0.372, and  3 = 0.6048 rn/day. These parameters were also used in this simulation. The water content K and the unsaturated hydraulic conductivity of the soil as functions of pressure head are shown in figure 8.38. The chemical system of the soil solution in the unsaturated zone includes 44 chemical species. There are 9 component species, 35 aqueous species, 8 precipitated species, and 1 gaseous species (g)). The ion exchange was not considered in this simulation. The system was treated as 2 (C0 an open chemical system. The soil partial pressure of C0 (g) was assumed to be equal to the 2 atmospheric value at the soil surface (35 Pa) and to increase linearly with depth up to 2 kPa at the bottom of the soil profile. The chemical species considered in this simulation and the corre sponding reaction constants are given in table 8.17. The stoichiometric coefficients are listed in table 8.18. A nonreactive tracer species was used in the chemical system to compare the trans port of a nonreactive solute with that of a reactive solute in the unsaturated soil under irrigation.  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  !03  / CA,  154  /  I  C  ci  I  -100  -10  -1  -0.1  -0.01  -100  -10  /  -1  0  ci  -0.1  -0.01  Pressure potential (m)  Pressure potential (m)  Figure 8.38: Water content and hydraulic conductivity as functions of pressure head. Table 8.17: Simple Irrigation Problem: Chemical Reactions and Equilib riurn Constants  Reaction  Species  K 10 log  Component Species 1 2  t H=H CO  =  CO  0 0  3  Na=Na  0  4  K=K  0  5  2 Mg  =  2 Mg  0  6  + 2 Ca  =  + 2 Ca  0  7  SO  =  SO  0  8 9  C1=Ch Tracer  =  Tracer  0 0  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  155  Table 8.17: (continued)  Reaction  K 10 log  Species Dissociation of Water  10  1420— H  =  0H  —13.99  Complexation H+CO=HC0  11 12  2H  13  CO  +  Na +C1  =  3 C 2 H 0  =NaC1  10.33 16.68 0.00  14  Na  +  C0  =  NaCO  1.27  15  2Na  +  CO  =  3 C 2 Na O  0.00  +  +  C0  =  3 NaHCO  10.08  14+  =  NaOH  —14.20  S0  =  NaS0  0.70  CL  =  KG  —0.70  C0  =  3 C 2 K 0  —0.03  16  Na  17  Na  +  18  Na  19  2K  23  2 Mg 2 Mg  25 26 27 28 29  +  +  +  0—H=K0H 2 K÷H  22  24  —  K  20 21  0 2 H  +  2 Mg  +  SO  =  KS0  0.85  +  2Ch  =  2 MgCI  —0.03  +  C0  =  MgHCO  11.4  +  C0  =  3 MgCO  2.98  H  =  Mg0H  —11.79  2H  =  2 Mg(OH)  —27.99  S0  =  1 MgS0  2.25  C1  =  CaCft  —1.00  2 +1420 Mg 2 Mg  +  21420 2 Mg  —14.50  —  —  +  2 Ca  +  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  156  Table 8.17: (continued)  Reaction  Species  30 31  2 Ca 2 Ca  34  =  2 CaCI  0.00  +  Cor  =  CaHCOj  11.33  3 Ca2++CO=CaCO  32 33  2Ch  +  +  2 Ca Ca  +  0 2 H  0 2 2H  +  35  2 Ca  3.15  H  =  CaOH  —12.60  2H  =  2 Ca(OH)  —27.99  SO  =  4 Ca50  —  —  +  K 10 log  2.31  Precipitation 36 37  NaC1(4)  —1.582  O0H 10H S 2 1 4 O =Na (4) O  1.11  Na 2Na +SO  38  2Na  39  Mg  +  +  Ch  =  0 2 H  =  3 C Na O 2 H O (4)  —0.125  0 2H 2 2H  =  Mg(OH) ( 2 4)  —16.79  =  MgCO ( 3 fl  CO  +  +  + -  40  2 Mg  41  4 ÷ 2 Mg ( SO=MgSO 4j  42  2 Ca  +  CO  =  CaCO ( 3 4j  8.47  SOr  +  0 2 2H  =  2 • 4 CaSO 0 2H (J)  4.85  43  2 Ca  +  +  CO  8.03 —8.18  Dissolution of CO 2 44  O=CO 2 2H+CO—H ( g)  23.14  0 0 0 0 0 —l 1 2 0  2 Mg 2 Ca SO C1 Tracer OHHCO 3 C 2 H 0 NaC1 NaCO 3 C 2 Na O  5  6  7  8  9  10  11  12  13  14  15  0  0  0  0  Na  3  4  0  CO  2  1  H  H  Species  I  Reaction  1  1  0  1  1  0  0  0  0  0  0  0  0  1  0  CO  2  1  1  0  0  0  0  0  0  0  0  0  1  0  0  Na  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  K  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  2 Mg  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  2 Ca  Components  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  SO  Table 8.18: Simple Irrigation Problem: Stoichiometric Coefficients  0  0  1  0  0  0  0  1  0  0  0  0  0  0  0  Cl—  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  Tracer  —a  (ft  C  cM  90  0 0 —I  0 0  NaOH NaSO KC1 3 C 2 K 0 KOH KSO: 2 MgCI MgHCOj 3 MgCO MgOFft 2 Mg(OH) 4 MgSO t CaCl CaCI,  17  18  19  20  21  22  23  24  25  26  27  28  29  30  0  —2  —l  0  1  0  0  0  —1  1  3 NaHCO  16  Ht  Species  Reaction  0  0  0  0  0  1  1  0  0  0  1  0  0  0  1  CO  0  0  0  0  0  0  0  0  0  0  0  0  1  1  1  Na  0  0  0  0  0  0  0  0  1  1  2  1  0  0  0  Kt  0  0  1  1  1  1  1  1  0  0  0  0  0  0  0  t 2 Mg  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  2 Ca  Components  Table 8.18: (continued)  0  0  1  0  0  0  0  0  1  0  0  0  1  0  0  SO  2  1  0  0  0  0  0  2  0  0  0  1  0  0  0  Ch  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  Tracer  C.,’  00  —2 0  3 CaCO CaOH Ca(OH) 4 CaSO NaCI3) S 2 Na 1 4 0 (4,) 0H O 3 C Na O 2 H (Jj O Mg(OH) ( 2 4) MgCO ( 3 fl MgSO ( 4 fl CaCO ( 3 4j 2 2 4 CaSO 0 (4) H C0 ( 2 g)  32  33  34  35  36  37  38  39  40  41  42  43  44  2  0  0  0  0  —2  0  0  0  —1  0  1  CaHCO  31  H  Species  Reaction  1  0  1  0  1  0  1  0  0  0  0  0  1  1  CO  0  0  0  0  0  0  2  2  1  0  0  0  0  0  Na  0  0  0  0  0  0  0  0  0  0  0  0  0  0  K’  0  0  0  1  1  1  0  0  0  0  0  0  0  0  2 Mg  0  1  1  0  0  0  0  0  0  1  1  1  1  1  2 Ca  Components  Table 8.18: (continued)  0  1  0  1  0  0  0  1  0  1  0  0  0  0  SO  C1  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  Tracer  LA ‘C  (ID  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  160  The soil profile had a uniform initial pressure head of —5.00 m. At the top of the profile, water was applied at a rate of 0.01 rn/day. At bottom of the profile, free drainage (i.e. unit vertical hydraulic gradient) was assumed. For a free drainage boundary, the water flux is equal to the unsaturated hydraulic conductivity. The crop root water uptake was distributed linearly throughout the whole soil profile with a maximum at the soil surface and zero uptake at the bottom of the root zone. Therefore the rate of root water uptake at any depth can be calculated by 5(z)  =  2(z 2 (z  —  —  zi)R 2 zj)  (8.243)  where 5(z) (us) is the root water uptake rate at depth z (m), z 1 and z 2 (m) are the depth at the bottom and top of the root zone, respectively, and I? is the total root water uptake. The total water uptake was assumed to be 0.009 rn/day, which together with the irrigation intensity of 0.01 rn/day results in a leaching fraction of 0.1. To take into account crop root water uptake, equations 4.97 and 4.99 should be modified to = V.(DTW VT) + V(Dow Vm)  1 c  —  V(Dcw VC) + V.(K Vz) .  .  -  S(z)(8.244)  and O+Tk—O(Tk)  = —O(Sk+Pk)+(l—e)Ck+S(z)Gk  Ic = 1,2,... ,I(8.245)  respectively. The boundary condition at the surface for solute transport equations was a Cauchy (or a third type) boundary condition: + qkCk = qkGko  (8.246)  in which qj is the outward fluid flux (m/s), and C ko is the concentration of the incoming wa 7 ter (molfL). At the bottom of the profile, a Neumann (or second type) boundary condition was assumed: ack  = 0  (8.247)  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  161  Both longitudinal and transverse dispersivities were equal to zero, therefor molecular diffusion was the only cause of dispersion. The molecular diffusion coefficient for all the species in water was assumed to be 0.003 m /day. The bulk density of the soil was taken as 1300 Kg/m 2 . Be 3 cause UNSATCHEM-2D doesn’t include heat transfer, the temperature of the soil profile was assumed to be 25 °C and remained unchanged throughout the simulation. The composition of the initial soil solution in the profile, and that of the irrigation water, is that of a calcite supersaturated well water from the Wellton-Mohawk Irrigation District (well 15: CaT  =  0.0122, MgT  =  0.00966, NaT  =  0.0375, KT  =  0.00027,  4T 80  =  0.0195, CIT  =  0.0311,  all concentrations in moles per liter (Suarez, 1977)). The initial tracer concentration in the soil was assumed to be zero. The tracer concentration in the irrigation water was maintained at unity. Figure 8.39(a) shows the water content profile at various times during the simulation. Due to the crop root water uptake and the free drainage at the lower boundary, the lower part of the soil profile was initially drained before the irrigation water reached these depths. At the upper part of the soil profile, the water content increased due to the irrigation water in excess of crop root consumption. A steady state was reached after about 150 days of irrigation. The water content distributions from this model are extremely close to those from UNSATCHEM-2D (imnek and Suarez, 1994) shown in figure 8.39(b). Figure 8.40(a) shows the tracer concentration profiles. Initially the soil profile was free of tracer. The tracer concentration increased gradually as the irrigation water moved through the soil profile due to crop water consumption, reaching the steady state concentration of 10 at the bottom of the root zone, as expected for a leaching fraction of 0.1. A larger leaching fraction would have resulted in a smaller steady state tracer concentration, and the opposite is also true. Again the tracer concentration profiles are almost identical to those obtained by UNSATCHEM 2D (figure 8.40(b)).  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  162  1.0  0.8 0.6 to 0  0.4 0.2  0.0 0  0.1  0.2  0.3  0.4  0.5  WaterContent 3 rrr [m ]  Water Content 3 /m (m ) (a)  (b)  Figure 8.39: Soil water content profiles at various times after irrigation with saline drainage water: (a) from this model; and (b) from Simünek and Suarez (1994).  1.0 0.8 0.6 to 0  0.4 0.2 0.0 0  2  4  6  8  10  12  Tracer Concentration  Concentration (mol/L) (a)  (b)  Figure 8.40: Tracer concentration profiles at various times after application with the irrigation water: (a) from this model; and (b) from Simrinek and Suarez (1994).  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  163  1.0  0.8  jO.6  xa)  04  0.2  0.0 0  0.02  0.04  0.06  0.08  0.1  Concentration (rnol/L)  Figure 8.41: Total dissolved magnesium concentration profiles at various times after irrigation. t and SO, re 2 Figures 8.41 and 8.42 show the dissolved concentration profiles of Mg spectively. These concentration profiles are very similar to that of the tracer, with only differ Mg had a steady state concentration of approximately 0.092 + ent steady state concentrations. 2 molIL at the bottom of the soil profile, while SO had a steady state concentration of about 0.14 molIL, both of which were less than 10 times of the concentration of the corresponding species in the irrigation water. The reason for this is the formation of magnesite 3 MgCO ( J) (figure 8.43) and gypsum 2 •2H 4 CaSO 0 (4.) (figure 8.44). The precipitation of these minerals + and SO concentrations in the soil solution. 2 reduced the steady state Mg Figures 8.45 and 8.46 show the concentration profiles of total dissolved and total precipi t 2 tated calcium, respectively. Figure 8.47 shows the calcite concentration profile. While Mg Ca remained little changed and even decreased t and SO concentrations increased with depth, 2 t concentration increased with time except 2 at the bottom of the soil profile. The precipitated Ca t completely dissolved. 2 in a small section near the surface where the initially precipitated Ca There are several factors that may influence the precipitation/dissolution dynamic equilibrium  Chapter 8. SIMULATIONS OP IRRIGATION AND LEACHING  164  1.0  0.8  0.6 a)  0.4  0.2  0.0 0  0.03  0.06  0.09  0.12  0.15  Concentration (molfL) Figure 8.42: Total dissolved sulphate concentration profiles at various times after irrigation.  1.0  20 days 30 day 40 days 50 days lOOday  0.8  I  0.6  0.4  0.2  0.0  0  0.0004  0.0008  0.0012  0.0016  0.002  Concentration (mol/Kg soil) Figure 8.43: Magnesite concentration profiles at various times after irrigation.  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  LU  165  T  0.8  F 0.6  ii;”  ‘—V  C)  /  /  10 20 30 40 SO 100  0.4  0.2  0.0 0  days day days days day days  I  I  I  0.004  0.008  0.012  0.016  Concentration (mol/Kg soil) Figure 8.44: Gypsum concentration profiles at various times after irrigation. in the soil profile: • Increasing concentrations of various chemical species with time due to evapotranspiration and with depth due to leaching which increased the tendency of precipitation; • Increasing ionic strength with time and depth due to increasing solute concentrations which reduced the activity coefficients of various species and enhanced the solubility of miner als; • Increasing partial pressure of C0 (g) with depth which increased the solubility of calcite; 2 • Supersaturation of calcite of the irrigation water which caused the immediate precipita tion and accumulation of calcite at and near the surface. This in turn reduced the flux of + into the soil profile in comparison with other species. 2 Ca Depending on the relative strength of each factor, the soil profile can be divided into the following sections:  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  166  1. The soil surface (1.0 m). The calcite supersaturated irrigation water was brought to equi librium immediately after entering the soil surface, which caused the accumulation of cal + into the soil by about 50%. 2 cite at the surface and reduced the flux of Ca 2. Section 0.95  —  1.0 m. The soil solution was initially saturated with calcite. Increase in  + concentration in the solution due to the strong water demand by the crop root near 2 Ca the surface overcame reduction in activity coefficients due to increasing ionic strength, thus caused the precipitation of calcite. As a result, the increase in  + 2 Ca  due to crop con  sumption was precipitated instead of being leached downwards. This effectively reduced the supply of Ca 2 in the lower soil profile. 3. Section 0.85  —  + concentration was lower 2 0.95 m. In this section, the increase of Ca  than in the layer above due to decreasing crop water uptake. The pH value of the soil solution decreased due to increasing SO and Cl— concentrations in comparison with + concentration. This reduction in pH value together with the increas 2 nearly steady Ca ing partial pressure of C0 (g) caused the CO concentration to decrease. In addition, 2 the activity coefficients for various ions were also lower due to increasing ionic strength. Because of all these factors, the soil solution became undersaturated with respect to cal cite. As a result, the originally precipitated calcite started gradually to dissolve. After about 100 days, this section was completely free of calcite. 4. Section 0.6  —  0.85 m. In this section, SO concentration increased to such a level that the  soil solution became saturated with gypsum. The increase of SO was due to two factors, condensation of soil solution due to root water uptake and leaching of SO from the soil Ca due to root water + above. The precipitation of gypsum consumed the increase of 2 uptake and leaching from the previous section, and also caused the gradual dissolution + concentration in the soil solution started to 2 of originally precipitated calcite. The Ca decrease with depth.  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  167  I.0 10 day 20 days 30 days 40 day 50day lOOdays  0.8  0.2  0.0 0  0.01  0.02  0.03  Concentration (molJL) Figure 8.45: Total dissolved calcium concentration profiles at various times after irrigation. 5. Section 0  —  + concentration had reached such a level that the soil solution 2 0.6 m. The Mg  was saturated with magnesite and precipitation of magnesite took place. Precipitation of Ca concentration in the solution and + gypsum continued, causing further reduction in 2 dissolution of calcite. After less than 100 days of irrigation, this section of the profile + and increasing ionic 2 was completely free of calcite. Due to decreasing supply of Ca strength, the precipitated concentration of gypsum decreased with depth below 0.8 m. The precipitated concentration of magnesite also decreased gradually with depth due to increasing ionic strength and C0 (g) partial pressure, but with a slower rate than gypsum 2 + concentration along the profile. 2 because there was actually an increase in Mg + and calcite concentration profiles from this simula 2 It should be pointed out that the Ca tion are quite different from the ones shown in imünek and Suarez (1994). The reason for this discrepancy is not very clear because the concentration profiles for gypsum are not given in imnek and Suarez (1994). It seems that no precipitation of gypsum took place until after 20 days of simulation and in the region 0.6 m below the surface in the simulation of imiinek and  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  168  1.0  0.8  O day 10 days 20 days 30 days 40 days 50 days 100 days  0.2  0.0 le-05  le-04  le-03  Ie-02  le-Ol  le+00  Concentration (moIJKg soil) Figure 8.46: Total precipitated concentration profiles of calcium at various times after irrigation.  1.0 .._:  0.8  0.6  ZZEEE.  “gb  Oday 10 days 20 days 30 days 40 days 50 days  0 z 0.4  0.2  0.0— 0.0001  3/  0.001  0.01  0.1  1  Concentration (mol/Kg soil) Figure 8.47: Calcite concentration profiles at various times after irrigation.  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  169  Suarez, while in this simulation gypsum started to precipitate about 10 days after irrigation and + increased three times before 2 in the region 0.15 m below the surface. The total dissolved Ca gypsum started to precipitate in the simulation of imfinek and Suarez. No information was Ca+ concen given on the SO concentration profiles. In this simulation, the total dissolved 2 tration increased to 1.23 times of the initial concentration and SO increased to 1.36 times of the original value before precipitation of gypsum took place. Because the initial soil solution was close to saturation with respect to gypsum (the gypsum saturation degree ranged from 0.68 + and SO concentrations would 2 at the surface to 0.82 at the bottom), slight increases in the Ca cause the precipitation of gypsum. Prom the above information, it is concluded that the results given by this model were more reasonable than those given by imnek and Suarez.  8.2  Salinization and Leaching of a Soil under Irrigation  In this section, we are going to use the developed model to investigate the salinization process of an agricultural soil under irrigation if the amount of water applied is equal to the amount consumed by crop roots, and the subsequent leaching process of a saline soil if the amount of water applied is larger than the amount consumed by crops. Ion exchange is included in the simulations. The soil profile is assumed to be one meter deep. The crop root zone is 0.5 m deep from the surface. Crop root water uptake was distributed linearly throughout the crop root zone with a maximum rate at the soil surface and zero uptake at and below the bottom of the root zone. The total water uptake was taken as 0.009 mlday. The chemical species and their corresponding reaction constants in the soil solution are listed in table 8.19. The stoichiometric coefficients with respect to component species are listed in ta ble 8.20. There are 9 component species, 26 complexed species, 4 sorbed species, 8 precipitated species, and I gaseous species. As in the previous simulation, a nonreactive tracer component  ChapterS. SIMULATIONS OF IRRIGATION AND LEA CHTNG  170  species was used to provide a measurement of the degree of salinization and leaching in the soil profile during various stages of irrigation. The species that occupy exchange sites on the surface Mg + , and 2 Ca + . The selectivity coefficients of ion exchange pairs of soil solids are Na+, K+, 2 +_Na+, and Ca 2 +_Na+ were taken as 1.1, 2.1, and 3.0, respectively. The total 2 of K+_Na+, Mg ion exchange capacity for the soil was taken as 0.2 equivalents per kilogram of soil solids. The longitudinal diffusivity was assumed to be 0.2 m. Other soil properties are the same as in the previous section. Table 8.19: Salinization and Leaching: Chemical Reactions and Equilibrium Constants  Reaction  Species  K 10 og  Component Species 1 2  H=Fft CO  =  CO  0 0  3  Na=Na  0  4  K=K  0  5  2 Mg  =  2 Mg  0  6  + 2 Ca  =  + 2 Ca  0  7  Sor=So-  0  8  Cl=Ch  0  9  Tracer  =  Tracer  0  Dissociation of Water 10  O—H=OFr 2 H  —13.99  Complexation 11  H +CO =HCO  10.33  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  171  Table 8.19: (continued)  Reaction  Species  12  2H  13  CO  +  =  C0 2 H 3  Na +Ch =NaCl  K 10 log 16.68 0.00  14  Na  +  C0 =NaC0  1.27  15  2Na  +  COr  =  CO 2 Na 3  0.00  H  +  C0  =  3 NaHCO  10.08  16  Na  17  Na +1120  +  -  H =NaOH  —14.20  18  Na +S0 =NaSO  0.70  19  K+Cl =KC1  —0.70  20  2K  C0 3 C0 2 =K  +  —0.03  21  K +H 0 2  22  +  S0  =  KSO:  0.85  +  2C1  =  2 MgC1  —0.03  23 24  2 Mg 2 Mg  25 26 27  +  CO  =  MgHC0  11.4  2 Mg  +  CO  =  3 MgCO  2.98  H  =  MgOIf  —11.79  2H  =  2 Mg(OH)  —27.99  S0  =  4 MgSO  2.25  Ch  =  CaCft  —1.00  =  2 CaC1  0.00  +  28  0 2 2H 2 Mg  29  2 Ca  +  +  +  2C1  +H+C0=CaHC0 2 Ca  32 33  —  —  2 Ca  30 31  —14.50  H  +  2 +H Mg 0 2 2 Mg  =1(011  —  2 Ca 2 Ca  +  +  0 2 H  11.33  C0  =  3 CaCO  3.15  H  =  Ca0H  —12.60  —  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  172  Table 8.19: (continued)  Reaction 34  Ca  0 2 2H  +  35  2 Ca  Species  K 10 log  2H  =  2 Ca(OH)  —27.99  SO  =  4 CaSO  —  +  2.31  Ion Exchange 36  Na=Na  37  K+Na=Kt+Na  38  2 Mg  +  2Na  =  2 Mg  39  2 Ca  +  2Na  =  2 Ca  2Na  + +  2Na  1(37=1.1 38 K  =  2.1  39 K  =  3.0  Precipitation 40 41  2Na  +  42  2Na  43  Mg  Na+Ch  =  NaC1(fl  0 2 10H  =  S 2 Na . 4 0 10H (fl O  0 2 H  =  C 2 Na • 3 0 (4) H O  —0.125  0 2H 2 2H  =  Mg(OH) ( 2 fl  —16.79  =  (4) 3 MgCO  SO  +  CO  + +  + -  -1.582 1.11  44  2 Mg  45  +SO =MgSO 2 Mg (4) 4  46  2 Ca  CO  =  (fl 3 CaCO  8.47  47  +SO+2H Ca O 2  =  2 2 4 CaSO 0 (4) H  4.85  +  +  CO  8.03 —8.18  Dissolution of CO 2 48  2H+CO —H 0 2  =  (g) 2 C0  23.14  2 0  Na K 2 Mg 2 Ca SO C1 Tracer OHHCO 3 C 2 H O NaCI NaCO 3 C 2 Na O  3  4  5  6  7  8  9  10  11  12  13  14  15  0  0  1  —1  0  0  0  0  0  0  0  0  CO  2  1  H  H  Species  1  Reaction  1  1  0  1  1  0  0  0  0  0  0  0  0  1  0  CO  2  1  1  0  0  0  0  0  0  0  0  0  1  0  0  Na  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  K  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  2 Mg  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  2 Ca  Components  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  SO  Table 8.20: Simple Irrigation Problem: Stoichiometric Coefficients  0  0  1  0  0  0  0  1  0  0  0  0  0  0  0  Cl—  0  0  0  0  0  0  0  0  0  0  0  0  0  0  Tracer  —I  Species 3 Na}1C0 NaOH NaSO: KC1 3 C 2 K 0 KOH KSO 2 MgC1 MgHCO 3 MgCO MgOH 2 Mg(OH) 4 MgSO CaC1 CaC1,  Reaction  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  0  0  0  0  0  0  0  0  —1 —2  1  0  1  0  0 1  0  0  1  0  0  0  —1  0  0  0  0  1  1 —l  CO  H  0  0  0  0  0  0  0  0  0  0  0  0  1  1  1  t Na  0  0  0  0  0  0  0  0  1  1  2  1  0  0  0  K  0  0  1  1  1  1  1  1  0  0  0  0  0  0  0  2 Mg  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  2 Ca  Components  Table 8.20: (continued)  0  0  1  0  0  0  0  0  1  0  0  0  1  0  0  SO  2  1  0  0  0  0  0  2  0  0  0  1  0  0  0  Ch  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  Tracer  —a  i  0 0 0 0 0  3 CaCO CaOH Ca(OH) CaSO Nat K t 2 Mg t 2 Ca NaC1(fl S 2 Na . 4 0 10H (fl O C 2 Na • 3 0 H (4) O Mg(OH) ( 2 4) MgCO ( 3 ) MgSO ( 4 4)  32  33  34  35  36  37  38  39  40  41  42  43  44  45  0  0  -2  0  0  0  —2  —1  0  1  Ca}{COt  31  Ht  Species  Reaction  0  1  0  1  0  0  0  0  0  0  0  0  0  1  1  CO  0  0  0  2  2  1  0  0  0  1  0  0  0  0  0  t Na  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  Kt  1  1  1  0  0  0  0  1  0  0  0  0  0  0  0  2t Mg  0  0  0  0  0  0  1  0  0  0  1  1  1  1  1  t 2 Ca  Components  Table 8.20: (continued)  1  0  0  0  1  0  0  0  0  0  1  0  0  0  0  SO C1  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  Tracer  z  C  CaCO ( 3 4) 2 2 4 CaSO 0 (4) H C0 ( 2 g)  47  48  Species  46  Reaction  2  0  0  Flt  1  0  1  CO  0  0  0  Na  0  0  0  K  0  0  0  t 2 Mg  0  1  1  t 2 Ca  Components  Table 8.20: (continued)  0  1  0  SO  0  0  0  Ch  0  0  0  Tracer  ON  —a  1  C  I  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  177  Thermal conductivity of the soil is calculated from the following equation (Hillel, 1980):  A  —  k + kafaAa A f fA + 8 vi s s a a  where  = specific thermal conductivity of water (W/m•K); = specific thermal conductivity of solids (W/m•K); Aa = specific thermal conductivity of air (W/m. K); = volume fraction of water; = volume fraction of solids; = volume fraction of air; = ratio of the temperature gradient in the solid to the water phase; and 1c = ratio of the temperature gradient in the air and water phases. If it is assumed that the air, water and solids in the soil are in thermal equilibrium, the above equation can be simplified as:  A  =  fA + fsAs + faAa  noticing that  f+f 3  (8.249)  + fa = 1. The soil solids can be further broken into fractions of minerals  and organic matter, and the equation becomes:  A = fA + 0 f + fmAm + faXa A where  Am = average specific thermal conductivity of soil minerals (W/m•K); A,, = specific thermal conductivity of soil organic matter (W/m•K);  fm = volume fraction of minerals; and f° = volume fraction of organic matter.  (8.250)  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  8.2.1  178  Simulation of a Salinization Process  At the beginning of the simulation, the soil profile had a uniform pressure potential of —5.0 m. At the bottom of the soil profile, a free drainage (unit hydraulic gradient) boundary condition was assumed. The irrigation rate at the top of the profile was 0.009 ni/day, which was equal to the crop water uptake rate. Therefore no leaching would take place below the root zone. However, there would be some degree of leaching within the root zone because of the linearly distributed pattern of root water uptake. The soil temperature initially was at 25 °C throughout the soil profile. At the surface, the temperature was specified as a sine function of time: T(L)  =  25 + 1.5 sin  =  1.0 m  (8.251)  where I is the time in hours. The annual average of the surface temperature is 25 °C, with a maximum temperature of 40 °C and a minimum of 10 °C. The irrigation season was assumed to start at the spring time when the soil was at its average temperature and started to warm up. The initial chemical composition of the soil solution was: CaT NaT  =  0.00618, KT  =  0.00206, SO T 4  =  0.004, CIT  =  0.03646 mol/Kg of soil (36.5%), and Ca 2  =  =  =  0.00126,  0.005, and tracer= 0, all concentrations  in moles per liter. The composition of the exchange sites was: Na+ (about 9.0% of total ion exchange capacity), K  0.00127, MgT  =  0.01803 mol/Kg of soil  0.00662 mol/Kg of soil (3.3%), Mg 2  =  0.05122 mol/Kg of soil (51.2%). The soil was  free of all minerals at the beginning of the irrigation. The boundary condition for the transport equations at the surface was the Cauchy type, and a Neumann type at the bottom of the profile. The chemical composition of the irrigation water was assumed to be the same as in the previous simulation and was supersaturated with calcite. Figure 8.48 shows the water content profiles at different times during the irrigation. The soil profile can be divided into three sections according to changes in water content. The top section (between 0.775 m and 1.0 m) saw a water content increase over the initial water. Water content in the middle section (between 0.45 in and 0.775 m) first decreased and then increased  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  179  1.0  0.8  E 0.6  04  0.2  0.0 0  0.1  0.2  0.3  0.4  0.5  Im) 3 Water Content (m  Figure 8.48: Water content profiles during the process of salinization. when the irrigation water arrived, but was still lower than its initial value. Water content in the bottom section (between 0 and 0.45 m) decreased consistently because of the free drainage at the bottom and not enough water from the region above. After about 100 days of irrigation, water flow in the profile reached a steady state. Figure 8.49 shows the tracer concentration profiles at different times during the irrigation. Initially the soil profile was free of tracer. Tracer concentration of the irrigation water was main tained at unity. Due to the crop root water uptake, the tracer concentration in the soil increased dramatically. After 100 days of irrigation, the tracer concentration at the surface reached over 4, while the peak tracer concentration was about 19 times of the concentration in the irrigation water. Because there was little water flowing down to the bottom half of the profile and there was no water uptake from that region, the tracer concentration remained very low below the crop root zone. Figures 8.50 and 8.51 show the total dissolved concentration and the sorbed concentration profiles of Na+, respectively. Both the dissolved concentration and the sorbed concentration of  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  180  1.0  0.8  10.6 °  04  0.2  0.0 0  4  8  12  16  20  Concentration (molJL) Figure 8.49: Tracer concentration profiles during the process of salinization. Na increased during the irrigation. After 100 days of irrigation, the peak dissolved concentra tion of Na+ was about 29 times of the original Na+ concentration in the soil solution, and about 4.8 times of the Na+ concentration in the irrigation water. The maximum sorbed concentration of Na+ on the exchange sites was about 3.4 times of the original value. The increase of Na+ on the exchange sites was due to two factors, the increase in chemical concentrations in the soil solution due to the root water uptake, and the fact that Na+ concentration in the irrigation was the highest. Condensing of the equilibrium soil solution will increase the concentration of the less charged cation on the exchange sites, while diluting of the solution will increase the con centration of the more highly charged cation. Because most of the Na+ increase due to water uptake went to the exchange sites, the Na+ concentration in the soil solution increased only 4.8 times from the concentration in the irrigation, compared with the increase of 19 times for the tracer species. Figures 8.52 and 8.53 show the total dissolved and the sorbed concentration profiles of K+, respectively. The K+ concentration in the soil solution increased while the sorbed concentration  Chapter 8.  181  SIMULATIONS OF IRRIGATION AND LEACHING  1.0-  I  0.8  I0.6 -.  OA  Oday 10 day 30 days 60 days lOOday  -  -  0.2  0.0  -  0  0.04  0.08  0.12  0.16  0.2  Concentration (mol/L) Figure 8.50: Total dissolved sodium concentration profiles during the process of salinization.  1.0  p  I  /  0.8• 1--  0.6 [  0.4  Oday day days days day  10 30 60 100  0.2  0.0 0  0.01  0.02  0.03  0.04  0.05  0.06  Concentration (mol/Kg soil) Figure 8.51: Sorbed sodium concentration profiles during the process of salinization.  Chapter 8.  182  SIMULATIONS OP IRRIGATION AND LEACHING  1.0  I  p  I  0.8 /  0.6  0.4  -.  Oday 10 day 30 days 6odays 100 day  0.2  0.0  —  0  0.005  0.010  0.015  0.020  0.025  Concentration (mol/L) Figure 8.52: Total dissolved potassium concentration profiles during the process of salinization. of K+ decreased in the top part of the root zone and increased a little in the bottom part of the root zone. There were two opposite factors influencing the sorbed concentration of K+ on the exchange sites. The condensing of the soil solution due to the root water uptake would favor the + and Ca 2 +, while the less concentrated K+ in the irrigation 2 monovalent K+ over divalent Mg water in comparison with other competing species would reduce the concentration of K+ on the exchange sites. In the region above 0.7 m, the second factor was more dominant and the K+ concentration on the exchange sites decreased. In the region between 0.5 and 0.7 m, the first factor was stronger and the sorbed concentration of K+ increased. In the soil solution, the maximum dissolved K+ concentration in the soil profile increased by a factor of 11 over the initial concentration, and by a factor of 84 over the K+ concentration in the irrigation water. The large increase of K+ over its concentration in the irrigation water was due to the fact that some of the originally sorbed K+ was released from the exchanges sites within much of the root zone.  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  1.0 —r  I  P  P  183  I  4  0.8  10.6 0.4  Oday 10 day 30 days 60 days 100 days--——--  0.2  0.0 0  I  I  0.01  0.02  0.03  I  I  0.04  0.05  0.06  Concentration (rnol/Kg soil) Figure 8.53: Sorbed potassium concentration profiles during the process of salinization. + are shown in figures 8.54 and 2 The total dissolved and sorbed concentration profiles of Mg 8.55, respectively. In the soil solution, the dissolved concentration of magnesium increased a + 2 maximum of 99 times of the original concentration, and a maximum of 13 times of the Mg + concentration also in 2 concentration in the irrigation water. On the exchange sites, the Mg creased. This was a result of two opposite factors, condensing of the soil solution which would + on the exchange sites, and the larger increase of Mg 2 + 2 reduce the sorbed concentration of Mg + which would increase the 2 2 Mg concentration on the exchange sites at + in comparison of Ca +. The second factor overcame the first and as a result, the sorbed concentra 2 the expense of Ca tion of magnesium on the exchange sites increased by a factor of 1.17 at its maximum, which + concentration in the soil solution over the Mg 2 + concentration 2 reduced the increase of the Mg in the irrigation water from a possible 19 times (the increase of the tracer concentration) to 13 times. + 2 Figures 8.56 and 8.57 show the total dissolved and sorbed concentration profiles of Ca during the salinization process, respectively. As we mentioned in the discussions above, the  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  1.0  I  184  I  0.8  0.4  Oday 10 day 30 days 60 days lOOday  _-  0.2  I  I  I  0.06  0.09  0.12  0.0 0  0.03  0.15  Concentration (molfL)  Figure 8.54: Total dissolved magnesium concentration profiles during the process of saliniza tion.  1.0  0.8  “gb 0.4  -  0.2  -  Oday 10 days-------30 days 60 days lOOday  0.0 0  0.01  0.02  0.03  0.04  0.05  0.06  Concentration (mol/Kg soil) Figure 8.55: Sorbed magnesium concentration profiles during the process of salinization.  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  185  1.0  0.8  0.2  0.0 0.00  0.02  0.04  0.06  0.08  0.10  0.12  Concentration (mol/L) Figure 8.56: Total dissolved calcium concentration profiles during the process of salinization. + on the exchange sites decreased due to the increasing concentra 2 sorbed concentration of Ca tions of various competing cations in the soil solution. After 100 days of irrigation, the sorbed + was reduced by more than half in large part of the root zone. In the soil 2 concentration of Ca + concentration increased, especially at the bottom of the root zone, where af 2 solution, the Ca + concentration was about 78 times of the original concentra 2 ter 100 days of irrigation, the Ca tion in the solution, and about 8 times of the concentration in the irrigation water. The relatively small increase over the concentration in the irrigation water was due to the precipitation of gyp sum, which will be discussed later in this section. Figure 8.58 shows the total dissolved concentration profiles of SO in the soil solution at different times during the irrigation. Although there was an increase in SO concentration in the crop root zone due to water uptake, the SO concentration generally decreased with depth, in contrast with the dissolved concentrations of other species. This is a result of precipitation of gypsum, which is shown in figure 8.59. The increase of SO due to root water uptake was  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  1.0  I  0.8  0.4  -  0.2 0.0  186  0  N  Oday 10 days 30 days 60 days 100 days 0.01  0.02  0.03  0.04  0.05  0.06  Concentration (mol/Kg soil) Figure 8.57: Sorbed calcium concentration profiles during the process of salinization. taken away from the soil solution by the precipitation of gypsum, which also reduced the con + in the soil solution. 2 centration of Ca The calcite concentration profiles during various stages of irrigation is shown in figure 8.60. Because the irrigation water was saturated with calcite, it was immediately brought to equilib rium after it entered the soil profile. Therefore, there was a large amount of calcite accumulated at the soil surface. The precipitation of calcite then decreased with depth due to the competing Ca by gypsum. The concentration of calcite increased again further down the + demand for 2 root zone due to the decreasing gypsum precipitation, which was a result of decreasing SO concentration. There was no calcite in the bottom half of the soil profile. The above results and discussions have shown that after a certain duration of irrigation with out applying additional water for leaching, salt concentrations in the crop root zone may become too high to sustain productivity. The excessive accumulation of sodium that might occur during the process of salinization may cause the destruction of soil structure and the soil may become less permeable.  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  187  1.0  0.8 0.6 0.4 0.2  0.0 0  0.006  0.012  0.018  0.024  0.03  Concentration (mollL) Figure 8.58: Total dissolved sulphate concentration profiles during the process of salinization.  1.0  _..I.  0.8  -  //  - -  P  -  P  .-  0.6 a 0.4  10 days  0.2  30 day 60days 100 days  0.0 0  0.01  0.02  0.03  0.04  0.05  Concentration (mol/Kg soil) Figure 8.59: Gypsum concentration profiles during the process of salinization.  Chapter 8. SIMULATIONS OP IRRIGATION AND LEACHING  188  1.0 ....  p  08  0.6 -z to  0.4  10 days 30 day 60days lOOdays  0.2  .1  .1  0.0001  0.001  0.0  le-05  0.01  0.1  1  Concentration (mol/Kg soil) Figure 8.60: Calcite concentration profiles during the process of salinization. 8.2.2  Simulation of a Leaching Process  We will continue the simulation of the problem in the previous section, using the restart option of the computer model, with a different irrigation rate and irrigation water of better quality in terms of salt concentration. The irrigation rate used in this simulation was 0.01125 mlday. Together with the evapotranspiration rate of 0.009 mlday, this provided a leaching factor of 0.2. The chemical composition of the irrigation water was: CaT KT  =  0.001, S° r 4  =  0.005, C1T  =  =  0.011.5, and tracer  0.003, MgT =  =  0.005, NaT  =  0.003,  0, all concentrations in moles per  liter. The irrigation water was calcite undersaturated, and had a pH value of 7.86. The condi tions at the end of last simulation (100 days) were used as the initial conditions for the current simulation. The boundary conditions were the same as in the last simulation. Figure 8.61 shows the water content profiles at different times during the process of leach ing. Because the irrigation rate was larger than the evapotranspiration rate, there was an in crease in the water content throughout the soil profile. After 100 days of irrigation, the water flow reached a steady state. The bottom part of the profile had a uniform water content with a  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  189  1.0  0.8  10.6 °  04  0.2  0.0 0  0.1  0.2  0.3  0.4  0.5  Water Content (m Inl) 3 Figure 8.61: Water content profiles during the process of leaching. unit hydraulic gradient. The free drainage rate at the bottom of the profile was equal to the rate of leaching water. The tracer concentration profiles at different times are shown in figure 8.62. Because the tracer concentration in the irrigation water was assumed to be zero, the tracer species in the soil profile was almost completely leached out after 240 days of leaching. +, and 2 Figures 8.63 to 8.66 show the total dissolved concentration profiles of Na+, K+, Mg +, respectively, at different times during the process of leaching. All of them followed a 2 Ca similar trend. The concentrations in the upper part of the profile decreased while the concen trations in the lower part of the profile increased due to leaching. After 200 days of irrigation, the concentration profiles reached a nearly steady state. Mg + , and Ca +, 2 Figures 8.67 to 8.70 show the sorbed concentration profiles of Nat Kt 2 respectively, at different times during the process of leaching. The sorbed Na+ concentration (figure 8.67) on the exchange sites decreased in the upper half of the soil profile because of + and 2 the dilution of the soil solution which favors the more highly charged cations such as Ca  Chapter 8. SIMULATIONS OP IRRIGATION AND LEACHING  190  1.0  0.8  0.6 -C to 4) x 0.4  0.2  0.0 0  4  8  12  16  20  Concentration (molJL) Figure 8.62: Tracer concentration profiles during the process of leaching.  1.0  0.8  p  0,6  -C  to 4)  0.4  0.2  0.0 0  0.04  0.08  0.12  0.16  0.2  Concentration (molfL) Figure 8.63: Total dissolved sodium concentration profiles during the process of leaching.  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  191  1.0  0.8  0.6  0.4  0.2  0.0 0  0.005  0,010  0.015  0.020  0.025  Concentration (molJL)  Figure 8.64: Total dissolved potassium concentration profiles during the process of leaching.  1.0  0.8  0.6 U  0.4  0.2  0.0 0  0.03  0.06  0.09  0.12  0.15  Concentration (molIL)  Figure 8.65: Total dissolved magnesium concentration profiles during the process of leaching.  ChapterS. SIMULATIONS OP IRRIGATION AND LEACHING  192  1.0  0.8  0.2  0.0 0.00  0.02  0.04  0.06  0.08  0.10  0.12  Concentration (mol/L) Figure 8.66: Total dissolved calcium concentration profiles during the process of leaching. h In the bottom half of the profile, the sorbed concentration of Na+ increased. The increase 2 Mg of Na+ concentration on the exchange sites in the bottom half of the profile was due to two factors: first, the condensation of the soil solution due to leaching which favors the less charged cations, and second, the relatively higher concentration of Na+ in the soil solution in comparison with other competing species. The sorbed concentration of K+ shown in figure 8.68 decreased by a very small amount throughout the soil profile due to the dilution of the soil solution in the root zone and due to the larger increase of Na+ concentration in the soil solution below the root zone in comparison with the increase of K+ concentration. The sorbed concentration of + shown in figure 8.69 experienced a moderate increase throughout the soil profile during 2 Mg the irrigation period, while the sorbed concentration of Ca 2 (figure 8.70) increased in the top half of the profile due to the dilution of the soil solution and decreased in the bottom half of the profile due to the condensation of the sojl solution.  The reason that caused an increase of the  + concentration and a decrease of the sorbed 2 2 Ca concentration in the lower part + sorbed Mg of the profile is that the precipitation of gypsum and calcite, which will be shown later, in that  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  193  0 day 50 day 100 days  i  -  /7  0.2  0.0 0  I  I  I  I  0.01  0.04  0.05  0.06  0.02  0.03  Concentration (molJKg soil) Figure 8.67: Sorbed sodium concentration profiles during the process of leaching.  1.0  0.8  0.6 0 x 0.4  0.2  0.0 0  0.002  0.004  0.006  0.008  Concentration (mol/Kg soil)  Figure 8.68: Sorbed potassium concentration profiles during the process of leaching.  ChapterS. SIMULATIONS OF IRRIGATION AND LEACHING  194  1.0  0.8  I  /  0.6  0.4  O day 50 days 100 days 200 days 240 days  0.2  ii  0.0 0  0.01  0.02  0.03  0.04  0.05  0.06  Concentration (molJKg soil) Figure 8.69: Sorbed magnesium concentration profiles during the process of leaching.  1.0  0.8  I  0.6  0.4  0.2  0.0 0  0.01  0.02  0.03  0.04  0.05  0.05  Concentration (mol/Kg soil)  Figure 8.70: Sorbed calcium concentration profiles during the process of leaching.  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  195  I.e  0.8  10.6 -c o x 04  0.2  0.0  0  0.006  0.012  0.018  0.024  0.03  Concentration (molIL) Figure 8.71: Total dissolved sulphate concentration profiles during the process of leaching. + concentration in the soil solution, causing further release of 2 part of the profile reduced the Ca + from the exchange sites. The spaces on the exchange sites left open by the released Ca 2 Ca + 2 Mg until new equilibrium was reached. + were taken up by Na+, K+, and 2 Figure 8.71 shows the total dissolved concentration profiles of SO at various times during the leaching process. The peak concentration was gradually moving down the soil profile. The SO concentration decreased in the upper part and increased in the lower part of the profile. A similar trend was observed in the gypsum concentration profiles, shown in figure 8.72. The originally precipitated gypsum was dissolved in the region close to the soil surface, while pre cipitation of gypsum took place in the region below the root zone where the SO concentration increased. The calcite concentration profiles during the leaching process is shown in figure 8.73. The originally precipitated calcite in the root zone was gradually dissolved because of the decreasing + concentration in this zone, while in the bottom half of the profile which was free of calcite 2 Ca at the beginning of the leaching process, a relatively small amount of calcite precipitated due  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  196  1.0  0.8  0.6 to ii)  -I-  0.4  0.2  0.0 0  0.01  0.02  0.03  0.04  0.05  0.06  0.07  Concentration (mol/Kg soil) Figure 8.72: Gypsum concentration profiles during the process of leaching.  1.0 0.8  0.6 -C to V  x 0.4  Oday 50 day lOOdays 200 days 240 day  0.2  0.0 le-06  .1  Ie-05  0.0001  0.001  001  0.1  Concentration (rnol/Kg soil) Figure 8.73: Calcite concentration profiles during the process of leaching.  Chapter 8. SIMULATIONS OF IRRIGATION AND LEACHING  197  to the increasing concentration of Ca t After 240 days of irrigation, calcite existed in three 2 sections of the profile: from 0 to 0.45 m, from 0.55 m to 0.7 m, and from 0.95 m to 1.0 m. There was actually an increase in calcite concentration at the soil surface due to the decreasing ionic strength at the surface which reduced the solubility of minerals.  Chapter 9  SUMMARY AND RECOMMENDATIONS  In previous chapters, complete mathematical, numerical and computer models have been pre sented and used to solve a number of different problems. In this chapter, a summary of the thesis work is made and recommendations for further research on this subject are given.  9.1  Summary  A mathematical model has been developed to simulate the simultaneous processes of water flow, heat transfer, solute transport, and chemical reactions in nonisothermal, saturated and/or un saturated soils. The mathematical model consists of a number of coupled partial differential equations describing water movement, heat flow and solute transport processes in the soil, and nonlinear algebraic equations describing the chemical reactions in the soil solution, on the sur face of soil solids, and between the solution and the surface. This set of mathematical equations, given appropriate initial and boundary conditions, can be solved to obtain distributions of water content, pressure potential, soil temperature, chemical concentrations and other information. The water flow equation includes both liquid water and vapor water movements. It takes into account fluxes induced by solute concentration and temperature gradients, as well as by hy draulic gradient. In computing water flux caused by solute concentration gradient, an osmotic efficiency factor or reflection coefficient is used to take into account the fact that the solute is not completely restricted by the soil matrix. Vapor diffusion due to vapor density gradient is considered as the main mechanism for vapor flow. The water flow equation is written in terms  198  Chapter 9. SUMMARY AND RECOMMENDATIONS  199  of pressure potential to provide continuity in solving problems under mixed saturated and un saturated conditions. The heat transfer equation considers heat conduction through moist soil and latent heat trans fer due to vaporization at one location and condensation at another. Sensible heat transfer due to convection and moisture movement is not included because it is usually small and negligi ble in comparison with latent heat transfer. A phase conversion factor is used to describe the relative significance of vapor transfer in the total water flow. The introduction of the phase con version factor greatly reduced the complexity in formulating the partial differential equations describing processes of heat transfer and solute transport. The solute transport equations are written in terms of total analytical concentrations of com ponent species. This formulation has the advantage of being able to include precipitation and dissolution into the chemical reaction model. This set of partial differential equations, if solved sequentially and iteratively between the partial differential equations and the algebraic equa tions describing chemical reactions, requires less computer resources than other formulations. Chemical reactions that can be modeled are complexation, acid-base reaction, ion exchange, precipitation and dissolution. Thermodynamic equilibrium is assumed in the chemical system. The Galerkin finite element method is used to discretize the partial differential equations in space, and the finite difference method is used to approximate the time derivatives. By selecting the value of a relaxation factor, forward difference, backward difference, or central difference (Crank-Nicholson) method can be used. A computer model has been developed based on the numerical formulation to solve one-, two-, and three-dimensional problems using up to 15 types of horizontal or vertical elements. The computer model is written in C language. The code is in modular form so that a module can be modified or replaced by another without affecting the rest of the program. A separate automatic mesh generator is developed to help prepare mesh data for the finite  Chapter 9. SUMMARY AND RECOMMENDATIONS  200  element program. The mesh generator can produce up to nine types of one-, two-, and threedimensional elements for use in the main model. It can produce uniform, increasingly larger, or increasingly smaller elements in each of the coordinate directions. It will provide necessary information to the main program such as node numbers in an element, node connectivity, node coordinates, element types, etc. The output from the mesh generator can be directly used as an input file for the finite element program. The input data for the finite element program are grouped into different categories according to the nature of the data. There are five input files needed for each simulation problem: mesh data, chemical data, material properties, boundary and initial conditions, and control data. The input is controlled by keywords, therefore the input files are easier to prepare and modify. Input data in most cases do not need to appear in a specific order and a particular format, and therefore are more flexible and less prone to mistakes. Three numerical methods are available to solve the systems of equations resulting from the finite element and finite difference formulations: the banded matrix method, the sparse matrix method, and the iterative method. The banded matrix method is efficient and preferred for onedimensional and small two-dimensional problems. The iterative method is more efficient and faster for moderately sized or large two- or three-dimensional problems. The sparse matrix method is theoretically more efficient than the banded matrix method for large problems, but its complexity and overhead in implementation may often offset its advantages. Two iterative methods have been implemented in this model: the conjugate gradient method for symmetric problems, and the more general bi-conjugate gradient squared method for general nonsynimet nc problems. The systems of equations resulting from the finite element and finite difference formulations of the water flow and heat transfer equations are examples of symmetric problems, and the system of equations for the advective-dispersive solute transport equation in porous me dia is an example of nonsymmetric problems. The system of nonlinear algebraic equations for the chemical equilibrium reactions is solved  Chapter 9. SUMMARY AND RECOMMENDATIONS  201  separately from the solute transport equations using the Newton-Raphson method. Some pre cautions have been taken to achieve convergence of the Newton-Raphson method, especially during initialization stages where a good initial guess is often not available and the direct Newton Raphson method is very likely to fail. The computer model is able to automatically determine the correct number of minerals that exist in the system at each time step. A mineral will precip itate or dissolve automatically if the soil solution is supersaturated or undersaturated with that mineral. If there is more than one mineral with which the soil solution is supersaturated or un dersaturated, the mineral with the highest or lowest saturation index will precipitate or dissolve first. The computer model provides three options to simulate transport of different solutes: a single component system, a closed system, and an open system. The single component system option can be used when there is only one nonreactive species in the soil solution. The closed system option can be used when the chemical system is considered as a closed system. The open system option needs to used when the soil solution is in constant contact with the atmosphere and the soil air phase. The program has a restart option. At the end of each simulation, the program saves necessary information to a restart file. When the program is run again, it will check to determine if this restart file exists. If it does exist, it will prompt to ask if it should restart from where it stopped in the previous simulation. This feature is useful when a long simulation needs to be carried out in different stages, when some boundary conditions need to be modified in the middle of a simulation, or when the modeler needs to check the intermediate results before proceeding to complete a long simulation. Verification of the computer model was done by running the individual components of the computer model with problems for which either an analytical solution exists or a solution is  Chapter 9. SUMMARY AND RECOMMENDATIONS  202  verifiable. The water flow component was run against the Tóth analytical solution of a twodimensional problem. The heat transfer component was used to solve a heat conduction prob lem in an infinite plane slab. The solute transport component was run against the Ogata ana lytical solution of an advective-dispersive process in a one-dimensional column under steady, uniform flow. The chemical reaction component was used to solve a number of equilibrium chemical systems, and the computed reaction constants were compared with the corresponding theoretical values. The results showed that the solutions obtained by the computer model are very accurate compared to the analytical solutions or the theoretical values. To demonstrate the applicability of the computer model in different situations, the com puter model was used to solve a number of one-, two-, and three-dimensional problems: a onedimensional vertical soil column under recharge at the top end and discharge at the bottom end, a two-dimensional subsurface drainage system with surface irrigation, and a three-dimensional soil container with water ponding at the surface center. A soil solution consisting of four com ponent species, eight complexed species, two sorbed species, one precipitated species, and one gaseous species was used in the simulations. The computer model is shown to yield reasonable results in chemical transport under transient and unsaturated flow conditions involving com plexation, ion exchange, and dynamic precipitation and dissolution. It correctly predicted the phenomena of ion exchange on soil exchange sites and the process of leaching. The computer model was capable of solving one-, two-, and three-dimensional problems with various types of boundary and initial conditions. The model was run to simulate a sample problem taken from literature of multicomponent reactive solute transport under transient and variably saturated conditions with crop water up take in the root zone. It was shown that the model produced almost identical results for the water content distributions and the tracer concentration profiles, although the calcium concentration profiles were different from the ones given in the literature. It was shown that the results given by this model were more reasonable than those given in the literature.  Chapter 9. SUMMARY AND RECOMMENDATIONS  203  The model was then used to simulate processes of salinization and leaching of soils under ir rigation with more realistic conditions. The soil solution included 48 species among which were 9 component species, 26 complexed species, 4 sorbed species, 8 possible precipitated species, and 1 gaseous species. Evapotranspiration was assumed linearly distributed along the root zone with a maximum rate at the soil surface and zero uptake at the bottom of the root zone. The com puter model was used to simulate salinization of the soil if the irrigation rate was set equal to the evapotranspiration rate so that there was no leaching. The simulation continued, using the restart option of the model, with increased rate and improved quality of irrigation water so that salt leaching took place. During both stages of the simulation, the computer model was shown to provide reasonable results as to how the dissolved concentrations changed in the soil solution during the salinization and leaching processes, how the composition on the exchange sites ad justed to new equilibrium, and how minerals dynamically precipitated and dissolved depending on degree of saturation of the soil solution with respect to each mineral. It may be worth mentioning that all the simulations presented have been carried out on a 486DX2-66 PC running LINUX, a UNIX operation system for IBM PC compatibles. Without the implementation of efficient solution methods, such as the iterative methods, the simulations of two- and three-dimensional problems would have taken too long to be practical on a personal computer. Even on a high-end workstation or supercomputer, the time needed for these simula tions can be greatly reduced by using a solution method more efficient than the banded matrix method.  Chapter 9. SUMMARY AND RECOMMENDATIONS  9.2  204  Recommendations  The water-solute-soil-plant-atmosphere system is very complicated. The present research is only a small step in mankind’s continuous efforts to obtain better understanding and better man agement of this complicated system. The developed computer model can be used to solve prac tical problems under many different situations, but there are still some limitations in the present computer model, such as the limited capability of the chemical equilibrium model. To further improve the computer model, the following recommendations are made: 1. The present chemical model can only deal with ion exchange with pH-independent cation exchange capacity. The major limitations of the ion exchange model are that the exchange sites need to be completely occupied by some cations all the time, and that sorption of anions cannot be modeled. Another major model of ion sorption presently used is the surface complexation model. The surface complexation model includes surface ioniza tion and complexation at the solid-water interface and provides a more realistic treatment of sorbing substrates whose surface charge is pH-dependent. The surface complexation model allows for the simultaneous sorption of cations and anions. Addition of the surface complexation model will make the computer model more versatile in modeling sorption phenomena in soils. 2. The present chemical model assumes that all chemical reactions are fast enough so that the local equilibrium assumption is valid. However some reactions such as precipitation and dissolution of certain minerals, e.g. dolomite, are rather slow compared with water flow. It is desirable that the chemical model can handle kinetic reactions, most impor tantly, kinetic precipitation and dissolution of minerals. 3. Although it is possible for the current model to deal with redox reactions by consider ing electrons as an ordinary aqueous component species and using a transport equation  Chapter 9. SUMMARY AND RECOMMENDATIONS  205  for electron (Yeh and Trapathi, 1989), this approach may not be generally applicable un der natural soil-water systems because the redox potential is determined from the redox species within the systems (Liu and Narasimhan, l989a). The existence of living plants and microorganisms in near surface soils further complicated the redox processes. In ad dition, a transport equation for oxygen is needed to model diffusion processes of oxygen in the soil air phase and in soil water. Considerable work (in both modeling and field data collection) must be done in order to successfully model dynamic chemical systems involving redox reactions such as nitrification-denitrification processes, utilization and leaching of fertilizers, and transport of heavy metals and radioactive species in near sur face soils. 4. Transport equations of carbon dioxide and oxygen should be included in the mathemati cal and computer models. The consumption and production of carbon dioxide and oxy gen by crop roots and soil microbes may significantly influence soil chemical systems. Anaerobic conditions that often exist under waterlogged soils may slow the rate of root metabolism and ion uptake, weaken root resistance to soil pathogens, and increase the concentration of undesirable and sometimes toxic reduced ions in the soil solution. 5. Field verification of the computer model should be undertaken. An important use of wa ter flow and transport models is for predictive purposes. The computer model has to be calibrated and verified for specific field conditions with observed data from controlled field experiments before more confidence can be gained in the simulations results.  Bibliography  [1] Abriola, L.M. 1987. Modeling contaminant transport in the subsurface: An interdisci plinary challenge. Rev. Geophys. 25(2): 125—134. [2] Allen, M.B. and C.L. Murphy. 1986. A finite-element collocation method for variably sat urated flow in two space dimensions. Water Resour Res. 22(11): 1537—1542. [3] Bear, J. 1987. Transport modeling. In Groundwater Flow and Quality Modeling, ed. E. Custodio, A. Gurgui, and I.E Lobo Ferreira. Holland: D. Reidel Publishing Company. [4] Benjamin, J.G., M.R. Ghaffarzadeh, and R.M. Cruse. 1990. Coupled water and heat trans port in ridged soils. Soil Sci. Soc. Am. J. 54:963—969. [5] Bernstein, L. 1974. Crop growth and salinity. In Drainage for Agriculture, ed. Jan Van Schilfgaarde. Agronomy 17. Madison, Wis.: Amer. Soc. Agron. [6] Biggar, J.W. and D.R. Nielsen. 1967. Miscible displacement and leaching phenomena. In Irrigation ofAgricultural Lands, ed. R.M. Hagan, R.R. Haise, and T.W. Edminster. Madi son, Wis.: Am. Soc. of Agron. [7] Bohn, H.L., B.L. McNeal, and G.A. O’Connor. 1985. Soil Chemistry. New York: John Wiley & Sons, Inc. [8] Boulier, J.F., J. Touma, and M. Vauclin. 1984. Flux-concentration relation-based solution of constant-flux infiltration equation, 1, infiltration into nonuniform initial moisture pro files. Soil Sci. Soc. Am. J. 48(2):245—251. [9] Brenner, H. 1962. The diffusion model of longitudinal mixing in beds of finite length. Nu merical values. Chem. Eng. Sci. 17:229—243. [10] Bresler, E. 1973. Simultaneous transport of solutes and water under transient unsaturated flow conditions. Water Resour Res. 9:975—986. [11] Bresler, E. and R.J. Hanks. 1969. Numerical method for estimating simultaneous flow of water and salt in unsaturated soils. Soil ScL Soc. Am. Proc. 33:827—832. [12] Bresler, E;, W.D. Kemper, and K.J. Hands. 1969. Infiltration, redistribution, and subse quent evaporation of water from soil as affected by wetting rate and hysteresis. Soil Sci. Soc. Am. Proc. 33:832—840.  206  Bibliography  207  [13] Bryant, S.L., R.S. Schechter, and LW. Lake. 1986. Interactions of precipitation/dissolu tion waves and ion exchange in flow through permeable media. AJCJZE J. 32(5):75 1—764. [14] Campbell, G.S. 1985. Soil Physics with BASIC, Transport Models for Soil-plant Systems. New York: Elsevier. [15] Carnahan, C.L. 1986. Simulation of uranium transport with variable temperature and ox idation potential: the computer program THCC. Rep. 21639. Berkeley, CA: Lawrence Berkeley Lab. [16] Carnahan, C.L. 1987. Simulation of chemically reactive solute transport under conditions of changing temperature. In Coupled Processes Affecting the Performance of a Nuclear Waste Repository, ed. C.F. Tsang. New York: Academic Press. [17] Cederberg, G.A., R.L. Street, and J.O. Leckie. 1985. A groundwater mass transport and equilibrium chemistry model for multicomponent systems. Water Resour Res. 21(8): 1095—1 104. [18] Chapman, A.J. 1974. Heat Transfer New York: Macmillan Publishing Co., Inc. [19] Childs, S.W., and C. Malstaff. 1982. Heat and mass transfer in unsaturated porous media. Final Report, PNL-4036. Battelle Pacific Northwest Laboratories. [20] Cleary, R.W. and D.D. Adrian. 1973. Analytical solution of the convective dispersive equation for cation adsorption in soils. Soil Sci. Soc. Am. Proc. 39:1015—1019. [211 Cooley, R.L. 1983. Some new procedures for numerical solution of variably saturated flow problems. Water Resour Res. 19(5): 1271—1285. [22] Dance, J.T. and E.J. Reardon. 1983. Migration of contaminants in groundwater in a land fill: A case study, 5. Cation migration in the dispersion test. I of Hydrology 63(1/2): 109— 130. [23] Davies, C.W. 1962. Ion Association. London: Butterworths. [24] Day, P.R. and W.M. Forsythe. 1958. Hydrodynamic dispersion of solutes in the soil mois ture stream. Soil ScL Soc. Am. Proc. 21:477—488. [25] DeMarsily, G. 1986. Quantitative Hydrogeology. New York: Academic Press. [26] De Doncer, T. and P. van Rysselberghe. 1936. The Thermodynamic Theory of Affinity. Stanford, Calif.: Stanford University Press. [27] De Vries, D.A. 1952. Het warmtegeleidingsvermogen van grond. Med. Landbouwhoge school, Wageningen, 52:1—73.  Bibliography  208  [28] De Vries, D.A. 1958. Simultaneous transfer of heat and moisture in porous media. Trans. Am. Geophys. Union 39:909—9 16. [29] Dudley, L.M., R.J. Wagenet, and J.J. Jurinak. 1981. Description of soil chemistry during transient solute transport. Water Resour Res. 17(5): 1498—1504. [30] Dupuit, J. 1863. Etudes théoriques etpratiques sur le mouvement des eaux dans les canaux découverts eta travers les terrains pennéables. Paris: Dunod. [31] Elprince, A.M., and K.L. Babcock. 1986. Prediction of ion-exchange equilibria in aque ous systems with more than two counter-ions. In Chemistry of Soil Solutions, ed. A. M. Elprince, 91—97. New York: Van Nosteand Reinhold Company. [32] Forchheimer, P. 1930. Hydraulik. Stuttgart: Teubner Verlagsgesellschaft. [33] Freeze, R.A. 1971. Three-dimensional, transient, saturated-unsaturated flow in a ground water basin. Water Resour Res. 7:347—366. [34] Freeze, R.A. and J.A. Cherry. 1979. Groundwater Englewood Cliffs, N.J.: Prentice-Hall. [35] Freeze, R.A. and P.A. Witherspoon. 1966. Theoretical analysis of regional groundwater flow; 1. analytical and numerical solutions to the mathematical model. Water Resour Res. 2:641—656. [36] Gardner, W.R. 1959. Solutions of the flow equations for the drying of soils and other porous media. Soil Sci. Soc. Am. Proc. 23:183—187. [37] Grove, D.B., and W.W. Wood. 1979. Prediction and field verification of subsurface-water quality changes during artificial recharge ,Lubbock, Texas. Groundwater 17(3):250—257. [38] Hageman, L.A. and D.M. Young. 1981. Applied Iterative Methods. New York: Academic Press. [39] Hillel, D. 1980. Fundamentals of Soil Physics. New York: Academic Press. [40] Hromadka, T.V., G.L. Guymon, and G.C. Pardoen. 1981. Nodal domain integration model of unsaturated two-dimensional soil-water flow: development. Water Resour Res. 17(5): 1425—1430. [41] Huyakorn, ES. and G.E Pinder. 1983. Computational Methods in Subsutface Flow. New York: Academic Press. [42] Huyakorn, ES., S.D. Thomas, and B.M. Thompson. 1984. Techniques for making finite elements competitive in modeling flow in variably saturated media. Water Resour Res. 20(8):1099-lllS.  Bibliography  209  [431 Huyakorn, P.S., E.P. Springer, V. Guvanasen and T. Wadsworth. 1986. A threedimensional finite-element model for simulating water flow in variably saturated porous media. Water Resour Res. 22:1790—1808. [44] Jea, K.C. and D.M. Young. 1983. On the simplification of generalized conjugate gradient methods for nonsymmetrizable linear systems. Linear Algebra and Its Applications Vol 52/53:399-4 17. [45] Jennings, A.A., D.J. Kerkner, and IL. Theis. 1982. Multicomponent equilibrium chem istry in groundwater quality models. Water Resour Res. 18(4): 1089—1096. [46] Kaluarachchi, J.J. and J.C. Parker, 1987. An efficient finite element method for modeling multiphase flow. Water Resour Res. 23(lO):1967—1976. [47] Karajeh, FE, K.K. Tanji, and I.P. King. 1994. Agroforestry drainage management model. I. Theory and validation. J. of Irrigation and Drainage Eng. 120(2):363—381. [48] Karajeh, FE, and K.K. Tanji. 1994a. Agroforestry drainage management model. II. Field water flow. I of Irrigation and Drainage Eng. 120(2):382—396. [49] Karajeh, FE, and K.K. Tanji. 1 994b. Agroforestry drainage management model. III. Field salt flow. I ofIrrigation and Drainage Eng. 120(2):397—413. [50] Kimball, B.A., R.D. Jackson, R.J. Reginato, ES. Nakayama, and SB. Idso. 1976. Com parison of field-measured and calculated soil-heat fluxes. Soil Sci. Soc. Am. J. 40:18—28. [51] Kirda, C., D.R. Nielsen, and J.W. Biggar. 1973. Simultaneous transport or chloride and water during infiltration. Soil Sci. Soc. Am. Proc. 37(3):339—345. [52] Kirkner, D.J., and H. Reeves. 1988. Multicomponent mass transport with homogeneous and heterogeneous chemical reactions: Effect of the chemistry on the choice of numerical algorithm. 1. Theory. Water Resour Res. 24(10): 1719—1729. [53] Kirkner, D.J., T.L. Theis, and A.A. Jennings. 1 984a. Multicomponent solute transport with sorption and soluble complexation. Adv. Water Resour 7:120—125. [54] Kirkner, D.J., H.W. Reeves and A.A. Jennings. 1984b. Finite element analysis of mul ticomponent contaminant transport including precipitation-dissolution reactions. In Pro ceedings 5th International Conference on Finite Elements in Water Resources. Burlington, Vermont. Berlin: Springer-Verlag. [55] Kirkner, D.J., A.A. Jennings, and T.L. Theis. 1985. Multicomponent mass transport with chemical interaction kinetics. .1. Hydrol. 76: 107—117.  Bibliography  210  [561 Klute, A. 1952. A numerical method for solving the flow equation for water in unsaturated materials. Soil Sci. 73:105—116. [57] Kool, J.B. and J.C. Parker. 1987. Development and evaluation of closed-form expressions for hysteretic soil hydraulic properties. Water Resour Res. 23:105—114. [58] Kundert, K.S. and A. Sangiovanni-Vincentelli. 1988. Sparse user’s guide. Berkeley, Calif.: Dept. of Electrical Eng. and Computer Sci., Univ. of California. [59] Kundert, K.S. 1986. Sparse matrix techniques. In CircuitAnalysis, Simulation andDesign, ed. Albert Ruehli. North-Holland. [60] Lapidus, L. and N.R. Amundson. 1952. Mathematics of adsorption in beds: VI. The effect of longitudinal diffusion in ion exchange and chromatographic columns. J. Phys. Chem. 56:984—988. [61] Lewis, FM., C.I. Voss, and J. Rubin. 1987. Solute transport with equilibrium aqueous complexation and either sorption or ion exchange: Simulation methodology and appli cations. J. HydroL 90:81—115. [62] Lichtner, P.C. 1985. Continuum model for simultaneous chemical reactions and mass transport in hydrothermal systems. Geochim. Cosmochim. Acta 49:779—800. [63] Lindstrom, FT., R. Hague, V.H. Freed, and L. Boersma. 1967. Theory on the movement of some herbicides in soils. Env. Sci. Tech. 1:561—565. [64] Liu, C.W. 1988. Multiple-species chemical transport involving oxidation/reduction reac tion in geological media. Ph.D. dissertation. University of California, Berkeley. [65] Liu, C.W. and T.N. Narasimhan. 1989a. Redox-controlled multiple-species reactive chem ical transport, 1. Model development. Water Resour Res. 25(5):869—882. [66] Liu, C.W. and T.N. Narasimhan. I 989b. Redox-controlled multiple-species reactive chem ical transport, 2. Verification and application. Water Resour Res. 25(5):883—910. [67] Luikov, A.V. 1966. Heat and Mass Transfer in Capillary Porous Bodies. Oxford: Perga mon Press. [68] Mangold, D.C. and C.-F Tsang. 1991. A summary of subsurface hydrological and hydro chemical models. Rev. Geophys. 29(l):5 1—79. [69] Markowitz, H.M. 1957. The elimination form of the inverse and its application to linear programming. Management Science 3(4):255—269. [70] Meyers. G.E. 1978. The critical time step for finite-element solutions to two-dimensional heat-conduction transients. I Heat Transfer 100(2): 120—127.  Bibliography  211  [71] Miller, C.W. 1983. CHEMTRN USER’S MANUAL. LBL-16152. Berkeley, Calif.: Lawrence Berkeley Laboratory, University of California. [72] Miller, C.W. and L.V. Benson. 1983. Simulation of solute transport in a chemically re active heterogeneous system: model development and application. Water Resour Res. 19(2):38l—391. [73] Millington, T.N. and J.M. Quirk. 1961. Permeability of porous solids. Trans. Faraday Soc. 57:1200—1207. [74] Milly, RC.D. 1982. Moisture and heat transport in hysteretic, inhomogeneous porous media: a matric head-based formulation and a numerical model. Water Resour Res. 18(3):489—498. [75] Milly, P.C.D. 1984. A simulation analysis of thermal effects on evaporation from soil. Wa ter Resour Res. 20(8): 1087—1098. [76] Milly, P.C.D. 1985. Stability of the Green-Ampt profile in a delta function soil. Water Resour Res. 21(3):399—402. [77] Milly, P.C.D. 1987. Advances in modeling of water in the unsaturated zone. In Ground water Flow and Quality Modeling, ed. E. Custodio, A. Gurgui, and J.P. Lobo Ferreira. Holland: D. Reidel Publishing Company. [78] Mualem, Y. 1976. A new model for predicting the hydraulic conductivity of unsaturated porous media. Water Resour Res. 12(3):513—522. [79] Mualem, Y. 1984. A modified dependent domain theory of hysteresis. Soil Sci. 137:283— 291. [80] Narasimhan, TN., P.A. Witherspoon, and A.L. Edwards. 1978. Numerical model for saturated-unsaturated flow in deformable porous media, 2, the algorithm. Water Resour Res. 14(2):255—261. [81] Narasimhan, T.N., A.F. White, and T. Tokunaga. 1986. Groundwater contamination from an inactive uranium mill tailings pile, 2. Application of a dynamic mixing model. Water Resour Res. 22(13):1820—1834. [82] Nassar, I.N. and R. Horton. 1 989a. Water transport in unsaturated nonisothermal salty soil: I. Experimental results. Soil Sci. Soc. Am. J. 53:1323—1329. [83] Nassar, I.N. and R. Horton. 1989b. Water transport in unsaturated nonisothermal salty soil: II. Theoretical development. Soil Sci. Soc. Am. J. 53:1330—1339.  Bibliography  212  [84] Nielsen, DR. and J.W. Biggar. 1962. Miscible displacement: III. Theoretical considera tions. Soil Sci. Soc. Am. Proc. 26:216—221. [85] Noorishad, J., C.L. Carnahan, and L.V. Benson. 1987. Development of the nonequilibrium reactive chemical transport code CHMTRNS. LBL-22361. Berkeley, CA: Lawrence Berkeley Lab. [861 Ogata, A. 1970. Theory of dispersion in a granular medium. U.S. GeoL Surv. Prof Paper 411-I. [87] Oppe, T.C., W.D. Joubert, and D.R. Kincaid. 1988. NSPCG 1.0 user’s guide. CNA-216. Austin, Texas: Center for Numerical Analysis, University of Texas. [88] Parkhurst, D.L., D.C. Thordtenson, and L.N. Plummer. 1980. PHREEQE.—A computer program for geochemical calculations. U. S. GeoL Surv. Water Resour Invest. 80—96. [891 Petzold, L.R. 1981. Differential/algebraic equations are not ODE’s. Rep. SAND8 1-8668. Albuquerque, N.M.: Sandia Nat. Lab. [90] Philip, J.R. 1957. The theory of infiltration; 2. The profile at infinity. Soil Sci. 84:434—448. [91] Philip, J.R. 1968. Absorption and infiltration in two- and three-dimensional systems, and Discussion. In Water in the Unsaturated Zone, Vol. I, Proc. Wageningen Symp., ed, RE. Rijtema and H. Wassink. lASH. [92] Philip, J.R. 1984. Steady infiltration from circular cylindrical cavities. Soil Sci. Soc. Am. J. 48(2):270—278. [93] Philip, J.R. 1986. Steady infiltration from spheroidal cavities in isotropic and anisotropic soils. Water Resour Res. 22(13): 1874—1880.  [941 Philip, J.R. and D.A. De Vries. 1957. Moisture movement in porous materials under tem perature gradients. Trans. Am. Geophys. Union 38:222—232. [95] Pinder, G.F. 1976. Galerkin finte element models for aquifer simulation. Unpublished re port. Princeton, N.J.: Princeton University. [96] Pinder, G.E 1987. An overview of groundwater modeling. In Groundwater Flow and Quality Modeling, ed. E. Custodio, A. Gurgui, and J.P. Lobo Ferreira. Holland: D. Rei del Publishing Company. [97] Pinder, G.F. and H.H. Copper, Jr. 1970. A numerical technique for calculating the transient position of the saltwater front. Water Resour Res. 6:875—882. [98] Prasad, S.N. and M.J.M. Romkens, 1982. An approximate integral solution of vertical in filtration under changing boundary conditions. Water Resour Res. 18(4): 1022—1028.  Bibliography  213  [99] Raats, P.A.C. 1970. Steady infiltration from line sources and furrows. Soil Sd. Soc. Am. Proc. 34(5):709—714. [100] Reardon, E.J. 1981. REd’s—Can they be used to describe reversible ion sorption reaction in contaminant migration? Ground Water 19(3):279—286. [101] Robbins, C.W., R.J. Wagenet, and J.J. Jurinak. 1980a. A combined salt transportchemical equilibrium model calcareous and gypsiferous soils. Soil Sci. Soc. Am. I 44:1191—1194. [102] Robbins, C.W., R.J. Wagenet, and J.J. Jurinak. 1980b. Calculating cation exchange in a salt transport model. Soil Sci. Soc. Am. J. 44:1195—1200. [103] Rubin, J. 1967. Numerical method for analyzing hysteresis-affected, post-infiltration, re distribution of soil moisture. Soil Sci. Soc. Am. Proc. 31:13—20. [104] Rubin, J. 1968. Theoretical analysis of two-dimensional, transient flow of water in un saturated and partly unsaturated soils. Soil Sci. Soc. Am. Proc. 32:607—6 15. [105] Rubin, J. 1983. Transport of reacting solutes in porous media: Relation between math ematical nature of problem formulation and chemical nature of reactions. Water Resour Res. 19(5):1231—1252. [106] Rubin, J. 1990. Solute transport with multisegment, equilibrium controlled reactions: A feed forward simulation method. Water Resour Res. 26(9):2029—2055. [107] Rubin, J. and R.V. James. 1973. Dispersion-affected transport of reacting solutes in satu rated porous media: Galerkin method applied to equilibrium-controlled exchange in uni directional steady water flow. Water Resour Res. 9(5): 1332—1356. [108] Russo, D., and G. Dagan (eds.). 1993. Water Flow and Solute Transport in Soils: Devel opment and Applications. New York: Springer-Verlag. [109] Schulz, H.D. and E.J. Reardon. 1983. A combined mixing cell/analytical model to de scribe two-dimensional reactive solute transport for unidirectional groundwater flow. Wa ter Resour Res. 19(2):493—502. [110] Segol, G. and G.F. Pinder. 1976. Transient simulation of saltwater intrusion in Southeast ern Florida. Water Resour Res. 12:62—70. [111] imnek, J., and DL. Suarez. 1994. Two-dimensional transport model for variably sat urated porous media with major ion chemistry. Water Resour Res. 30(4): 1115—1133. [112] Sonneveld, 1’. 1989. CGS, a fast lanczos-type solver for nonsymmetric linear systems. SL4IvI J. Sci. Stat. Compu. 10(1’):36—52.  Bibliography  214  [113] Sophocleous, M.A. 1979. Analysis of water and heat flow in unsaturated-saturated porous media. Water Resour Res. 15(5): 1195—1206. [114] Suarez, D.L. 1977. Ion activity productivity of calcium carbonate in waters below the root zone. Soil Sd. Soc. Am. J. 41:310—315. [115] Tanji, K.K., L.D. Doneen and J.L. Paul. 1967. Quality of percolating water. III. The qual ity of waters percolating through stratified substrata as predicted by computer analysis. Hilgardia 38:319—353. [116] Taylor, R.L. and C.B. Brown. 1967. Darcy flow solutions with a free surface. Proc. Amer Soc. Civil Engs. 93(HY2):25—33. [117] Thomas, H.R. 1985. Modeling two-dimensional heat and moisture transfer in unsaturated soils, including gravity effects. International J. for Numerical and Analytical Methods in Geomechanics 9:573—588. [118] Topp, G.C. 1971. Soil-water hysteresis: the domain model theory extended to pore inter action conditions. Soil Sci. Soc. Am. .1. 35:645—65 1. [119] Tóth, J. 1962. A theoretical analysis of groundwater flow in small drainage basins. J. Geophys. Res. 67:4375—4387. [120] Vachaud, G. and J.C. Thony. 1971. Hysteresis during infiltration and redistribution in a soil column at different initial water contents. Water Resour Res. 7(1): 111—127. [121] Valocchi, A.J. 1984. Describing the transport of ion-exchanging contaminants using an effective ‘i’d approach. Water Resour Res. 20(4):499-503. [122] Valocchi, A.J., R.L. Street, and EM Roberts. 1981. Transport of ion-exchanging solutes in groundwater: Chromatographic theory and field simulation. Water Resour Res. 17(5): 15 17—1527. [123] van Genuchten, M.T. 1980. A closed-form equation for predicting the hydraulic conduc tivity of unsaturated soils. Soil Sci. Soc. Am. J. 44(5):892—898. [124] van der Heijde, P., Y. Bachmat, J. Bredehoeft, B. Andrews, D. Holtz and S. Sebastian. 1985. Groundwater Management: The Use ofNumerical Models. Water Resources Mono graph Series, American Geophysical Union. [125] Waechter, R.T. and J.R. Philip. 1985. Steady two- and three-dimensional flows in unsat urated soil: the scattering analog. Water Resour Res. 21(12): 1861—1874. [126] Walsh, M.P., S.L. Bryant, and L.W. Lake. 1984. Precipitation and dissolution of solids attending flow through porous media. AIChE J. 30(2):3 17—328.  Bibliography  215  [127] Warrick, A.W. 1974. Time-dependent linearized infiltration, I, point sources. Soil Sci. Soc. Am. J. 38:383—386. [128] Warrick, A.W. and D.O. Lomen. 1983. Linearized moisture flow with root extraction over two-dimensional zones. Soil Sci. Soc. Am. J. 47(5):869—872. [129] Weir, G.J. 1987. Steady infiltration from small shallow circular ponds. Water Resour Res. 23(4):733-736. [1301 Westall, J.C. 1979. MICROQL: I. A chemical equilibrium program in BASIC. EAWAG. Dubendorf, Switzerland: Swiss Federal Institute of Technology. [1311 Wooding, R.A. 1968. Steady infiltration from a shallow circular pond. Water Resour Res. 4(6): 1259—1273. [132] Yeh, G.T. and V.S. Tripathi. 1988. HYDROGEOCHEM: A Coupled Model of HYDRO logical Transport GEOCHEMical Equilibrium of Multi-component Systems. Rep. ORNL 6371, Oak Ridge, Tenn.: Oak Ridge Nat. Lab. [1331 Yeh, G.T. and V.S. Tripathi. 1989. A critical evaluation of recent developments in hydro geochemical transport models of reactive multichemical components. Water Resour Res. 250 ):93—108. [134] Yeh, G.T. and V.5. Tripathi. 1991. A model for simulating transport of reactive multispecies components: model development and demonstration. Water Resour Res. 27(12):3075—3094. [135] Youngs, E.G. 1957. Moisture profiles during vertical infiltration. Soil Sci. 84:283—290. [136] Zelinchenko, E.N., and E’.A. Sokolenko. 1986. Physics of water and salt movement in soil layers. In Water and Salt Regimes of Soils: Modeling and Management, ed. E’. A. Sokolenko. Rotterdam: A.A. Balkema. [137] Zienkiewicz, O.C. and R.L. Taylor. 1989. The Finite Element Method. New York: McGraw-Hill.  Appendix A  SAMPLE INPUT FILES  The input files for a two-dimensional subsurface drainage problem are given here as samples. This problem was used as case I of the two-dimensional simulations in chapter 7, where descrip tion of the problem can be found. The project name is assumed to be 2dcl (two-dimensional, case 1). In the following sections, the input files will be given first, and then the keywords used in the input files will be explained. The output files from the simulation are not given here be cause they are self-explanatory.  A.1  Input File for the Mesh Generator  Input file for the automatic mesh generator can be given any extension. The extension of in .  has been consistently used in all the simulations in this dissertation. Here is the listing of the input file 2dcl. in: NDIME:  2  ORIENTATION: NELOCK:  V  3  NNODES_BLK:  S  ****Input Data for Elock(IDFE) BLK_TYPE: NNODES: ELE TYPE:  k9ck 1  10 1243 10  216  Appendix A. SAMPLE INPUT PILES  DIVISIONS:  40  PARAMETERS:  10 1.0  1.0  Material_Number (MGN) :  1  ****Input Data for Block(IDFB) ELK_TYPE:  10  NNODES:  3465  ELE_TYPE:  10  DIVISIONS:  40  PARAMETERS:  1.0  1.0 1  ****Input Data for Elock(IDFB) ELK_TYPE:  10  NNODES:  5687  ELE_TYPE:  10 40  PARAMETERS:  10 1.0  0.9  Material_Number (MON) :  1  Node_Coordinates Node No.  2****  5  Material_Number (MGN):  DIVISIONS:  217  Coordinates  1  0.0  0.0  2  4.0  0.0  3  0.0  1.0  4  4.0  1.0  5  0.0  1.5  6  4.0  1.5  7  0.0  2.5  3  Appendix A. SAMPLE INPUT FILES  8  4.0  218  2.5  The keywords used in the input file 2dcl. in are as follows: NDIME Dimension of the problem. It should be either 1, 2, or 3. ORIENTATION Orientation of the problem. The options are V for vertical problems, and H for horizontal problems (i.e., gravity is not taken into account). NBLOCK Number of blocks that define the mesh. For this simulation, there are three blocks in the mesh. NNODES_BLK Total number of nodes in all the blocks in the mesh. There are eight nodes initially defining the mesh in this simulation.  InputMata1orBIock(IDFB) The block number for which input data will be read. BLKTYPE Element type that defines the block. A complete list of supported element types can be found in chapter 5.  NNODES Node numbers that form the block. The number of nodes in the block must be cor respondent to the element type that defines the block. The node numbering order must be consistent in all blocks. ELETYPE Element type that the block is going to be divided into. It can be different from the block type.  DIVISIONS Number of divisions that the block is going to be divided into in each coordinate direction. In this example, block 1 will be divided into 40 divisions in x-direction and 10 divisions in z-direction.  Appendix A. SAMPLE INPUT FILES  219  PARAMETERS A parameter for each dimension that determines how the block is going to be divided in that dimension. A value of unity means that the elements will be uniform in length in that dimension. A value of less than unity means that the elements in that dimension will become increasingly smaller. The smaller the parameter, the faster the size of the elements will decrease. Likewise, a value of greater than unity means that elements will become increasingly larger in that dimension. The larger the parameter, the faster the size of the elements will increase. MateriaLNnmber(MGN) Material number of the block. It is used by the program to deter mine which set of material properties to use for elements in this block. Material number should be numbered sequentially starting from 1. Several blocks can have the same ma terial number. Node_Coordinates Coordinates of the nodes defining the mesh. The node numbers should be in ascending order starting from 1 to the total number of nodes.  Al  Input File for Mesh Data  Here is the listing of the mesh data input file for the sample simulation 2dcl.mes: NDIME 2 NNODE 1066 NELEM  1000  NODE 1  0.0000  0.0000  2  0.1000  0.0000  3  0.2000  0.0000  Appendix A. SAMPLE INPUT FILES  220  501  0.8000  1.2000  502  0.9000  1.2000  503  1.0000  1.2000  1064  3.8000  2.5000  1065  3.9000  2.5000  1066  4.0000  2.5000  END_NODE ELEM 1  10  1  1  2  43  42  2  10  1  2  3  44  43  3  10  1  3  4  45  44  501  10  1  513  514  555  554  502  10  1  514  515  556  555  503  10  1  515  516  557  556  998  10  1  1022  1023  1064  1063  Appendix A. SAMPLE INPUT FILES  221  999  10  1  1023  1024  1065  1064  1000  10  1  1024  1025  1066  1065  END_ELEM CONNECT 1  4  1  2  42  43  2  6  1  2  3  42  43  44  3  6  2  3  4  43  44  45  501  9  459  460  461  500  501  502  541  542  543  502  9  460  461  462  501  502  503  542  543  544  503  9  461  462  463  502  503  504  543  544  545  1064  6  1022  1023  1024  1063  1064  1065  1065  6  1023  1024  1025  1064  1065  1066  1066  4  1024  1025  1065  1066  END_CONNECT END  The keywords used in the input file 2 dcl .me s are as follows:  NDIME Dimension of the problem. NNODE Total number of nodes in the mesh.  Appendix A. SAMPLE INPUT FILES  222  NELEM Total number of elements in the mesh. NODE Start of node coordinates. The order of the data in each line is: node number, coordi nates in every dimension of the problem. In the file listed above, majority of the data have been deleted to save space. ENDt4ODE End of node coordinates. ELEM Start of element data. The order of the data in each line is: element number, element type, material number of the element, and the node numbers that form the element. The node numbers should be in a consistent order for all elements. ENILELEM End of element data. CONNECT Start of connectivity data for each node. The order of the data in each line is: node number, total number of nodes that are connected to this node, and list of node numbers that are connected to this node. The node numbers should be in ascending order. ENILCONNECT End of connectivity data. END End of mesh data input file.  A.3  Input File for Material Properties  Here is the listing of the input file for material properties 2 dcl .mat: MATNO KX  1 15  0.057  0.00072  0.060  0.00084  0.063  0.00114  Appendix A. SAMPLE INPUT FILES  0.067  0.00150  0.072  0.00186  0.077  0.00234  0.096  0.00330  0.119  0.00494  0.162  0.00850  0.214  0.01001  0.249  0.01217  0.275  0.01386  0.288  0.01476  0.296  0.01537  0.300  0.01558  IC XX THETA NONHYS 16 —1.543  0.057  —1.457  0.060  —1.371  0.063  —1.286  0.067  —1.200  0.072  —1.114  0.077  —0.994  0.096  —0.891  0.119  —0.771  0.162  —0.686  0.214  —0.600  0.249  —0.514  0.275  223  Appendix A. SAMPLE INPUT FILES  —0.429  0.288  —0.343  0.296  —0.257  0.300  0.0 55  224  0.300  0.0  LAMBDA 10 0.057  1044.0  0.076  1800.0  0.105  2880.0  0.130  3960.0  0.160  4680.0  0.190  5400.0  0.220  6120.0  0.250  6660.0  0.280  7560.0  0.300  7920.0  FC  0.2  FM  0.65  FO  0.05  PN  0.30  AL  0.2  AT  0.02  END SET END  The keywords used in the input file 2dcl mat are as follows: .  Appendix A. SAMPLE INPUT FILES  225  MATNO Material number. It marks the beginning of input data for this set of material prop erties. An input file can have multiple sets of material properties. KX Unsaturated hydraulic conductivity of the soil in the x-direction as a function of water con tent. It must be followed by an integer (the number of pairs of data defining the function) on the same line, and the data pairs (water content followed by hydraulic conductivity) on the subsequent lines. These data points will be fitted using a spline function by the computer model. KY Unsaturated hydraulic conductivity of the soil in the y-direction as a function of water con tent. It can be followed either by KX or an integer on the same line. If it is followed by KX, the hydraulic conductivity in the y-direction is the same as in the x-direction. If it is followed by an integer, it must also be followed by a number of data pairs on the subse quent lines, as in the case of KX. KY is not used in the above input file. KZ Unsaturated hydraulic conductivity of the soil in the z-direction as a function of water con tent. It can be followed either by KX, KY, or an integer on the same line. If it is fol lowed by KX (or KY), the hydraulic conductivity in the z-direction is the same as in the x-direction (or y-direction). If it is followed by an integer, it must also be followed by a number of data pairs on the subsequent lines, as in the case of KX. THETA Water content of the soil as a function of pressure potential. It must be followed by either NONHYS (non-hysteresis) or HYS (hysteresis) AND an integer (the number of pairs of data defining the function) on the same line, and the data pairs (pressure potential followed by water content) on the subsequent lines. In the current model, only NONHYS has been implemented. SS Specific storativity of the soil.  Appendix A. SAMPLE INPUT FILES  226  LAMBDA Thermal conductivity of the soil as a function of water content. It must be followed by an integer (the number of pairs of data defining the function) on the same line, and the data pairs (water content followed by thermal conductivity) on the subsequent lines. FC Fraction of clay content. FM Fraction of mineral. FO Fraction of organic matters. PN Porosity of the soil. AL Longitudinal diffusivity of the soil. AT Transverse diffusivity of the soil. END_SET End of input data for the current set of material properties. END End of the input file for material properties.  A.4  Input File for Chemical System  Here is the listing of the input file for chemical data 2 dcl chin: .  NUN_COMP 4 NUM_AQ 12 NUN_SORB 2 NUN_PPT 1 SYSTEM OPEN STO_AQ  1.0  0.0  0.0  0.0  0.0  1.0  0.0  0.0  Appendix A. SAMPLE INPUT FILES  227  0.0  0.0  1.0  0.0  0.0  0.0  0.0  1.0  —1.0  0.0  0.0  0.0  1.0  1.0  0.0  0.0  2.0  1.0  0.0  0.0  1.0  1.0  0.0  1.0  1.0  1.0  1.0  0.0  0.0  1.0  0.0  1.0  0.0  1.0  1.0  0.0  —1.0  0.0  0.0  1.0  0.0  1.0  0.0  1.0  S TO_PPT  KA 1.0 1.0 1.0 1.0 1. 005e—14 2. 138e+10 4. 797e+16 2. 138e+11 1.202e+10 1. 412e+3 18.535 2. 523e—13 KS  Appendix A. SAMPLE INPUT PILES  3.0 SORB  3 4  KP 3 .35e—9  zz 1.0 —2 0 .  1.0 2.0 —1.0 -1.0 0.0 1.0 0.0 0.0 -1.0 1.0 NEQ 1 1066 1 5.Oe—4 END_NEQ END  Keywords used in the input file 2dcl chin are as follows: .  NUMCOMP Number of component species in the system. NUMAQ Number of aqueous species in the system.  228  Appendix A. SAMPLE INPUT PILES  229  NUMSORB Number of sorbed species in the system. NUMYPT Number of possible precipitated species in the system. SYSTEM Type of chemical system. It must be followed by either SINGLE (single nonreactive solute), CLOSE (closed chemical system), or OPEN (open chemical system). STOAQ Stoichiometric coefficients of the aqueous species. It must be followed by NUMAQ lines of input data with NUM_COMP numbers on each line. STOYPT Stoichiometric coefficients of the precipitated species. It should be followed by NUMYPT lines of input data with NUMCOMP numbers on each line. KA Reaction constants of the aqueous species. It must be followed by NUMJkQ reaction con stants, one on each line. KS Selectivity coefficients of the sorbed species. It must be followed by NUM_SORB— 1 se lectivity coefficients, one on each line. SORB Aqueous species that participate in ion exchange. It must be followed by NUMSORB integers (species numbers that participate in ion exchange). KP Solubility products of the precipitated species. It must be followed by NUM_PPT solubil ity products, one on each line. ZZ Valence of each chemical species in the system. It must be followed by NUMAQ valence values, one on each line. NEQ Ion exchange capacity at each node in the mesh. It can be followed by any number of lines of data. The order of the data on each line should be: starting node number, end ing node number, node number increment, and the ion exchange capacity. The computer  Appendix A. SAMPLE INPUT FILES  230  model will automatically assign the specified ion exchange capacity to the nodes between the starting node and the ending node with the specified increment. END_NEQ End of input for ion exchange capacity. END End of the input file for chemical data.  AS  Input File for Boundary and Initial Conditions  Here is the listing of the input file for boundary and initial conditions 2dcl bic: .  WATER BOUND DBC 411 411 1 C 0.0 END_DBC NBC END_NBC END_BOUND INIT 1 41  1 2.5  1026  1066  END_INIT END_WATER HEAT  1  0.0  Appendix A. SAMPLE INPUT PILES  231  BOUND DBC END_DBC END_BOUND INIT 1  1066  1 20.0  END_INIT END_HEAT SOLUTE BOUND COMP 1 DBC 1026 1066  1  C  0.00003  1  C  0.00035  END_DBC END_COMP COMP 2 DBC 1026  1066  END_DBC END_COMP END_BOUND INIT 1  1066  END_INIT END_SOL END  1  1.Oe—3  1.Oe—3  Appendix A. SAMPLE INPUT FILES  232  The keywords used in the input file 2dcl bic are as follows: .  WATER Start of boundary and initial conditions for the water flow equation. END_WATER End of boundary and initial conditions for the water flow equation. HEAT Start of boundary and initial conditions for the heat transfer equation. ENDHEAT End of boundary and initial conditions for the heat transfer equation.  SOLUTE Start of boundary and initial conditions for the solute transport equations. END_SOL End of boundary and initial conditions for the solute transport equations. BOUND Start of boundary conditions. END_BOUND End of boundary conditions. COMP Component species for which boundary conditions are going to be specified. END_COMP End of boundary conditions for the current component species. DBC Dirichlet (or the first kind) boundary conditions. It can be followed by any number of lines of data. The order of the data on each line should be: starting node number, ending node number, increment, followed by either C for a constant boundary condition or V for a variable boundary condition. If the boundary condition is constant, it is then followed by the specified value on the same line. If the boundary condition is variable with time, it is then followed on the same line by the number of pairs of data that defines the time function, and the data pairs (time followed by the specified value) on the subsequent lines. END_DBC End of Dirichlet boundary conditions. NBC Neumann (or the second kind) boundary conditions. Input data for the Neumann bound ary conditions follow the same format as for the Dirichlet boundary conditions.  Appendix A. SAMPLE INPUT FILES  233  ENWNBC End of Neumann boundary conditions. INIT Start of initial conditions. It is followed by a number of lines of input data. The order of the data on each line should be: starting node number, ending node number, increment, followed by the specified initial value or values. ENDJNIT End of initial conditions. END End of the input file for boundary and initial conditions.  A.6  Input File for Control Data  Here is the listing of the input file for control data 2dcl con: .  NTSTEP  100  DT  1 100 0.4 END_DT DNTSTEP 100 OMEGA  1.0  MAXIT  4  ERROR 0.000001 SOL_METHOD ITERATIVE END  The keywords used in the input file 2dcl con are as follows: .  DTSTEP Total number of time steps in the simulation.  Appendix A. SAMPLE INPUT FILES  234  DT Lengths of the time steps. It is followed by lines of input data. The order of the data on each line should be: starting time step, ending time step, length of time step. The computer model will automatically assign the specified length to each time step between the starting time step to the ending time step. DNTSTEP Number of time steps between which output is required. OMEGA Value of the relaxation factor. MAXIT Maximum number of iterations between the sets of equations allowed before the length of the time step is reduced by half. ERROR Convergence criteria for stopping iterations between the sets of equations. SOLMETHOD Solution method for systems of linear equations. The available options are: BANDED for the banded matrix method, SPARSE for the sparse matrix method, and IT ERATIVE for the iterative methods. END End of the input file for control data.  

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0076945/manifest

Comment

Related Items