TOUGH4 User Manual
  • Quick Entry to Keywords for Data Input
  • 1️⃣INTRODUCTION
    • About TOUGH
    • TOUGH Development History
    • TOUGH4 Implementation
    • Scope and Methodology
  • 2️⃣WHAT IS NEW IN TOUGH4
  • 3️⃣CODE COMPILATION AND INSTALLATION
    • Setup for Compilation
    • Code Compilation
      • 1. Compilation of TOUGH4 using Visual Studio
      • 2. Compilation of TOUGH4 on Linux-like platform
    • Installation
    • Running the Executable for Simulations
  • 4️⃣GOVERNING EQUATIONS
    • Mass-Balance Equation
    • Accumulation Terms
    • Flux Terms
    • Sink and Source Terms
    • Virtual Node Well Treatment
    • Semi-Analytical Conductive Heat Exchange
    • Drift Model
    • Non-Darcy Flow
  • 5️⃣NUMERICAL METHOD
    • Space and Time Discretization
    • Interface Weighting Schemes
    • Initial and Boundary Conditions
      • Initial Conditions and Restarting
      • Neumann Boundary Conditions
      • Dirichlet Boundary Conditions
      • Atmospheric Boundary Conditions
      • Constant Temperature Boundary Conditions
    • Parallel computing schemes
    • Linear Solvers
    • Python Functions
      • Relative Permeability
      • Capillary Pressure
      • Initial Condition Calculation
      • Fetching Output Data
      • Fetching Thermophysical Property Data From NIST Webbook
      • Coupling With Third-Party Software
  • 6️⃣SOFTWARE ARCHITECTURE
    • Program Design
    • Data Structure
    • Linear Equation Setup
  • 7️⃣PROCESS MODELING
    • EOS1
    • EOS2
    • EOS3
    • EOS4
    • EOS6
    • EOS7
    • EOS9
    • ECO2
    • EWASG
    • TMVOC
    • Tracers/Decay Chain
    • Biodegradation Reaction
    • Wellbore Flow
    • Non-Darcy Flow
    • Enhanced Coal Bed Methane
  • 8️⃣PREPARATION OF MODEL INPUT
    • Input Formatting
    • Keywords and Input Data
      • TITLE
      • BIODG
      • CBMDA
      • CHEMP
      • COFT
      • CONNE
      • COUPL
      • DIFFU
      • ELEME
      • ENDCY
      • ENDFI
      • FLAC
      • FNIST
      • FOFT
      • FORCH
      • GASES
      • GENER
      • GOFT
      • HYSTE
      • INCON
      • INDOM
      • MESHM
      • MODDE
      • MOMOP
      • MULTI
      • OUTPU
      • PARAM
      • ROCKS
      • ROFT
      • RPCAP
      • SELEC
      • SOLVR
      • SPAVA
      • TIMBC
      • TIMES
      • TRACR
      • WELLB
    • Inputs for Initial Conditions
      • EOS1
      • EOS2
      • EOS3
      • EOS4
      • EOS6
      • EOS7
      • EOS9
      • ECO2
      • EWASG
      • TMVOC
    • Geometry Data
      • General Concepts
      • MESHMaker
      • Multiple-continuum processing
    • Inputs for MESHMaker
      • Generation of radially symmetric grids
        • RADII
        • EQUID
        • LOGAR
        • LAYER
      • Generation of rectilinear grids
      • MINC processing for fractured media
    • Adjustment of Computing Parameters at Run-time
  • 9️⃣OUTPUTS
  • 🔟VALIDATION AND APPLICATION EXAMPLES
    • EOS1
      • Problem 1 - Code Demonstration
      • Problem 2 - Heat Sweep in a Vertical Fracture (rvf)
      • Problem 3 - Five-spot Geothermal Production/Injection (rfp)
      • Problem 4 - Coupled Wellbore Flow (r1q)
      • Problem 5 - Five-Spot Geothermal Production/Injection under extremely high temperature
    • EOS2
      • Problem 1 -Five-spot Geothermal Production/Injection (rfp)
    • EOS3
      • Problem 1 - Code Demonstration (eos3p1)
      • Problem 2 - 1D TH Problem with Heating and Gas Source (by Guanlong Guo)
      • Problem 3 - Heat Pipe in Cylindrical Geometry (rhp)
      • Problem 4 - 3D Thermal Consolidation Test, Coupling with FLAC3D Simulator (by Guanlong Guo)
    • EOS4
      • Problem 1 - Code Demonstration (eos4p1)
      • Problem 2 - Heat Pipe in Cylindrical Geometry (rhp)
    • EOS6
      • Problem 1-Validation with EOS2
      • Problem 2-Noble Gas Transport
    • EOS7
      • Problem 1-Multiphase and Nonisothermal Processes in a System with Variable Salinity (rf1)
      • Problem 2-Thermal and Tracer Diffusion (EOS7R/rdif7)
      • Problem 3-Contamination of an Aquifer from VOC Vapors in the Vadose Zone (EOS7R/rdica)
      • Problem 4-Density, Viscosity, Solubility, and Enthalpy of Real Gas Mixtures (EOS7C/SAM7C1)
      • Problem 5-CO2 Injection into a Depleted Gas Reservoir (EOS7C2/SAM7C2)
      • Problem 6- CO2 Injection into a Saturated System (EOS7C/SAM7C3)
      • Problem 7-Density, Viscosity, and Enthalpy of Real Gas Mixtures (EOS7CA/SAM7CA1)
      • Problem 8-CO2 Injection into a Shallow Vadose Zone (EOS7CA/SAM7CA2)
      • Problem 9-Non-Isothermal Compressed Air Energy Storage in Reservoir (by Julien Mouli-Castillo)
    • EOS9
      • Page 1
    • ECO2
      • Problem 1-Demonstration of Initialization Options (ECO2N/rtab)
      • Problem 2-Radial Flow from a CO2 Injection Well (ECO2N/rcc3)
      • Problem 3-CO2 Discharge Along a Fault Zone (ECO2N/r1dv)
      • Problem 4-CO2 Injection into a 2-D Layered Brine Formation (ECO2N/rtp7)
      • Problem 5-Upflow of CO2 along a Deep Fault Zone (ECO2M/r1d)
      • Problem 6-Migration of a CO2 Plume in a Sloping Aquifer, Intersected by a Fault (ECO2M/rwaf)
      • Problem 7-GCS/GHE with a double-porosity reservoir (Case6_50kg_DP/ECO2NV2)
    • EWASG
      • Problem 1 - Brine Density Calculation (dnh)
      • Problem 2 - Production from a Geothermal Reservoir with Hypersaline Brine and CO2 (rhbc)
    • TMVOC
      • Problem 1-Initialization of Different Phase Conditions (r7c)
      • Problem 2-1-D Buckley-Leverett Flow (rblm)
      • Problem 3-Diffusion of components (rdif2)
      • Problem 4-Steam Displacement of a NAPL in a Laboratory Column (rtcem)
      • Problem 5-Steam Displacement of a Benzene-Toluene Mixture in a Laboratory Column (rbt)
      • Problem 6 -Air Displacement of a NAPL from a Laboratory Column (rad)
      • Problem 7-NAPL Spill in the Unsaturated Zone (r2dl)
    • T4.Well
      • Problem 1-Steady-state two-phase flow upward
      • Problem 2-Non-isothermal CO2 flow through a wellbore initially full of water
  • CONCLUSION REMARKS
  • REFERENCES
  • ACKNOWLEDGEMENT
  • Appendix
    • ☑️A: RELATIVE PERMEABILITY FUNCTIONS
      • IRP=1 Linear function
      • IRP=2 Power function
      • IRP=3 Corey's curves
      • IRP=4 Grant's curve
      • IRP=5 Perfectly mobile
      • IRP=6 Fatt and Klikoff function
      • IRP=7 van Genuchten-Mualem Model
      • IRP=8 Verma function
      • IRP=10 Modified Brooks-Corey Model
      • IRP=11 Modified van Genuchten Model
      • IRP=12 Regular hysteresis
      • IRP=13 Simple hysteresis
      • IRP=31 Three phase perfectly mobile
      • IRP=32 Modified Stone's first 3-phase method
      • IRP=33 Three-phase Parker's function
      • IRP=34 Alternative Stone 3-phase
      • IRP=35 Power-law function
      • IRP=36 Faust for two-phase Buckley-Leverett problem
      • IRP=37 Another alternative to Stone function
      • IRP=40 Table lookup
      • IRP=41 User-Defined relative permeability function
    • ☑️B: CAPILLARY PRESSURE FUNCTIONS
      • ICP=1 Linear function
      • ICP=2 Function of Pickens
      • ICP=3 TRUST capillary pressure
      • ICP=4 Milly’s function
      • ICP=6 Leverett’s function
      • ICP=7 van Genuchten function
      • ICP=8 No capillary pressure
      • ICP=10 Modified Brooks-Corey Model
      • ICP=11 Modified van Genuchten Model
      • ICP=12 Regular hysteresis
      • ICP=13 Simple hysteresis
      • ICP=31 Parker et al 3-phase function
      • ICP=32 Parker 3-phase function, alternative 1
      • ICP=33 Parker 3-phase function, alternative 2
      • ICP=34 Parker 3-phase function, alternative 3
      • ICP=40 Table lookup
      • ICP=41 User-Defined capillary pressure function
    • ☑️C: ADDITIONAL PROGRAM OPTIONS
    • ☑️D: DESCRIPTION OF FRACTURED FLOW
      • Multiple Continuum Approaches
      • Active Fracture Modle
Powered by GitBook
On this page
  1. PROCESS MODELING

EOS1

PreviousPROCESS MODELINGNextEOS2

Last updated 2 days ago

  1. Description and specifications

EOS1 is the most basic EOS module, providing a description of one or two waters in their liquid, vapor, two-phase and supercritical states. If two waters exist, the two waters must have identical physical properties. For such a case, two water mass balances will be set up, allowing separate tracking of the two components. For example, one could specify the water initially present in the flow system as “water1” (such as fresh water), while water being injected is specified as “water2” (such as dirty water). When the two waters option is chosen, molecular diffusion can also be modeled by turning on the diffusion option by input at "".

The specifications for EOS1 are given in Table 4. The default component number is 1 (water1). Users have the options to include second water, and as many as 5 tracers with a maximum component number of 7. The second water can be invoked through parameter hBSW in record 3 of keyword """ input. Tracers are defined in the input keyword "". They can only exist in the user specified phase. The flow system can be in liquid, vapor, two-phase or supercritical states. Different primary variables are used for different phase conditions (see Table 14). The primary variables Xw2 and Xtrn are optional. They are needed when only corresponding mass components exist. The primary variable selection is for facilitating the calculation of the fluid thermophysical properties. All thermophysical properties (density, specific enthalpy, viscosity) are assumed independent of the component mixture; i.e., independent of mass fractions of all the components. This approximation is applicable for problems in which the identity of different waters and tracers is distinguished by the presence of different trace constituents, which occur in concentrations low enough to not appreciably affect the thermophysical properties.

Table 4 Summary for EOS1

Specification
Parameters

Components

(1) Water1

(2) Water2 (optional)

(3-7) Tracer1-Tracer5 (optional)

Phase condition and its state name and index

(1) Gas, GAS

(2) Aqueous, AQU

(3) two-phase, AQG

(4) Supercritical, SUP

Primary variables

Optional process modeling

Molecular diffusion, Vapor pressure lowering, Wellbore simulation, Biodegradation reactions, and non-isothermal simulation.

The initial phase conditions can be figured out from the value of primary variables. It is also allowed users to input phase state name as part of the initial condition.

The phase diagnostic procedures are as follows. For single-phase points the temperature is monitored, and the corresponding saturation pressure is compared with actual fluid pressure P. For a vapor (liquid) point to remain vapor (liquid), we require that P < Psat (P > Psat); if this requirement is violated, a transition to two-phase conditions takes place. The primary variables are then switched, and these are initialized as Pg = Psat(T), Sg = 0.999999 if the point was in the vapor region, and Sg = 0.000001 if it was in the liquid region. For two-phase points Sg is monitored; we require that 0 < Sg < 1 for a point to remain two-phase. If Sg < 0 this indicates disappearance of the gas phase; the primary variables are then switched, and the point is initialized as single-phase liquid, with T taken from the last Newton-Raphson iteration, and P = 1.000001 × Psat(T). For Sg > 1 the liquid phase disappears; again the primary variables are switched, and the point is initialized as single-phase vapor, with T taken from the last Newton-Raphson iteration, and P = 0.999999 × Psat(T). Note that in these phase transitions we preserve temperature rather than pressure from the last iteration. This is preferable because in most flow problems temperature tends to be more slowly varying than pressure. The diagnostic procedures for supercritical state is based on the system temperature, pressure condition, and water density. The regions and the phase condition are showing in Figure 14. Table 5 shows the conditions for phase transition.

Table 5. Phase transition conditions for supercritical state

Original phase condition
New phase condition
Phase transition Criteria

Gas

Supercritical

Liquid

Supercritical

(1) T>Tcrit, P>Pb, or

Two-phase

Supercritical

(1) P>Pcrit or

Supercritical

Gas

Supercritical

Two-phase

Supercritical

Liquid

In the table 5, Pcrit and Tcrit are critical pressure and temperature respectively, Pb is the pressure on the boundary between regions Gas and Super Critical at given a temperature, and Psat is saturation pressure.

  1. Thermodynamic Formulation

All water properties (density, specific enthalpy, viscosity, saturated vapor pressure) are calculated either from the steam table equations as given by IFC-67 (the International Formulation Committee, 1967) or by the IAPWS-IF97 (International Association for the Properties of Water and Steam, 2007) and the IAPWS-95 (International Association for the Properties of Water and Steam, 2002).

For water in subcritical condition, the IFC-67 equations are sufficient. The formulation includes subregion 1 (subcooled water below T = 350 ˚C), subregion 2 (superheated steam), and subregion 4 (saturation line up to T = 350 ˚C). In these regions, density and internal energy are represented within experimental accuracy. Viscosity of liquid water and steam are represented to within 2.5 % by correlations given in the same reference. For details of the formulation, its accuracy and range of validity, refer to the original publication. Vapor pressure lowering from capillary and adsorption effects is considered; thus, in two-phase conditions vapor pressure is equal to saturated vapor pressure of bulk liquid. TOUGH4 also allows using IAPWS-IF97 or IAPWS-95 for the calculation.

The IAPWS-95 formulation currently serves as the international standard for water’s thermodynamic properties. The operational range for IAPWS-95 has been tested and accepted by the International Association for the Properties of Water and Steam (IAPWS) for up to 1000°C and 100 MPa. The IAPWS-IF97 formulation is a separate, faster formulation based on IAPWS-95, and maintained for industrial use. IAPWS-IF97 is accepted by IAPWS for up to 800°C and 100 MPa, and for up to 2000°C for pressure at or below 50 MPa. Both the IAPWS-95 and IAPWS-IF97 formulations can be extrapolated to extremely high temperatures and densities above the operational limit tested by IAPWS (Magnusdottir and Finsterle, 2015; Yamazaki and Muto, 2004). Three options to select the thermodynamic formulation are available in EOS1: (1) IFC-67, which is only valid for subcritical conditions, (2) IAPWS-IF97, or (3) IAPWS-95 for temperature above or equal to 800°C, and IAPWS-IF97 for temperature below 800°C. For the last option, IAPWS-95 is not used for the whole temperature range because IAPWS-IF97 is significantly faster; IAPWS-IF97 has been accepted by IAPWS to accurately approximate IAPWS-95 within 800°C and 100 MPa.

The IAPWS-IF97 formulation is given in terms of regions nominally defined as liquid, vapor, supercritical, two-phase, and high temperature vapor as shown in Figure 14. Regions 1, 2 and 5 in Figure 14 are individually covered by a fundamental equation for the specific Gibbs free energy given in terms of pressure and temperature. Region 3 is covered by a fundamental equation for the specific Helmholtz free energy and is given in terms of density and temperature. Region 4, i.e., the saturation curve, is given by a saturation-pressure equation. The primary variables need to be switched when a region boundary is crossed. An iterative process is used to calculate the thermodynamic variables at the end of every time step and when a region boundary is crossed, the iteration is stopped on a boundary point between the two regions. In EOS1, that boundary point is chosen by projecting the initially calculated new state point vertically onto the boundary to preserve the new temperature. An exception has to be made as described by Croucher and O’Sullivan (2008), because the boundary between the liquid and supercritical regions is vertical (see Figure 14). Thus, the boundary point is determined by preserving density for transitions from supercritical to liquid, and by maintaining pressure for transitions from liquid to supercritical. The boundaries of the regions for the IAPWS-IF97 formulation are chosen arbitrarily; they are different from the true phase boundaries. Thus, if the temperature and pressure is above the critical point, the corresponding region in Figure 14 might be vapor with pressure and temperature being used as primary variables, although the true phase is supercritical. The boundary between regions 1 and 3 is at 350°C, the boundary between regions 2 and 5 is at 800°C, and the boundary between regions 2 and 3 is defined by a so-called B23-equation as described by Wagner et al. (2000). It is not necessary to identify the exact location of the boundaries when using EOS1, because the initial conditions can be given in terms of pressure and temperature for all phases. If the IAPWS-IF97 formulation is used above its operational limit, region 5 in Figure 14 is extrapolated. Region 5 can be extrapolated to high temperatures and pressures but extrapolating region 2 gives inaccurate thermodynamic properties (Magnusdottir and Finsterle, 2015a).

The IAPWS-95 formulation is given by the fundamental equation for the specific Helmholtz free energy. The primary variables are density and temperature for the entire state space. Thus, iterative function inversions are required when using IAPWS-95 outside of the supercritical region. Detailed procedures for density and internal energy calculation in these regions using IAPWS-95 can be found in Magnúsdóttir and Finsterle (2015b).

  1. Specific input requirements

There is no many special input requirements for EOS1. The only optional input specifically required for EOS1 are IE(33) and IE(111):

IE(33) Performs supercritical water simulation

0: on.

1: off, supercritical water is neglected and treated as high temperature vapor.

IE(111) Selects thermodynamic formulation

0: IFC-67, for subcritical condition only

1: IAPWS-IF97

2: IAPWS-IF97 for T<800 oC^oCoC; IAPW95 for T >=800 oC^oCoC;

It is also allowed to use the MOP2(11) for the selection of thermodynamic formulation. IE(111) and MOP2(11) are equivalent.

See

T>350 , P>Pb

(2) 350<T<Tcrit and P>Psat

T>350 , and

(2) PPcrit and sg 0 or sg 1.0

T 350 , density<113.6127 kg/m3

T 350 , density>113.6127 kg/m3 and density<574.67 kg/m3

T 350 , and density 574.67 kg/m3

For the input of IE array, user may refer to Keyword "".

7️⃣
oC^oCoC
oC^oCoC
oC^oCoC
≤\le≤
≤\le≤
≥\ge≥
≤\le≤
oC^oCoC
≤\le≤
oC^oCoC
≤\le≤
oC^oCoC
≥\ge≥
SELEC
Table 19
MODDE.3
MODDE
TRACR
Figure 14. The regions of phase condition used in EOS1