PROCEEDINGS, Thirty-Eighth Workshop on Geothermal Reservoir Engineering Stanford University, Stanford, California, February 11-13, 2013 SGP-TR-198 A NUMERICAL ANALYSIS ON FLOW IN HYDROTHERMAL SYSTEMS Larus Thorvaldsson and Halldor Palsson University of Iceland Hjardarhaga 2-6 Reykjavik, 101, Iceland lth31@hi.is, halldorp@hi.is ABSTRACT In this paper it is examined how writing specialized codes within the OpenFOAM software framework is applicable to problems involving hydrothermal systems. This is done with two case studies. In the first one, the continuity of mildly compressible flow is stabilized using Fréchet derivatives, enabling the use of very large time steps or treating it as steady state. The second one involves the phase change of water, due to sudden drop in pressure at the top of a water column. The physical properties are determined from the IAPWS-IF97 thermodynamic formulation, which is directly compiled into OpenFOAM. It is also demonstrated how the software framework is able to handle the numerical instabilities that are caused by the discontinuities in physical properties in the phase change region. Both cases demonstrate how the modular nature of the OpenFOAM can be utilized to solve specialized problems involving hydrothermal systems and are validated by analytical solutions. INTRODUCTION Numerical simulation of hydrothermal systems has played an important role in the modeling of geothermal reservoirs for the past decades. For researchers it has been used to test competing hypothesis in these complex data-poor environments and in industry numerical simulation has become standard practice in the planning and management of the development of geothermal fields [O’Sullivan, 2001]. The earliest efforts to apply numerical models to geothermal reservoirs were made in the early 1970's, while the usefulness of numerical modelling did not begin to gain acceptance by the geothermal industry until after the 1980 Code Comparison Study [Stanford Geothermal Program, 1980]. Since that study was performed, the experiences gained in carrying out site-specific studies as well as generic reservoir modeling studies have led to a constant improvement in the capabilities of numerical reservoir models. Numerical modeling of hydrothermal systems is often defined by which components of the system are taken into account. Traditionally they have been divided into hydrological (H), thermal (T), mechanical (M) and chemical (C). Those components are coupled together in a way that is inherently multiscale in nature, such that their temporal and spatial scales vary be several orders of magnitude [Ingebritsen et al., 2010]. Because of the complex nature of those couplings, models involving all four components are rare. The equations that describe hydrothermal systems are sufficiently complex so that they can only be solved analytically, for a highly idealized set of initial and boundary conditions. Such cases usually only involve one of the four (HTMC) components, where the Theis problem is an example thereof [Theis, 1935]. Some analytical solutions also exists for two components, such as the description of a boiling front moving through a porous medium [Pruess and Celatis, 1987] and the advance of a diffused salt water wedge in a confined aquifer [Henry, 1964]. These analytical solutions are very important in validating numerical models that are supposed to handle more complicated problems. In order to model realistic hydrothermal systems, numerical models are needed. The current generation of numerical simulators is able to account for multi- phase, multi-component flow. The most versatile are software packages such as Finite Element Heat and Mass Transfer (FEHM) [Keating et al., 2002] and the Transport of Unsaturated Groundwater and Heat (TOUGH) family of codes [Pruess, 1991]. These solvers have been applied to a wide variety of problems, such as CO 2 sequestration, geothermal studies and other environmental issues [Ingebritsen et al., 2010]. Other solvers are more specialized, such as the Complex Systems Modeling Platform (CSMP++)