*************************************************************************
      *********************** T2VOC, a Module for TOUGH2 **********************
      ***********************      for 3-phase flow      **********************
      ***********************   of Water, Air, and NAPL  **********************
      *************************************************************************
      ***********************  Version 1.0, March 1995   **********************
      *************************************************************************

      .........................................................................
      .......READ.ME..........READ.ME..........READ.ME..........READ.ME........
      .........................................................................
      ...............................Update 1/98..............................
      .........................................................................

         This flyer contains brief instructions for installing and running 
      T2VOC, a TOUGH2 module for 3-phase flow of water, air, and a volatile
      organic compound (VOC). T2VOC was designed to simulate processes such as
      the migration of hazardous non-aqueous phase liquids (NAPLs) in variably
      saturated media, forced vacuum extraction of organic chemical vapors
      from the unsaturated zone (soil vapor extraction), evaporation and
      diffusion of chemical vapors in the unsaturated zone, air injection into
      the saturated zone for removal of volatile organics (air sparging),
      direct pumping of contaminated water and free product, and steam
      injection for the removal of NAPLs from contaminated soils and aquifers.

         For successful applications of T2VOC, users are urged to peruse the
      T2VOC User's Guide (Falta, Pruess, Finsterle and Battistelli, 1995). The
      user's guide includes a description of the physical processes modeled by
      T2VOC, and a summary of mathematical model and numerical methods used.
      It also provides a complete reference to the preparation of input data,
      and presents a number of sample problems that can serve as a guide for
      the development of new applications. Additional references that will be
      useful for T2VOC users are given below.

         T2VOC is distributed on 3.5'' diskettes, written in DOS (IBM-AT)
      compatible format. The distribution includes the following 16 files.

      *************************************************************************

      (1)  read.me     - the file you're reading.

      (2)  t2voc.f     - single-precision FORTRAN77 source code for the 3-phase
                         water/air/NAPL module for TOUGH2.

      (3)  t2voc.for   - double-precision (REAL*8) version for PCs.

      (4)  install.bat - DOS command file for installation of T2VOC on PCs.

      (5)  yesno.exe   - auxiliary file, which needs to be present on the
                         installation diskette for installation on PCs.

      (6)  makefile    - utility file for PCs. It contains the required
                         commands and instructions to compile, link and create
                         an executable file T2VOC using the LAHEY Fortran
                         compiler Ver. 5.XX. Can be modified to customize
                         installation of T2VOC.

      (7)  rgdif       - one-dimensional gas diffusion      (problem 1)

      (8)  rblev       - Buckley-Leverett problem           (problem 2)

      (9)  rtce1       - TCE injection in laboratory column (problem 3, part 1)

      (10) rtce2       - TCE waterflood                     (problem 3, part 2)

      (11) rtce3       - steam sweep of TCE                 (problem 3, part 3)

      (12) rfs1        - 2-D gravity-capillary equilibrium  (problem 4, part 1)

      (13) rfs2        - Xylene spill                       (problem 4, part 2)

      (14) rfs3        - Xylene redistribution              (problem 4, part 3)

      (15) rfs4        - steam sweep of Xylene              (problem 4, part 4)

      (16) voc.data    - compilation of thermophysical property data for
                         selected VOCs.  

      *************************************************************************

         To assemble an executable code, the standard TOUGH2 (or TOUGH2-PC)
      program modules are needed in addition to the files listed above.

         Like other members of the TOUGH/MULKOM family of codes, T2VOC
      requires 64-bit arithmetic. The standard version of the code (file 2,
      t2voc.f) is intrinsically single precision, and may be used on 64-bit
      processors, or on 32-bit processors whose compiler has an internal
      double-precision "switch." For example, on an IBM RS/6000 workstation
      with a 32-bit CPU, compilation should be made with the option
      "-qautodbl=dblpad" to obtain 64-bit arithmetic; on Sun and Solbourne
      workstations the same effect is achieved by specifying the "-r8" compiler
      option. File 3 is an intrinsically double-precision (IMPLICIT REAL*8)
      version of the T2VOC source code, specifically designed for installation
      on PCs. Files 4-6 are auxiliary files for PCs.

         Files (7) - (15) are input files for the sample problems that are
      described in the T2VOC User's Guide. Users should run several of these
      problems and check their output against the results given in the
      user's guide, to verify proper code installation. Users are cautioned
      that somewhat different code behavior is to be expected on different
      platforms. More specifically, slight differences in number of 
      significant digits and roundoff may affect the linear equation solution
      and, in turn, the Newton-Raphson iteration process. If convergence of
      the Newton-Raphson process is achieved in a different number of
      iterations, subsequent time steps and associated time truncation
      errors may be different, leading to some differences in simulated
      results at specified times. Because of these sensitivities, users are
      urged to experiment and try different linear equation solvers by way
      of the MOP(21) parameter.

         File (16), assembled by George Moridis, includes sets of property
      data for some of the more commonly encountered VOCs, in ready-to-go
      T2VOC-compatible CHEMP data blocks. This should facilitate the
      development of new applications.

         T2VOC is not a free-standing code but is an extension of the TOUGH2
      simulator, and needs to be used in conjunction with TOUGH2. As with
      other variants of TOUGH2, it is applicable to regular and irregular flow
      systems in one, two, and three dimensions, and to porous as well as
      fractured media. The standard version of T2VOC (file 2, t2voc.f) can be
      used either with the original TOUGH2 version, that included the MA28
      direct solver (released in April 1991), or with the recently released
      version that includes a package of preconditioned conjugate gradient
      solvers (Moridis and Pruess, 1995). The latter is highly recommended,
      as it makes possible the solution of large 2-D and 3-D problems with
      thousands of grid blocks. The PC-version of T2VOC (file 3, t2voc.for)
      is designed for linking with the PC-version of TOUGH2, as released in
      January 1995.

      INSTALLATION OF THE STANDARD VERSION

         The standard TOUGH2 FORTRAN77 source code consists of the files
      t2m.f, eosx.f, meshm.f, t2f.f, and ma28.f, where eosx.f is any one of
      a number of different fluid property (equation-of-state) modules. To
      illustrate the assembly of T2VOC, we list the compilation and linking 
      commands that would be used on an IBM RS/6000 workstation. "Standard"
      TOUGH2 with the EOS3 module (water, air) would be compiled and linked
      into an executable "x3" as follows.

         xlf -c -qautodbl=dblpad t2m.f eos3.f meshm.f t2f.f ma28.f
         xlf -o x3 t2m.o eos3.o meshm.o t2f.o ma28.o

      (Depending on the compiler available, various levels of optimization
      may also be invoked).

         To use the T2VOC module, the FORTRAN77 program file t2voc.f should
      be compiled and linked in place of the TOUGH2 modules t2m.f and eosx.f.
      As T2VOC includes its own equation-of-state package no additional
      EOS-module is required. On an IBM RS/6000, the compilation and linking
      instructions for producing an executable "xvoc" are as follows:

         xlf -c -qautodbl=dblpad t2voc.f meshm.f t2f.f ma28.f
         xlf -o xvoc t2voc.o meshm.o t2f.o ma28.o

         Execution of an input file rgdif (first sample problem) would be
      made with the command

         xvoc rgdif.out

      where output is printed to file rgdif.out.

         The file t2voc.f includes a number of new subroutines for calculating
      thermophysical properties of the VOC, as well as modified versions of
      some of the same program units that appear in standard TOUGH2 (see
      Table 1 in the user's guide). This will create a situation of "duplicate
      names" during the linking process. On most computers the linker will 
      simply use the first program unit with a given name, and will ignore
      subsequent program units with the same name. On some computers the
      presence of duplicate names during linking will create a fatal error.
      This can be avoided by removing the unwanted program units or, more
      simply, by changing their names.  For example, t2voc.f includes a
      modified version of subroutine INPUT. If a name conflict appears during
      linking, the user should, prior to compilation, change the name of INPUT
      in TOUGH2 file t2f.f to INPUX, say.

         The preferred setup of T2VOC is with the preconditioned conjugate
      gradient module, T2CG1. This is accomplished by compiling and linking
      the program file "t2cg1.f" in front of the other object codes. On an
      IBM RS/6000 the linking instruction for making an executable xvoc1 is
      as follows:

         xlf -o xvoc1 t2cg1.o t2voc.o meshm.o t2f.o ma28.o

      Note that again duplicate names may appear, with t2cg1.f containing
      program units that supersede some of the units in t2voc.f as well as in
      standard TOUGH2. The default options for T2VOC are to solve NEQ = 4
      balance equations for NK = 3 mass components and heat, and to treat
      the flow of NPH = 3 phases. It is recommended to specify the 
      dimensioning parameters in the main program of t2cg1.f (or t2m.f)
      accordingly, i.e., MNEQ = 4, MNK = 3, and MNPH = 3.

      INSTALLATION ON PCs

         The PC version of TOUGH2 consists of the files t2cg1.for, eosx.for,
      meshm.for, t2f.for, and ma28.for, where eosx.for is any one of a number
      of different fluid property (equation-of-state) modules. To use the
      T2VOC-PC module, the FORTRAN77 program file t2voc.for should be compiled
      and linked with the TOUGH2-PC modules except eosx.for. T2VOC includes its
      own equation-of-state package, therefore, no additional EOS-module is
      required. 

         Several utility files (install.bat, yesno.exe, and makefile) are
      included in the distribution diskette to facilitate code installation and
      setup on PCs. The install.bat and makefile utility files may be 
      customized as desired by the user. Assuming that TOUGH2-PC was installed
      as suggested in the January 1995 READ.ME flyer, the installation of
      T2VOC with the provided utility files proceeds as follows. 

         (1) Insert the distribution diskette in drive B:, type INSTALL and
             press . The install.bat file will (a) check for the
             existence of TOUGH2-PC, (b) install T2VOC-PC in a subdirectory
             T2VOC under TOUGH2, and (c) copy the files t2cg1.for, meshm.for,
             t2f.for, and ma28.for from the TOUGH2 directory to the T2VOC
             subdirectory.
             
             The install.bat file will also create a subdirectory DEVELOP
             under T2VOC, and will write all input files for sample problems
             into that directory.

         (2) To avoid fatal "duplicate name" errors during linking, remove or
             rename the following program units in module T2F.FOR in
             subdirectory T2VOC: INPUT, MULTI, RELP, PCAP. For our T2VOC-PC
             tests these routines were renamed INPUTX, MULTIX, RELPX, PCAPX.
             We also recommend that, prior to compilation and linking,
             dimensioning parameters in the main program (file T2CG1.FOR) be
             changed to MNEQ = 4, MNK = 3, and MNPH = 3.

         (3) Within the T2VOC directory, type the following command:

                        make

      The code will then be compiled and linked and, if the "makefile" file
      provided on the distribution diskette was not modified, an executable
      T2VOC.EXE will be written to the T2VOC\DEVELOP directory.

         As an example of code execution, part 4 of sample problem 4, steam
      sweep of a xylene plume, would be run in the T2VOC\DEVELOP directory
      with the following command,

                        t2voc rfs4.out
                        
      where output would be directed to the file "rfs4.out". The ">rfs4.out"
      part of the command is optional; if it is not present all output will
      be displayed on the screen.

         We mention that, whereas t2voc.f includes program units TOUGH2 (main
      program), VV, IO, FLOP, and SECOND, these have been removed from
      t2voc.for, to avoid "duplicate name" problems during linking. FORMAT
      statements with more than 127 'X' field spaces have been modified
      according to 129X --> 120X,9X, to avoid a problem with version 5.XX of
      the LAHEY compiler.

      *************************************************************************

      The T2VOC, TOUGH2, and T2CG1 codes are available from the U.S.
      Department of Energy's software distribution center:

         Energy Science and Technology Software Center
         P.O. Box 1020
         Oak Ridge, Tennessee 37831-1020
         U.S.A.

         phone (423) 576-2606
         fax   (423) 576-6436
         email: estsc@adonis.osti.gov
         WorldWideWeb: http://www.osti.gov/estsc/

      For questions or comments, contact:      

         Karsten Pruess                       Ronald W. Falta 
         Mail Stop 90-1116                    Earth Sciences Department
         Lawrence Berkeley Laboratory         Clemson University 
         Berkeley, CA 94720                   Clemson, SC 29634-1908
         U.S.A.                               U.S.A.
         email: K_Pruess@lbl.gov              email: ron@geology.clemson.edu 

      Users are requested to tell us about any bugs that may be encountered.
      We also like to hear about code improvements and enhancements; send
      e-mail to K_Pruess@lbl.gov.

      *************************************************************************
      * Additional information is available on the TOUGH2 homepage on the web *
      *                                                                       *
      *                http://www-esd.lbl.gov/TOUGH2/                         *
      *************************************************************************

      REFERENCES

         R.W. Falta, K. Pruess, S. Finsterle, and A. Battistelli, "T2VOC
         User's Guide," Lawrence Berkeley Laboratory Report LBL-36400,
         March 1995.

         G.J. Moridis and K. Pruess, "T2CG1, A Package of Preconditioned
         Conjugate Gradient Solvers for the TOUGH2 Family of Codes," 
         Lawrence Berkeley Laboratory Report LBL-36235, March 1995.

         R.W. Falta, K. Pruess, I. Javandel, and P.A. Witherspoon, "Numerical
         Modeling of Steam Injection for the Removal of Nonaqueous Liquids
         From the Subsurface, 1. Numerical Formulation," Water Res. Res.,
         Vol. 28, No. 2, pp. 433-449, 1992.

         R.W. Falta, K. Pruess, I. Javandel, and P.A. Witherspoon, "Numerical
         Modeling of Steam Injection for the Removal of Nonaqueous Liquids
         From the Subsurface, 2. Code Validation and Application," Water Res.
         Res., Vol. 28, No. 2, pp. 451-465, 1992.

         K. Pruess, TOUGH2 - A General-Purpose Numerical Simulator for
         Multiphase Fluid and Heat Flow, Lawrence Berkeley Laboratory Report
         LBL-29400, May 1991.

         K. Pruess, TOUGH User's Guide, Lawrence Berkeley Laboratory Report
         LBL-20700, June 1987 (also available as Nuclear Regulatory
         Commission Report NUREG/CR-4645).

         E. Antunez performed the adaptation of T2VOC for PC.
      *************************************************************************
      .........................................................................
      .......READ.ME..........READ.ME..........READ.ME..........READ.ME........
      .........................................................................

go to TOUGH2 home page