STOMP

Description of Variables

Principal Variables

The STOMP simulator has been designed with the principal variables defined in common blocks, which are included in nearly all subroutines. This approach reduces the number of arguments that are passed between routines and increases the readability of the code, because variable names remain unchanged between routines.

A list of common variables can be found here.

Info

General information about principal variables

  • Variable names remain unchanged between routines.
  • The STOMP simulator has been coded without equivalence statements and no variables are temporarily overwritten to save memory.
  • Variable names generally follow the intrinsic protocols for FORTRAN 77, where:
    • integer variables begin with letters in the range 'I-N' 
    • real valued variables begin with letters in the ranges 'A-H' and 'O-Z.
    • variables that begin with the letter 'L' generally indicate integer parameters.

Field Variables

Field variables are defined at node points and are represented with two-dimensional arrays. 

Examples of field variables include:

  • primary unknowns, saturation properties, rock/soil properties, and thermo­dynamic properties (e.g., temperature, pressure, phase saturation, porosity, density, and viscosity). 

The first index of a field variable indicates the time step or increment status. 

The second index of a field variable indicates the node number. The dimension of the first index depends on the operational mode or equivalently number of coupled flow equations; where the dimension will equal the number of unknowns plus two. Therefore, field variables at each node comprise a number of elements equal to the number of unknowns plus two. Each element for each field variable contains a variant on the field variable. For example, the first element or index contains the value of the field variable at the previous time step. A list of field variable variants is shown in Table 1.

Table 1. Field Variable Indexing Scheme

IndexDescription
1 Previous time step value
2 Current iteration or time step value
3 First primary variable incremented
4 Second primary variable incremented
5 Third primary variable incremented
6 Fourth primary variable incremented


The primary variable order and corresponding field variable variant indexing depend on the opera­tional mode. However, primary variables are always ordered, regardless of the operational mode, according to the following equation sequence: energy, water mass, unique component masses to the operational mode, and salt mass. The primary variable ordering system for each operational mode is listed in Table 2. Primary variables are referred to by equation in Table 2, because primary variables for a given equation and operational mode are dependent on the local phase condition. Refer to the STOMP Theory Guide (White and Oostrom, 2000) for a description of primary variables, phase conditions, and variable switching. Consider an example for the STOMP-WA (Water-Air) Operational Mode, which solves the water mass and air mass conservation equations. For this operational mode, there would be four field variable variant indices. Using the aqueous saturation for an unsaturated node as the example field variable, the following variant definitions would apply: the first index would refer to the aqueous saturation at the previous time step, the second index would refer to the aqueous saturation at the current iteration or time step value, the third index would refer to the aqueous saturation with the aqueous pressure incremented, and the fourth index would refer to the aqueous saturation with the gas pressure incremented.

Table 2.  Primary Variable Sequencing Scheme

Operational ModeEquation 1Equation 2Equation 3Equation 4Equation 5Equation 6Equation 7Equation 8Equation 9
STOMP-W Water                
STOMP-WAE Energy Water Air            
STOMP-WS Water Salt              
STOMP-WASE Energy Water Air Salt          
STOMP-WAS Water Air Salt            
STOMP-WO Water Oil              
STOMP-WOA Water Air Oil            
STOMP-CO2 Water CO2 Salt            
STOMP-CO2E Energy Water CO2 Salt          
STOMP-COMP Energy Water CO2 Salt          
STOMP-EOR Energy Water CO2 CH4 Petroleum Component(s) Salt      
STOMP-EOR-BO Water Gas Oil Salt          
STOMP-OS Energy Molar Density Oil H2 CO CO2 CH4 C2 C3
STOMP-HYD Energy Water CO2 CH4 Salt        
STOMP-HYDT-KE Energy Water Mobile CO2    Mobile CH4  Mobile N2 Hydrate CO2    Hydrate CH4  Hydrate N2 Salt

Flux variables

Flux variables are defined on node surfaces between node points or on boundary surfaces and are represented with two dimensional arrays. Examples of flux variables include heat fluxes, Darcy phase velocities, and component diffusion/dispersion fluxes. Flux variables are aligned with one of the primary orthogonal coordinate directions. Flux variables names that begin with the character 'U' are aligned with the x- or radial-direction coordinate, those which begin with the character 'V' are aligned with the y- or azimuthal-direction coordinate, and those which begin with the character 'W' are aligned with the z‑direction coordinate. The first index of a flux variable indicates the increment status and the second index indicates the surface number. Unlike field variables, previous time-step fluxes are not stored. Surface numbers do not correspond directly to node numbers. The number of surfaces in any given coordinate direction equals the number of nodes in that direction plus one.

A list of the flux variable variants is shown in Table 3. The primary variable order and corre­sponding field variable variant index depend on the operational mode. In Table 3, the upper node refers to the node in the east, north, or top direction (positive x-y-, or z-direction) with respect to the surface. Likewise, the lower node refers to the node in the west, south, or bottom direction (negative x-y-, or z‑direction) with respect to the surface. Consider an example for the STOMP-WA (Water-Air) Opera­tional Mode, which solves the water mass and air mass conservation equations. For this operational mode, there would be five flux variable variant indices. Using the z-direction aqueous Darcy velocity for an unsaturated node as the example field variable, the following variant definitions would apply: the first index would refer to the aqueous Darcy velocity for the current iteration or time step value, the second and third indices would refer to the Darcy velocity with the aqueous pressure in the “top” and “bottom” nodes incremented, respectively; and the fourth and fifth indices would refer to the Darcy velocity with the gas pressure in the “top” and “bottom” nodes incremented, respectively.

Table 3. Flux Variable Indexing Scheme

IndexDescription
1 Current iteration or time step value
2 First primary variable in the upper node incremented
3 First primary variable in the lower node incremented
4 Second primary variable in the upper node incremented
5 Second primary variable in the lower node incremented
6 Third primary variable in the upper node incremented
7 Third primary variable in the lower node incremented
8 Fourth primary variable in the upper node incremented
9 Fourth primary variable in the lower node incremented

 

  

STOMP User Guide Home