Federal University of Santa Catarina Centro Tecnológico Departamento de Engenharia Mecânica Coordenadoria de Estágio do Curso de Engenharia Mecânica CEP 88040-970 - Florianópolis - SC - BRASIL www.emc.ufsc.br/estagiomecanica [email protected]

INTERNSHIP REPORT – 2/3 Período: de 10/21/2010 a 12/10/2010

The University of Texas at Austin – Center for Petroleum and Geosystems Engineering

Intern: Bruno Terêncio do Vale Supervisor: Prof. Kamy Sepehrnoori, Ph.D. Advisor: Prof. Clovis Raimundo Maliska, Ph.D.

Austin, TX, 12/13/2010. Executive Summary

For the end of the month of October, the study of the papers and reports necessary to implement the discrete fracture model in the UTCHEM simulator continued. This review included a more specific analysis of UTCHEM and GPAS, in addition to the discretization of both the mass balance and pressure equations. During the month of November, the implementation of the discrete fracture model for a 2D case in the UTCHEM simulator began and continued during early December. The discretization of both the pressure equation and the mass balance equations were discussed with Ali Goudarzi, a graduate student, and Dr. Marcondes, specifically on issues like mobility, compressibility, and the relationship between the concentration in the matrix and that in the fracture.

Introduction

As discussed in the previous report, an extensive review was necessary in order to be able to implement the discrete fracture model in the UCTHEM simulator. In September, this research included broader subjects, such as the FORTRAN 90, the IMPEC method, and the discrete fracture model. The study conducted in October, however, focused on more specific themes, such as the EbFVM part of the code in the UTCHEM simulator. A review of all the concepts involved in the implementation of the discrete fracture model was conducted through the end of October. The month of November was dedicated to beginning this implementation, and more specifically, to perform the necessary adaptations in the pressure equation. This ensures that the effects of the fracture are considered, if they exist. During the implementation, various issues were discussed with Dr. Marcondes and Ali Goudarzi, such as how to calculate the total compressibility of the fracture as well as its permeability and mobility. Also during the month of November, a wider study of the mass balance equation was carried out in order to consider the terms that must be added to account for the fracture effects. Besides the representation of flow and dispersion, another point arises in the mass balance equation. That is, the derivative of the concentration per pore volume in the fracture in relation to the concentration per pore volume in the matrix. The implementation of this equation began in early December. At the same time, the analysis of mesh generators and post- processing programs continued. Normally, the mesh generator used in CPGE to create the unstructured meshes is the GID program. Therefore, this software was installed to generate some example meshes, in order to understand the program and be prepared to create the meshes for the validation cases. For that understanding, the available GID mesh generator tutorial was executed. In the meantime, however, a discussion with Dr. Marcondes has yielded the possibility of using the ANSYS ICEM CFD program instead of the GID as the mesh generator. This switch would be mainly due to both the difficulty of generating a 3D mesh with the representation of fractures and the fact that in the GID the way the fractures are represented in the file (just by the nodes) can lead to the possibility of a fracture to be set at a wrong edge.

Approach

At the end of the month of October and early November, the discretization of the mass balance and pressure equations was performed. For this step, a discussion with Ali Goudarzi confirmed an idea of implementing a 2D case first, in order to become familiar with the implementation process. Figure 1 – Representation of a fracture in a control volume cell in a 2D case

As discussed above, the month of November was dedicated mainly to the implementation of the fracture balance equations. The pressure equation is

np  n p  n P   骣    骣  cv fC1 +炎 lK 籽 P = - 炎琪 l K 籽 g h + 炎 琪 l K 籽 P + Q , t( rTc1) 琪邋 rlc l 琪 rlc cl 1 k t 桫l=1 桫 l = 1 k = 1

where f is the media porosity, Ct is the total compressibility, lrlc is the  relative mobility, lrTc is the total relative mobility, K is the intrinsic permeability tensor, h is the vertical depth, g l is the phase specific weight, Pcl1 is the capillary pressure for the aqueous phase, ncv is the total number of volume-occupying components, and Qk is the injection or production for component k . For a 2D case, the discretization of this equation for the fracture leads to

n n n n n n-1 n P P P- Pp 轾 P - P ncv n ( 1)i- ( 1 ) i L( 1) j( 1) i( cl 1) j( cl 1 ) i L fi(C t) e+ l rTc, f K f e =邋 l rlc , f K f犏 e + Q k f e , f i f Dt2 Ll=1犏 L k = 1 2 臌 where f represents the value of the property for the fracture, i and j indicate the nodes, and L is the distance between the nodes i and j . The properties without the index depend only of the phase and the component or are considered the same for both media. That equation was implemented for the most part, but some points still need to be addressed: • How to represent the total compressibility in the fracture. It was decided to perform the trial and error method for two different approaches so far, one using the same compressibility of the matrix and another neglecting the rock compressibility in the total compressibility. • How to work with the permeability of the fracture. At this time, all the fractures have the same constant permeability in the software GPAS, described by Wang, et al. (1997; 1999). For the implementation in UTCHEM, an identical assumption will be utilized initially. • How to calculate the mobility in the fracture. This will be similar to what was conducted with the matrix; in other words, the mobility will be calculated based on the Corey-type model, using the upwind scheme. The main difference between the mobility in the fracture and the one in the matrix is due to the discontinuity of the saturation in both medias, which reflects directly in the relative permeability. The mass balance equation is expressed in terms of the overall

k ~ volume of component per unit pore volume (C k ) as

np  骣 ~  轾  fCk r+炎 r Cu - D = R , 琪 k犏 k( kl l kl) k t 桫 臌l=1

where Rk is the source term, np is the number of phases, rk is the density of pure component k , and Ckl is the concentration of component k in l ~ phase . The term C k is the sum over all the phases, including the adsorbed phases:

n ~骣 ncv ^p ^ Ck=琪1 -邋 C k S l C kl + C k , 桫 k=1 k = 1

^ where Sl is the phase saturation, and is the adsorbed concentration of Ck species k . The dispersive flux term is assumed to have a Fickian form and the velocity term is

  k K   rl 籽 ul= -( P l -g l h), ml

where Pl is the phase pressure, krl is the relative permeability, and ml is the phase viscosity. After the discretization on the fracture, the mass balance equation is given for

n+1 n ~ 轾骣~ 骣 ~ 骣 Ck C k 琪C k 犏琪- 琪 n n np 骣 轾  n 桫 犏桫mi 桫 m i LC K (Pl) - ( P l ) h- h  L ff臌 r e+ r琪 -kl rl K犏 j i - g j i - D � n e(R ) e if ~ k k琪 f l kl k f 骣 Dt2l=1 ml 犏 L L i 2 琪C k 桫 臌 桫 m

As mentioned previously, the mass balance equation was studied in more detail in November. In early December, its implementation began. In UTCHEM, there is a file solely with that function, which accounts for the effects of tracers and multiple adsorptions, among other things. The flux and the dispersive terms began to be analyzed in order to accurately represent them in the fractures (where there is one less dimension). It is in the mass balance equation, as well, that the main difference between the matrix and fracture equations appears. The lack of continuity in the saturation level between fracture and matrix has to be accounted on the temporal derivative. To do so, the chain rule can be applied; hence, writing the fracture equation as a function of the matrix

骣~ 琪C k 桫 concentration. However, a new term f needs to be calculated, 骣~ 琪C k 桫 m where m represents the value of the property for the matrix and, as aforementioned, f represents the value of the property for the fracture.

~ The term C k is calculated with information from the saturations and the equilibrium between phases; so, the derivative can have a value other than one. For the first implementation, the relation between the saturations will be derived from the equality between the capillary pressures. In addition, the volumetric fraction will be assumed equal in both the fracture and the matrix, which will lead to a relationship between the concentrations per pore volume in both medias. In relation to the mesh generator, the main tutorials were executed in order to understand how the software works. The main concern right now is how the fractures are represented in the GID. Offering just the nodes as information of the fractures can result in a misleading representation. This occurs, for example, if in a 2D case a fracture passes by two of the three edges of a triangle element. All of the nodes of the element have to be accounted for in the mesh file, which leads to the consideration that there are fractures in all three edges. It was this concern, together with the difficulty of generating a 3D mesh with the fracture representations, which led to a discussion about the use of the ANSYS ICEM CFD program instead of the GID as the mesh generator. However, for now, the GID remains the main mesh generator.

Future Work Most of the goals for the months of October and November were achieved. For the month of December, the implementation of both the mass balance and pressure equations in the UTCHEM code is expected to continue. Since this initial step is completed, the other necessary steps, such as reading the fracture data in the mesh file (geometry) and in the UTCHEM input file (properties) will be performed. With regard to the mesh generator program, Dr. Marcondes sent a batch of GID that he created to generate the extra information related to the fractures in the mesh file, in a 2D case. He is waiting for a license to use the ICEM to analyze whether or not that program is a more appropriate choice as the mesh generator. For now, other examples will be created in the GID program to improve our knowledge of this software and its capabilities.

References

1. Karpinski, L. “UTCHEM – EbFVM User’s GUIDE (Based on UTCHEM 9.9 User’s GUIDE),” Center for Petroleum and Geosystems Engineering – CPGE, The University of Texas at Austin, Austin, TX, 2009. 2. Karpinski, L., Maliska, C. R., Marcondes, F., Delshad, M., Sepehrnoori, K. “An Element Based Conservative Approach Using Unstructured Grids in Conjunction with a Chemical Flooding Compositional Reservoir Simulator,” XX International Congress of Mechanical Engineering - COBEM, Gramado, RS, Brazil, 2009. 3. Marcondes, F., Varavei, A., Sepehrnoori, K. “An Element-Based Finite-Volume Method Approach for Naturally Fractured Compositional Reservoir Simulation,” 13th Brazilian Congress of Thermal Sciences and Engineering – ENCIT, Uberlândia, MG, Brazil, 2010. 4. Monteagudo, J. E. P., Firoozabadi, A. “Control-Volume Method for Numerical Simulation of Two-Phase Immiscible Flow in Two- and Three-Dimensional Discrete-Fractured Media,” Water Resources Research, Vol. 40, 2004. 5. UTCHEM-9.0. “Technical Documentation for UTCHEM-9.0 - A Three- Dimensional Chemical Flood Simulator,” Volume II, Reservoir Engineering Research Program, Center for Petroleum and Geosystems Engineering – CPGE, The University of Texas at Austin, Austin, TX, 2000. 6. UTCHEM-9.0. “User’s Guide for UTCHEM-9.0: A Three-Dimensional Chemical Flood Simulator,” Volume I, Reservoir Engineering Research Program, Center for Petroleum and Geosystems Engineering – CPGE, The University of Texas at Austin, Austin, TX, 2008. 7. Wang, P., Yotov, I., Wheeler, M. F., Arbogast, T., Dawson, C., Parashar, M., Sepehrnoori, K. “A New Generation EOS Compositional Reservoir Simulator: Part I – Formulation and Discretization,” Paper SPE 37979 presented at the SPE Reservoir Simulation Symposium, Dallas, TX, 1997. 8. Wang, P., Balay, S., Sepehrnoori, K., Wheeler, J., Abate, J., Smith, B., Pope, G. A. “A Fully Implicit Parallel EOS Compositional Simulator for Large Scale Reservoir Simulation,” Paper SPE 51885 presented at the SPE 15th Reservoir Simulation Symposium, Houston, TX, 1999.