## Numerical methods for modeling geothermal energy extraction

##### Abstract

Modeling of flow in porous media is an important scientific research area, and has been so for decades. It is also one of the major topics within applied mathematics. Models for flow in porous media are for example important in the oil industry, in groundwater hydrology and in geothermal energy extraction. In this thesis we are building both a mathematical and a numerical geothermal model. To understand the processes that happens in geothermal reservoirs far below the earth's surface, good models are needed. The long term reservoir behavior is important when the economical feasibility of a geothermal project is determined. Good models are needed to determine the long term behavior.
To model flow in porous media, there are several steps that needs to be done. The first step is to obtain and understand the background knowledge, such as theory from reservoir mechanics, that is needed to build a model. Some of this knowledge is common for all the different topics that use flow in porous media models. Other parts of the theory are more specific and connected to an application. When sufficient knowledge has been obtained, the next step is to use it to create a mathematical model for flow in porous media. When this has been done, it is time to implement a numerical model that is based on the mathematical model.
To obtain a numerical model, it is common to discretize the continuous model expressions in the mathematical model. We try to retain the essential properties of the continuous model expressions when we discretize them. Discretizing model expressions often leads to a linear system that can be solved by numerical equation solvers. The main focus in this thesis is the discretization of the equation terms, both spatial and in time. We will use a finite element method to spatially discretize the diffusion term in our model equations. A finite difference method will be used to discretize the advection term in space. An equation term can be solved with either explicit or implicit time discretization. When a term is solved explicitly it is solved at the start of each time step, using the the previous equation values. Solving the term implicitly, the term is calculated at the end of each time step. We will try to create an adaptive strategy that decides which terms that should be solved with explicit time discretization.
The thesis is split into 6 chapters. Chapter 1 will work as a background for the rest of the thesis, and is dedicated to geothermal energy extraction. As we build a model for geothermal energy extraction, it is important to have some knowledge of how a geothermal reservoir works. In Chapter 2 we will go through the theory from reservoir mechanics that is relevant for this thesis. We will explain the terms porous media, porosity, representative elementary volume, permeability, homogeneity, and isotropy. We will also explain Darcy's law and the general conservation law. At the end of the chapter we will look at the similarities and differences between the physical properties enthalpy and temperature.
The mathematical model is built on a local and a reservoir scale conservation law for enthalpy, and we create this model in Chapter 3. We see our reservoir as blocks of rock, with fractures that are filled with water between them. The local conservation law will model the heat transfer in one block and the fractures near it. To do this we will split the block up into layers, and...