You are on page 1of 73

M.Sc.

Thesis

Fluid Flow in
Fractured Reservoirs
Febrian Asrul
Equation Chapter 1 Section 1
(this page is intentionally left blank)
Fluid Flow in Fractured Reservoirs
By

Febrian Asrul

in partial fulfillment of the requirements for the degree of

Master of Science
in Applied Earth Science

at the Delft University of Technology,


to be defended publicly on Monday, August 22, 2016, at 10:00 AM

Supervisors: Prof. Dr. W.R. Rossen TU Delft


J. Gong, MSc. TU Delft

Thesis committee: Prof. Dr. W.R. Rossen TU Delft


J. Gong, MSc. TU Delft
Prof. Dr. G. Bertotti TU Delft

An electronic version of this thesis is available at http://repository.tudelft.nl/.

Fluid Flow in Fractured Reservoirs i


Title : Fluid Flow in Fractured Reservoirs

Author : Febrian Asrul


(Student Number: 4407385)

Assessment Committee
Prof. Dr. W.R. Rossen Principle Advisor, Chair of Committee
W.R.Rossen@tudelft.nl Professor and Chair of Petroleum Engineering Section
Department of Geoscience and Engineering
Faculty of Civil Engineering and Geosciences
Delft University of Technology

J. Gong, MSc. Daily Supervisor, Committee Member


J.Gong@tudelft.nl Ph.D. Candidate in Petroleum Engineering Section
Department of Geoscience and Engineering
Faculty of Civil Engineering and Geosciences
Delft University of Technology

Prof. Dr. G. Bertotti Committee Member


G.Bertotti@tudelft.nl Professor and Chair of Applied Geology Section
Department of Geoscience and Engineering
Faculty of Civil Engineering and Geosciences
Delft University of Technology

Copyright 2016

All rights reserved. No parts of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the Section for
Petroleum Engineering, Department of Geoscience and Engineering, Delft University of Technology.

Fluid Flow in Fractured Reservoirs ii


Abstract
Naturally fractured reservoirs (NFRs) are important because they hold a significant quantity of
oil reserves. Researchers build reservoir simulators to help them studying and predicting NFR
performance. Some of them use the dual-porosity concept in their reservoir simulator, where the
model consists of two continua: matrix and fracture. Fluid transport between matrix and fracture
is defined by a parameter which is known as the shape factor. It describes the geometry of a
characteristic matrix block surrounded by fractures. Commercial reservoir simulator accounts for
only one average shape factor for each simulation grid block, which is calculated from fracture
spacing. However, one grid block may contain a collection of matrix blocks and variable fracture
spacing.

Our study objective is to evaluate whether published methods to compute an average shape
factor for a collection of matrix blocks give a good approximation to recovery from that collection
of blocks; we use the solution to the heat-conduction equation to determine this. Our work is
based on the knowledge that the heat-conduction equation is identical to the pressure-diffusion
equation under certain assumptions. Recently, a simple method to calculate the dimensionless
temperature in a collection of rectangular objects of different sizes has been created. We test
the methods of calculating shape factors with collections of matrix blocks that represent, at least
approximately, the distribution of matrix-block shapes that Gong and Rossen (2014) found in
their study of discrete fracture networks (DFN).

Our work starts by converting statistics for a DFN, as reported by Gong and Rossen, into an
orthogonal fracture set. We generate five realizations to approximate the DFN and simulate
remaining oil in place as a function of time for these realizations. We then compare the
remaining oil we calculate to that estimated using three methods in the literature: the methods of
Vermeulen, Warren and Root, and Lim & Aziz. We calculate shape factor based on average
fracture spacing from each realization.

From this study, we can conclude that Vermeulen method, coupled with equivalent fracture
spacing, can approximate oil production in a region with variable fracture spacing with an
acceptable accuracy. Specifically, it stays within a few percent of cumulative recovery until
about 70% of oil is recovered.

Fluid Flow in Fractured Reservoir iii


Acknowledgement
I praise to God Almighty for all of His countless blessing and protection.

I would like to express my sincere gratitude to my advisor, Prof. Rossen, for all of his
knowledge, patience, and feedbacks. His guidance helped me during the working and writing of
this thesis. My gratitude also goes to Jiakun Gong, my daily supervisor, who encourages me for
many times and helps me with fruitful discussions. My sincere thank also goes to Prof. Bertotti
for participating in my assessment committee.

I would like to thank Indonesia Endowment Fund for Education (Lembaga Pengelola Dana
Pendidikan/LPDP) for supporting my education through the scholarship program during the 2-
years master program.

I would like to dedicate my two years effort, especially this thesis, to my beloved sons and wife.
Thank you for your love and keeping me constantly motivated. I also thank my dear parents for
their endless prayers and encouragement; you are my source of inspirations. I would also thank
my brothers and sisters for all of their humble supports.

I would like to gratitude my best friends in Petroleum Engineering and Geoscience, who
supported me and were present in my ups and downs. You are treasures to me and thank God I
found you. My appreciation also goes to my relatives and colleagues for their care during my
study in the Netherlands.

Fluid Flow in Fractured Reservoirs iv


Table of Contents
Abstract...................................................................................................................................... iii
Acknowledgement...................................................................................................................... iv
Table of Contents........................................................................................................................ v
List of Figures ............................................................................................................................ vi
List of Tables ............................................................................................................................ vii
1. Introduction.................................................................................................................. 1
1.1. Background.................................................................................................................. 1
1.2. Objective ...................................................................................................................... 2
1.3. Problem Statement ...................................................................................................... 2
2. Literature Study ........................................................................................................... 4
2.1. Naturally Fractured Reservoirs: Definition, Modeling, and Simulation .......................... 4
2.2. Shape Factor Definition ............................................................................................... 6
2.3. Dimensionless Temperature Solution........................................................................... 7
2.4. A Simple Solution for Unsteady State Heat Conduction and its Use to Determine Oil
Recovery ..................................................................................................................... 9
2.5. Remaining Oil Calculation for a Collection of Matrix Sizes ..........................................11
1. Vermeulen method .....................................................................................................11
2. Warren and Root method ...........................................................................................12
3. Lim and Aziz method ..................................................................................................12
3. Methodology ...............................................................................................................14
3.1 Convert DFN data to orthogonal shapes of matrix.......................................................14
3.2 Remaining Oil calculation............................................................................................14
4. Results and Discussion ..............................................................................................16
4.1. Convert DFN data to orthogonal shapes of matrix.......................................................16
4.2. Remaining oil calculation ............................................................................................20
5. Conclusion and Future Work ......................................................................................25
Nomenclature ...........................................................................................................................26
References ...............................................................................................................................27
Appendix A - Workflow in Converting DFN to Orthogonal Fractures Shape ..............................29
Appendix B - Sensitivity checks on methods for determining characteristic fracture spacing .....35
B. 1. Introduction .................................................................................................................35

Fluid Flow in Fractured Reservoir v


B. 2. Methodology ...............................................................................................................36
B. 3. Result and Discussion ................................................................................................37
B. 4. Conclusion ..................................................................................................................37
Appendix C - Profile of for Idealized Shapes by Varying Number of Angles and Scanlines ....39
Appendix D - Matlab Scripts Used in This Study .......................................................................47

List of Figures
Figure 1 Idealization of the heterogeneous porous medium (Source: Warren and Root, 1963) .. 4
Figure 2 One-dimensional flow of fluid flow in simulation techniques (Source: Dean and Lo,
1988) ......................................................................................................................................... 5
Figure 3 Illustration of Finite Thickness Slab .............................................................................. 8
Figure 4 Illustration of Finite Thickness Fracture ........................................................................ 8
Figure 5 Dimensionless Temperature Profile in a slab of thickness 2b (Source: Transport
Phenomena 2nd Ed., Bird et al., 2002) ........................................................................................ 9
Figure 6 Dimensionless Temperature Profile for various shapes (Source: Fysische
Transportverschijnselen, Akker and Mudde, 2008) .................................................................... 9
Figure 7 Van der Valks approximate solution vs. Analytical solution .........................................10
Figure 8 Comparison around point Fo = 0.05 ............................................................................10
Figure 9 Illustration of Multidimensional Solutions by the Product Method ................................11
Figure 10 Illustration of the objective of the workflows...............................................................14
Figure 11 Cumulative Area Fraction for Log Lc ..........................................................................16
Figure 12 Cumulative Area Fraction for Log Rc .........................................................................16
Figure 13 Matrix - Fracture Setting ............................................................................................17
Figure 14 Cumulative Area Fraction for Log Lc ..........................................................................17
Figure 15 Cumulative Area Fraction for Log Rc .........................................................................17
Figure 16 Matrix - Fracture Setting ............................................................................................17
Figure 17 Cumulative Area Fraction for Log Lc ..........................................................................18
Figure 18 Cumulative Area Fraction for Log Rc .........................................................................18
Figure 19 Matrix - Fracture Setting ............................................................................................18
Figure 20 Cumulative Area Fraction for Log Lc ..........................................................................19
Figure 21 Cumulative Area Fraction for Log Rc .........................................................................19
Figure 22 Matrix - Fracture Setting ............................................................................................19
Figure 23 Cumulative Area Fraction for Log Lc ..........................................................................19
Figure 24 Cumulative Area Fraction for Log Rc .........................................................................19
Figure 25 Matrix - Fracture Setting ............................................................................................20
Figure 26 Remaining Oil Curves for Realization 1 .....................................................................20
Figure 27 Remaining Oil Curves for Realization 2 .....................................................................21
Figure 28 Remaining Oil Curves for Realization 3 .....................................................................21
Figure 29 Remaining Oil Curves for Realization 4 .....................................................................21
Figure 30 Remaining Oil Curves for Realization 5 .....................................................................22

Fluid Flow in Fractured Reservoirs vi


Figure 31 Remaining Oil Curve of Modified W&R for Realization 1 ...........................................23
Figure 32 Remaining Oil Curve of Modified W&R for Realization 2 ...........................................23
Figure 33 Remaining Oil Curve of Modified W&R for Realization 3 ...........................................23
Figure 34 Remaining Oil Curve of Modified W&R for Realization 4 ...........................................23
Figure 35 Remaining Oil Curve of Modified W&R for Realization 5 ...........................................24
Figure 36 Flowchart in Determining Lx and Ly............................................................................30
Figure 37 Choosing the Values of Lx and Ly (Part B-1) ..............................................................31
Figure 38 Choosing the Values of Lx and Ly (Part B-2) ..............................................................32
Figure 39 Choosing the Values of Lx and Ly (Part B-3) ..............................................................33
Figure 40 Illustration of Fracture Spacing (L1, L2, and L3) ..........................................................35
Figure 41 Illustration on How the Method of Scanlines Applied to Square Matrix Shape.
Scanlines Need not be Perpendicular to the Fractures..............................................................36
Figure 42 Beta vs. Number of Imaginary Lines and Angles for Rectangular Shape ...................39
Figure 43 Examples of Scanlines Survey and Rotation for Rectangular Shapes .......................40
Figure 44 Beta vs. Number of Imaginary Lines and Angles for Square Shape ..........................41
Figure 45 Examples of Scanlines Survey and Rotation for Square Shapes...............................42
Figure 46 Beta vs. Number of Imaginary Lines and Angles for Random Shape ........................43
Figure 47 Examples of Scanlines Survey and Rotation for Random Shapes .............................44
Figure 48 Beta vs. Number of Imaginary Lines and Angles for Infinite Fractures Shape ...........45
Figure 49 Examples of Scanlines Survey and Rotation for Infinite Fractures Shapes ................46

List of Tables
Table 1 Rock and Fluid Properties Used in the Calculation .......................................................15
Table 2 Summary of Characteristics from 5 Realizations ..........................................................16
Table 3 Overall Workflow for Each Realization..........................................................................33
Table 4 Summary of the Results ...............................................................................................37

Fluid Flow in Fractured Reservoirs vii


1| Introduction
Naturally fractured reservoirs (NFRs) are important because they hold a significant quantity of
oil reserves. Researches are conducted for decades and many findings proposed, but this topic
still leaves many questions because of its complexity.

Researchers build reservoir simulators to help them studying and predicting NFR performance.
Some of them use the dual-porosity concept in their reservoir simulator where the model
consists of two continua: matrix and fracture. In this concept, flow through the fracture network
is represented by fracture permeability. Compared to single-porosity models, where flow
conducts only in the matrix, dual-porosity models account for flow in the fractures and flow from
the matrix to fractures. Fluid transport between matrix and fracture is defined by a parameter
which is known as shape factor. It represents the geometry of matrix block surrounded by
fractures. Many studies have sought the best way to represent the shape factor (Warren and
Root, 1963; Kazemi et.al., 1976; Coats, 1989; Chang, 1993; Lim and Aziz, 1995).

Commercial fractured-reservoir simulators account for one average shape factor for each
simulation grid block, which is in principle derived from fracture spacing. It can even be specified
as a single value for the whole field (ECLIPSE Technical Description, Schlumberger, 2013).
However, one grid block may contain a collection of matrix blocks and variable fracture
spacings. This raises the question, how accurate is the oil recovery curve, calculated using an
average shape factor, for a collection of matrix blocks of different sizes. In this study, we would
like to evaluate this question.

We assume a simplified representation of an NFR with a well-connected fracture network that is


much more permeable than the matrix. It has two sets of fractures which are perpendicular to
each other. There is only single-phase flow in the system. In our case, oil flows out from matrix
blocks, where almost all the oil resides, into surrounding fractures and then flows through
fractures to well. Oil in this system always stays above the bubble-point pressure, and there is
no flow of water, as it stays at residual saturation. All the rock and fluid properties are constant
and uniform.

1.1. Background
The background of this study includes the following factors:
1. Application of shape factor in commercial fractured-reservoir simulators.
Commercial reservoir simulators account for one average shape factor for each simulation grid
block, which is in principle derived from fracture spacing. However, one grid block may contain a
collection of matrix blocks and variable fracture spacings.
2. The heat conductivity equation is similar to the pressure diffusivity equation.
Bird et al. (2002) in their book explain the equation for unsteady-state heat conduction in a solid
as the following expression:

T
2T (1.1)
t

Fluid Flow in Fracture Reservoir 1


K
(1.2)
C p

where is the thermal diffusivity of the solid; T is temperature [K]; t is time [s]; K is thermal
conductivity of a solid material [[W/(m.K)]; p is heat capacity of a solid material [J/(Kg.K)]; and
is density [kg/m3]. The pressure diffusivity equation for unsteady pressure-driven flow of a
slightly compressible fluid has a similar form to equation (1.1), which is expressed in equation
(1.3), which is re-arranged from what is written by Matthew and Russel (1967). In this case, is
the hydraulic diffusivity:

p
2 p (1.3)
t
k
(1.4)
c

where p is pressure [Pa]; k is permeability [m-2]; is fluid viscosity [Pa.s]; and c is fluid
compressibility [Pa-1]. Specifically, the flow problem is exactly analogous to a heat-conduction
problem for an object shaped like the matrix block.

3. A simple method to calculate the dimensionless temperature in a collection of


rectangular objects of different sizes has been created.
A simple method, reported by Van Der Valk (2015) in his bachelor thesis, has been created to
calculate the dimensionless temperature in a collection of rectangular objects of different sizes.
We can use this method to solve for oil recovery from a collection of matrix blocks of various
sizes and shapes.

1.2. Objective
Our objective is to evaluate whether published methods to compute an average shape factor for
a collection of matrix blocks give a good approximation to recovery from that collection of
blocks; we will use the solution to the heat-conduction equation to determine this. We will test
the methods of shape factors with collections of matrix blocks that represent, at least
approximately, the distribution of shapes that Gong and Rossen (2014) found in their DFN
study.

Understanding that shape factor is a function of fracture spacing, we intend to study how
fracture spacing is calculated. Thus, as a separate study, we also examine how sensitive
methods for determining characteristic fracture spacing in the field are to the direction and
number of scanlines, i.e. imaginary lines that intersect consecutive fractures.

1.3. Problem Statement


We would like to investigate the accuracy of the oil recovery curve, calculated using an average
shape factor, for a collection of matrix blocks of different sizes.

This report consists of 5 chapters. Chapter 2 reviews definitions and background knowledge
from the literature. Chapter 3 talks about the methodology which is used. The discussion is

Fluid Flow in Fractured Reservoirs 2


presented in Chapter 4. Chapter 5 contains conclusions and suggested future work. Our
evaluation of how sensitive methods for determining characteristic fracture spacing in the field
are to the direction and number of the scanline is written in Appendix B. All of our calculations
are conducted by using Matlab software, which the representative of the scripts is presented in
Appendix D.

Equation Chapter (Next) Section 1

Fluid Flow in Fractured Reservoirs 3


2| Literature Study
2.1. Naturally Fractured Reservoirs: Definition, Modeling, and Simulation
Studying the presence of fractures in our reservoir and characterizing them is important. Saidi
(1981) pointed out that a fractured reservoir is a system formed by intercommunicating pores
and channels, where the pores form the matrix system and the channels the fracture system.
Fracture systems have contact with the matrix, and oil that resides in the matrix will be delivered
to the producing well using the fracture system. Nelson (2001) defines a fractured reservoir as
a reservoir in which naturally occurring fractures either have, or are predicted to have, a
significant effect on reservoir fluid flow either in the form of increased reservoir permeability
and/or reserves or increased permeability anisotropy. By identifying the presence of fractures
and predicting its effect on production performance through reservoir simulation, we could
propose a proper field development strategy. In the end, an optimum development strategy
could bring benefits.

Researchers have investigated NFR for decades. Barenblatt et al. (1960) introduced the basic
idea to account the existence of two strata in the fractured rocks. In their report, they use the
term fissures. In their report, matrix blocks as the first stratum are separated by a fracture
system as the second stratum. Each point in the stratum should have its average liquid pressure
definition (P1 and P2). Fractures have high permeability but very low porosity. The second
stratum is the matrix blocks, which have greater porosity but low permeability. They also
consider the existence a transport of liquid between strata/continua.

Warren and Root (1963) applied the concept of double-porosity to analyze their well test data.
They developed their idealized model to simulate the fluid flow behavior in NFR where they
proposed a concept named the sugar-cube model and an analytical solution of continuity
equations in NFR. Figure 1 illustrates their idealization of a fractured reservoir as a sugar-cube
model.

Figure 1 Idealization of the heterogeneous porous medium (Source: Warren and Root, 1963)

By assuming a quasi-steady state exists in the reservoir and assuming single-phase flow, they
define the following equation that must be satisfied in the matrix volume:

Fluid Flow in Fractured Reservoirs 4


dpm k
m cm
dt


p f pm (2.1)

where subscripts m and f stand for matrix and fracture respectively; is porosity. Parameter is
the shape factor and will be explained subsequently. The concept of double porosity, also called
dual-porosity (DP), is widely used in the industry. In a DP system, oil flows to the well through
the fracture network from the matrix because the matrix permeability is of much less magnitude
than the fractures.

The other approach of modeling NFR is dual-porosity dual-permeability (DPDK). In this model,
oil could flow to the well through conductive fractures, similar to DP, as well as through
conductive matrix. As we account the fluid flow in the matrix, we are adding another complexity
in the fluid-flow calculation which means adding computation cost. Figure 2 illustrates how DP
and DPDK work compared to a single-porosity model, where only flow through matrix exists.

Figure 2 One-dimensional flow of fluid flow in simulation techniques (Source: Dean and Lo, 1988)

The third approach is a discrete fracture network (DFN). It relies on the three-dimensional
spatial mapping of fracture planes to construct an interconnected network of fracture surfaces
(Gilman, 2003). It could honor the connectivity and heterogeneity of fractured reservoirs more
than the first two models. The problem is that the computation would take very much time since
it considers many fracture connections. To integrate the advantages of conventional simulation
approaches but still keeping the reservoir complexity that is being captured by DFN, some
investigators try to couple DFN model with DP (Dershowitz et al., 1998, 2000).

In their study, Gong and Rossen (2014) define shape factor as a function of characteristic length
(Lc) and characteristic radius (Rc). Their definition of Lc is the following:

1
Lc (2.2)
Fs
1 n Aj (2.3)
Fs
Vm
d
j 1 j

Fluid Flow in Fractured Reservoirs 5


where Fs is shape factor [m-2]; Vm is matrix block volume [m3]; n refers to the total number of the
matrix blocks faces that is open to imbibition; j refers to one matrix block face; Aj is the area of
face-j; and dj is the distance from face-j to the center of the matrix block. For a single 2D
rectangular matrix block of size (Lx x Ly), we can express Lc as follows:

1
Lc
1 1 (2.4)
4 2 2
Lx Ly

where Lx and Ly are the fracture spacing in x and y-direction respectively. Rc for 2D system will
be calculated based on the following formulation:

2Sm
Rc (2.5)
Lm
where Sm is the area of the matrix block and Lm is the perimeter of the block. For a single
rectangular matrix block, Rc is defined as follows:

2 Lx Ly Lx Ly
Rc (2.6)
2 Lx 2 Ly Lx Ly

2.2. Shape Factor Definition

Many investigators extended Warren and Roots DP reservoir simulator, including their definition
of shape factor. It reflects the geometry of the matrix and represents flow between the two
continua in the NFR. Warren and Root define shape factor as follows:

4n(n 2)
(2.7)
l2

where n is number of normal sets of orthogonal fractures (1, 2 or 3), and l (characteristic
dimension of heterogeneous region) can be estimated from the surface-volume ratio:

3abc
l for n 3
ab bc ac
2ab (2.8)
l for n 2
a b
l a for n 1

where a, b and c are the distance between fractures in the three perpendicular fracture sets.
Kazemi et al. (1976) extended Warren and Roots formulation for two phases and three-
dimensional NFR systems. In their study, they define their shape factor as the following

Fluid Flow in Fractured Reservoirs 6


expression:

1 1 1
4 2
2 2 (2.9)
Lx Ly Lz

They derived it from a finite-difference formulation where L is defined as the width of the matrix
block in the three directions. In their reservoir simulator, they assume a uniform pressure and
saturation within the grid block even if the grid block contains more than one matrix block. Coats
(1989) defined his shape factor as:

1 1 1
8 2
2
2 (2.10)
Lx Ly Lz

His shape factor is defined based on a pseudo-steady-state assumption. Chang (1993)


proposed a shape factor which assumed a transient condition. This assumption leads his shape
factor to a time-dependent function. His shape factor converges asymptotically to the pseudo-
steady state shape factor after a certain time. Lim and Aziz (1995) derived another definition of
shape factor which is similar to Changs after pseudo-steady state is reached. They define it as
expressed in equation (2.11) for an isotropic rectangular system:

1 1 1
2 2
2
2 (2.11)
Lx Ly Lz

Lim and Aziz reported that their expression of shape factor is similar to Changs expression.

2.3. Dimensionless Temperature Solution

The solution for unsteady heat conduction in solids can be approached in several ways,
depending on its boundary and initial conditions. By introducing dimensionless parameters,
equation (1.1) can also be rewritten as:

1 d
2 (2.12)
dt
T1 T
(2.13)
T1 T0

The analytical solution for equation (2.12) for a finite slab, as illustrated in Figure 3, is as follows:

1 exp n 1 2 2 t cos n 1 y
n
T1 T
2 2 2
T1 T0 n 0 n 2
1 b2 b (2.14)

where n is the number of summation term; y is the location between the surface of the slab (y =
b) to the center of the slab (y = 0).

Fluid Flow in Fractured Reservoirs 7


solid matrix fracture

T0
T1 Pi
Pf

b b b b

L L
Figure 3 Illustration of Finite Thickness Slab Figure 4 Illustration of Finite Thickness Fracture

The solution can be plotted as presented in Figure 5. For earlier times, the system is acting as if
it is a semi-infinite slab. For semi-infinite slab, the solution can be expressed by the following
equation:

T1 T y
1 erf (2.15)
T1 T0 4 t

Akker and Mudde (2008) plot the solution for average temperature and for various shapes as
seen in Figure 6. Their definition of Fourier number (Fo = t/D2) is four times the dimensionless
time of Bird et al., since D = 2b. Carslaw and Jaeger (1959) wrote the analytical solution for
average temperature as the following expression:

T1 T
exp n 1 2 2 t 2
8

2
TD (2.16)
T1 T0 n 0 2n 1
2
2 b

Fluid Flow in Fractured Reservoirs 8


Figure 5 Dimensionless Temperature Profile in a slab of
thickness 2b (Source: Transport Phenomena 2nd Ed., Bird et
al., 2002)

Figure 6 Dimensionless Temperature Profile for various


shapes (Source: Fysische Transportverschijnselen, Akker
and Mudde, 2008)

2.4. A Simple Solution for Unsteady State Heat Conduction and Its Use to
Determine Oil Recovery

Van Der Valk (2015) reported a simple and powerful solution to solve for unsteady state heat
conduction in a slab. Using a curve-fitting method, he proposed the solution for dimensionless
temperature (TD) as the following:

T1 T
TD 1 c1 Fo , Fo < 0.05 (2.17)
T1 T0

T1 T
TD c2 exp c3 Fo , Fo 0.05 (2.18)
T1 T0

where c1 = 2.2474, c2 = 0.8074 and c3 = -9.816. Variable Fo (Fourier Number) is a function of


slab thickness (2b). This approximation is very accurate. We tested the accuracy by comparing
his correlation (named Van der Valk) with the analytical solution in Figure 7 and Figure 8.

Fluid Flow in Fractured Reservoirs 9


Figure 7 Van der Valks approximate solution vs. Analytical Figure 8 Comparison around point Fo = 0.05
solution

Figure 7 shows the difference is less than 5% for Fourier Number smaller than 0.9. The
difference is significantly smaller (less than 0.34 %) if we zoom to the points where the
discontinuity between two intervals exist (Fo = 0.05). The relative error is large at long times
because the magnitude is so small. The absolute magnitude of the error is the greatest for Fo =
0.05. As shown in Figure 8, it is everywhere less than 0.005. This method is very powerful
because it significantly reduces calculation times.

Van der Valk (2015) also developed an algorithm to calculate dimensionless temperature (TD) of
a collection of rectangular objects of various sizes. Working in the 2D system, his algorithm
employs multidimensional solutions by product method (White, 1988). By using this approach,
TD for a 2D shape is a product of two finite-slab solutions. For example, TD for a rectangular
shape (2D) as illustrated in Figure 9a is a product of two TD values from two perpendicular finite
slabs (Finite slab 1 and 2). For a collection of many rectangles, we need to define the
sizes/spacing for each rectangle in both axes. TD of the collection will be the weighted average
of TD for individual shapes, weighted by the area of each object.

Fluid Flow in Fractured Reservoirs 10


Finite Slab-1

Finite
b2 Slab-2
L2 L2
b2

L1

b1 b1
L1
(a) (b)

Figure 9 Illustration of Multidimensional Solutions by the Product Method

As mentioned earlier, the solution of the heat-conduction equation is similar to the pressure-
diffusivity equation. We can generate the same solution for dimensionless pressure as is solved
for dimensionless temperature, which is expressed in equation (2.14). For a similar system,
which is illustrated in Figure 4, the analytical solution for average matrix pressure in a matrix
block is expressed by the following equation:

p f pm
8 n 1 2 2 t
exp
p f pm n 0 2n 1
2 2 2
b2 (2.19)

Because volume is linearly related to pressure for a slightly compressible fluid, the expression in
the LHS of equation (2.19) can be regarded as the fraction of remaining oil in the system. In the
early life of this reservoir, the pressure in the matrix is equal to the pressure in the fracture.
When pressure in the fracture (pf) instantaneously changes to another constant value and
creates a drawdown, oil starts to flow through the fracture to producing well. By knowing the
remaining oil in the system, we can generate an oil-recovery curve. By using the algorithm
proposed by Van der Valk (2015), we can calculate remaining oil in a system for a collection of
matrix sizes.

2.5. Remaining Oil Calculation for a Collection of Matrix Sizes

There are several approaches that we can use to calculate the average-dimensionless-pressure
curve as a function of shape factor. Three of them are the following:

1. Vermeulen Method

Zimmerman et al. (1993) reported a semi-analytical method in his paper to approach the
analytical solution of the diffusivity equation. They used a sphere as an example of their study
case. Furthermore, they also suggest this method could be applied to different shapes. Their
method starts with an analytical pressure response in a sphere as expressed by equation (2.20)
.

Fluid Flow in Fractured Reservoirs 11


pm p f 6 1 n 2 km 2
pm p f
1
2 n1 n2
exp 2 t
cm am
(2.20)

where am is the radius of the sphere. They define shape factor () as 2/(am)2. They also
approximate equation (2.20) to a simpler form used by Vermeulen (1953), as expressed by
equation (2.21).
1
pm p f km 2

1 exp t (2.21)
pm p f cm

To work with rectangular shape, we need to employ other definitions of shape factor. Equation
(2.9) and (2.10) can be taken the options.

2. Warren and Root Method

Zimmerman et al. (1993) also reported another semi-analytical method which originated from
Warren and Roots (1963) expression for average matrix pressure as expressed in equation
(2.22). The solution is expressed by equation (2.23).

dpm x f , t k
m cm
dt


p f pm (2.22)
pm p f km
1 exp t (2.23)
pm p f cm

In their paper, they assumed their matrix block as a sphere with shape factor () = 2/(am)2. To
work with a different shape of a matrix block, we need to employ other definition of shape factor.
We can start with the definition that Warren and Root had suggested, which is expressed in
equation (2.8).

3. Lim and Aziz Method

Lim and Aziz (1995) proposed equation (2.24) as a solution for pressure of matrix block which is
surrounded by one set of fractures, i.e. the same configuration as Figure 4. For isotropic 3D
matrix blocks, they derived the analytical solution as expressed in equation (2.25). They
proposed that the first term of summation series in equation (2.25) could represent the infinite
summation alone. So, for an extended period, they suggested equation (2.26) to represent
equation (2.25).

pm pi 8
1 2n 12 2 kmt
p f pi
1 2


n 0 2n 1
2
exp
m cm L2


(2.24)

Fluid Flow in Fractured Reservoirs 12


pm pi 8
3
1 2 k t 1 1 1
1 2 exp 2
m
2 2 2 (2.25)
p f pi 2 1 2 1 2 1 m cm Lx Ly Lz
2 2
0 0 0

pm pi 8
3
2 k t 1 1 1
1 2 exp m
2 2 2 (2.26)
p f pi m cm Lx Ly Lz

Because Lim and Aziz define their shape factor as equation (2.11) for isotropic and rectangular
matrix blocks of dimension Lx, Ly and Lz, equation (2.26) can be simplified to acquire the
following correlation:

pm pi km
3
8
1 2 exp t (2.27)
p f pi m cm

Equation Chapter (Next) Section 1

Fluid Flow in Fractured Reservoirs 13


3| Methodology
In this study, we do the following works to achieve our objective:

3.1 Convert DFN Data to Orthogonal Shapes of Matrix

From Gong and Rossens study (2014), we have 2960 values of characteristic length (Lc) and
characteristic radius (Rc) each for a collection of matrix blocks. Based on this data, we would
like to convert this shape to a spacing of orthogonal fractures set as illustrated in Figure 10. This
new shape should consist of various fracture spacings in the x and y directions (respectively Lx
and Ly).

Ly
1 DFN grid Desired Outcome Lx

Figure 10 Illustration of the objective of the workflows

This work is divided into two parts. The first part is determining 2960 of Lx and Ly from 2960
values of Rc and Lc, and then choosing among these a set of Lx and Ly values that fits into our
choice of grid dimension. Our new grid has a dimension of 74 x 40, so we choose 74 values of
Lx and 40 values of Ly. Details of the workflow on how we generated realizations of grids are
presented in Appendix A.

3.2 Remaining Oil Calculation

The main input for the calculation is as follow:


a. Grid properties: cell size or fracture spacing for x-axis and y-axis (Lx and Ly respectively)
b. Rock and fluid properties
c. Total simulation time and time step

We calculate dimensionless pressure and generate remaining oil curve by using the following
four methods:
1. Van der Valk (D)
2. Vermeulen (V)
3. Warren and Root (W&R)
4. Lim and Aziz (L&A)

In the V, W&R and L&A methods, a single shape factor is calculated as a representative of the
entire collection of matrix blocks. For the V method, shape factor is calculated based on

Fluid Flow in Fractured Reservoirs 14


equation (2.9) for 2D system, which is expressed as follow:

1 1
4 2
2 (3.1).
Lx Ly

For W&R method in 2D system, shape factor is calculated based on equation (2.7) and (2.8),
and expressed as follows:

32
2
2 Lx Ly (3.2)

Lx Ly

For the L&A method in a 2D system, shape factor is calculated based on equation (2.11), and
expressed as follow:

1 1
2 2
2 (3.3)
Lx Ly

The fracture-spacing for these equations is calculated based on an arithmetic-average fracture


spacing for each axis, the x and y-axis. This method is similar to what Dershowitz et al. (2000)
did to determine fracture spacings in their study. In this study, we are using a dimensionless
time scale which is defined as:


tD t
(3.4)
2
min Lx , Ly
where <Lx> and <Ly> are the arithmetic average values of Lx and Ly, respectively. As an input
for production simulation, rock and fluid properties in this study are summarized in Table 1:
Table 1 Rock and Fluid Properties Used in the Calculation

Parameter Unit
Permeability, k m 18.6 x 10-15
Porosity, - 0.1392
Viscosity of oil, o Pa.s 0.04
Compressibility of oil, co Pa-1 2.18 x 10-10

Equation Chapter (Next) Section 1

Fluid Flow in Fractured Reservoirs 15


4| Results and Discussion
4.1. Convert DFN Data to Orthogonal Shapes of Matrix
In approximating DFN data, we generated five realizations. All of the following realizations are
acquired by a workflow which is explained in Appendix A. The differences among these
realizations are the matching parameters and the multiplier. Their characteristics are
summarized in Table 2.
Table 2 Summary of Characteristics from 5 Realizations

Matrix Block Grid


Realization Lx min Lx max Ly min Ly max Length Width Total Area
2
[mm] [mm] [mm] [mm] [m] [m] [m ]
1 1.93 90.65 0.12 4.39 1.86 0.05 0.09
2 0.40 880.16 17.76 801.18 17.95 7.65 137.38
3 13.16 5986.21 11.84 445.08 119.28 4.93 587.73
4 0.26 285.96 0.12 3.55 2.14 0.05 0.10
5 1.31 2056.87 21.91 619.87 11.81 8.53 100.77

Each realization gives a reasonable match to either the Lc or Rc distribution of the DFN results
of Gong and Rossen (2014), as described below.

1. Realization 1
The matching parameter in this realization is the characteristic length as presented in Figure 11.
The fracture setting is shown in Figure 13.

Figure 11 Cumulative Area Fraction for Log Lc Figure 12 Cumulative Area Fraction for Log Rc

Fluid Flow in Fracture Reservoir 16


Figure 13 Matrix - Fracture Setting

2. Realization 2
In this realization, we use multipliers, a different value for each axis. The matching parameter is
the characteristic radius, as presented in Figure 15. The fracture set is shown in Figure 16.

Figure 14 Cumulative Area Fraction for Log Lc Figure 15 Cumulative Area Fraction for Log Rc

Figure 16 Matrix - Fracture Setting

Fluid Flow in Fractured Reservoirs 17


3. Realization 3
In this realization, we use multipliers, same values for both axes. The matching parameter is the
characteristic radius as shown in Figure 18. The fracture set is provided in Figure 19.

Figure 17 Cumulative Area Fraction for Log Lc Figure 18 Cumulative Area Fraction for Log Rc

Figure 19 Matrix - Fracture Setting

4. Realization 4
The matching parameter is the characteristic length, and the matching result is presented in
Figure 20. The fracture set is provided in Figure 22.

Fluid Flow in Fractured Reservoirs 18


Figure 20 Cumulative Area Fraction for Log Lc Figure 21 Cumulative Area Fraction for Log Rc

Figure 22 Matrix - Fracture Setting

5. Realization 5
In this realization, we use multipliers, a different value for each axis. The matching parameter is
the characteristic radius, and the matching result is presented in Figure 24. The fracture set is
presented in Figure 25.

Figure 23 Cumulative Area Fraction for Log Lc Figure 24 Cumulative Area Fraction for Log Rc

Fluid Flow in Fractured Reservoirs 19


Figure 25 Matrix - Fracture Setting

All of the realizations match either Lc or Rc, so all the orthogonal fractures settings that we
generated can approximate the characteristics of the original DFN grid in one or the other
distributions. We have difficulty in matching both parameters, so that none of our realizations
could match both parameters. When we have to choose, we prefer to have a good match with
Rc to have a better capture the production characteristics. Physically, Rc reflects the thinnest
dimension, which should control the speed of the depletion scenario.

Each realization then goes into the remaining-oil calculation.

4.2. Remaining Oil Calculation


The remaining oil (PD) calculation is done by using four different methods. The results are
presented in Figure 26 to Figure 30. Dimensionless time (tD) is calculated by using equation
(3.4).

(a) y-axis scale is 0.01 - 1 (b) Expanded y-axis scale 0.1 - 1


Figure 26 Remaining Oil Curves for Realization 1

Fluid Flow in Fractured Reservoirs 20


(a) y-axis scale is 0.01 - 1 (b) Expanded y-axis scale 0.1 - 1
Figure 27 Remaining Oil Curves for Realization 2

(a) y-axis scale is 0.01 - 1 (b) Expanded y-axis scale 0.1 - 1


Figure 28 Remaining Oil Curves for Realization 3

(a) y-axis scale is 0.01 - 1 (b) Expanded y-axis scale 0.1 - 1


Figure 29 Remaining Oil Curves for Realization 4

Fluid Flow in Fractured Reservoirs 21


(a) y-axis scale is 0.01 - 1 (b) Expanded to y-axis scale 0.1 - 1
Figure 30 Remaining Oil Curves for Realization 5

We consider the result of the D method approximates the real oil remaining profile in NFR. The
results of the W&R and the L&A method deviate away from the D method from early times. The
result of the L&A method implies significant oil production in the first instant of its production,
which is unrealistic. The result of the W&R method approximates the D methods result better
than the L&A. It could deviate roughly up to 15% in the early times and greater at late times.
Nevertheless, the V method gives a good approximation to the result of the D method,
especially at early times. It deviates at the later times like the other two methods. In most of the
realizations, a significant deviation between the D and V curves starts at remaining oil around
30 to 40%. Regarding recovery factor, by this time about 70% of oil in the grid is already
extracted.

All three methods calculate oil remaining by approximating the various sizes of matrix block as a
single size cell in single grid. By doing this, some bigger size matrix blocks will be replaced by
the smaller size and vice versa. As the production starts, all the oil in or near the edges of the
matrix blocks will be extracted. For small matrix block sizes, most of the oil is already being
extracted at early times; meanwhile bigger blocks require more time to release all of the oil
inside. This condition makes the production of the D method curved at the late times and slower
than the methods assuming uniform matrix blocks. Of the three methods, the V method gives
the best fit. It approximates the true behavior until about 70% of the oil is recovered. At longer
times, all the approximations fail, but by then most of the oil is recovered.

To investigate the effect of lumping all matrix blocks into one average shape factor, we
introduce another method, which is modified from the Warren and Root method (M W&R). In
this method, each matrix block has its individual shape factor, and the pressure difference is
calculated per matrix block individually. Pressure difference for entire grid is a summation of
individual matrix block, weighted by block area. Our approach is similar to Whites method of
multidimensional solutions by product method (White, 1988) where dimensionless pressure
(PD) for each area is a product of its PD for x-axis and y-axis as if each of them is a finite
thickness slab. The equations are given in equation (4.1) to (4.3). Equation (4.1), which is re-
written from equation (2.23), expresses remaining oil calculation (PD) for flow in the x direction

Fluid Flow in Fractured Reservoirs 22


and the shape factor is for a single system where x = 1/Lx2. Since we are working with 2D
object, the total PD is the product of PD for the x-axis and y-axis, as expressed further in equation
(4.3)

pm pm
pD , x exp x t (4.1)
pm p f
pD,rectangle pD, x pD, y exp xt exp y t exp xy t (4.2)
1 1
xy
L2x L2y (4.3)

Figure 31 Remaining Oil Curve of Modified W&R for Figure 32 Remaining Oil Curve of Modified W&R for
Realization 1 Realization 2

Figure 33 Remaining Oil Curve of Modified W&R for Figure 34 Remaining Oil Curve of Modified W&R for
Realization 3 Realization 4

Fluid Flow in Fractured Reservoirs 23


Figure 35 Remaining Oil Curve of Modified W&R for
Realization 5

This method allows for a range of different block sizes, but it still approximates the recovery
process as an exponential decay. The production profile of the MW&R method approximates
the D method nicely for the entire period in three of the cases but deviates at long times in two
cases. However, this method is not applicable to use with commercial fractured-reservoir
simulators since it requires a separate calculation for each matrix block. DP simulation only
requires one average shape factor for a simulation grid block.

Fluid Flow in Fractured Reservoirs 24


5| Conclusion and Future Work
From this study, we draw the following conclusion:
1. Van der Valks method is accurate enough compared with the analytical solution for
unsteady flow.
2. Vermeulen method coupled with equivalent fracture spacings can approximate the
dimensionless pressure profile in a block which has a collection of fracture spacings as
being calculated from Van der Valks method with an acceptable accuracy. Specifically,
it stays within a few percent of cumulative recovery until about 70% of oil is recovered.
This point answers our study objective.
3. The Modified Warren and Root method has the best approximation to Van der Valks
method because it honors varying matrix block sizes, but this method is not suitable to
be used in the commercial fractured-reservoir simulator, which requires one shape factor
for each grid block.

This study can be extended to the following points:


1. Finding better correlations that could fit the whole production life and consider secondary
recovery in addition to primary recovery.
In this study, we approximate about 70% of production life. An extended study may be
required to find a correlation or a method that could have a better approximation, and
even consider secondary recovery process.
2. Finding an alternative workflow for converting DFN data to orthogonal shapes of matrix.
A more rigorous workflow with different approaches, constraints or steps may needed to
investigate. Our method of converting DFN data involves iterative guessing in matching
the realization to the original data. An improved Matlab scripts may be required to do the
matching automatically, so that the investigator does not have to guess the input
manually in each iteration.

Fluid Flow in Fractured Reservoirs 25


Nomenclature
T = Temperature [K]
t = Time [s]
p = Heat capacity of a solid material [J/(Kg.K)]
K = Thermal conductivity of a solid material [W/(m.K)]
L = Fracture Spacing (in Shape Factor Formula)[m]; Length (as in Characteristic Length)
[m]
R = Radius [m]
Fo = Fourier number [-]
p = Average pressure [Pa]
a,
b, = Length of matrix block (in Warren and Root shape factor formula) [m]
c
k = Permeability [m2]
p = Pressure [Pa]
= Density [kg/m3]
c = Compressibility (of fluid, in diffusivity equation) [Pa-1]
n = number of terms (in infinite summation term); the number of normal sets (in Warren
and Root shape factor formula) [-]
S = Area of matrix block (in Radius characteristic equation)
Fs = Shape Factor [m-2]
= Viscosity [Pa.s]
= Shape factor [m-2]
= Density [kg/m3]
= Thermal diffusivity (In thermal diffusivity equation); Hydraulic diffusivity (in pressure
diffusivity equation)
= Dimensionless Temperature [-]

Subscript

T = Temperature
P = Pressure
f = Fracture
m = Matrix
c = characteristic
x = In x-direction
y = In y- direction
z = In z- direction
1 = the position of temperature in the boundary [In temperature]
0 = the position of temperature in the center of the slab [In temperature]
D = dimensionless
xy = In xy-plane

Fluid Flow in Fractured Reservoirs 26


References
Barenblatt, G.I., Zheltov, I.P., and Kochina, I.N., 1960. Basic Concepts in the theory of seepage
of homogeneous liquids in fissured rocks. J.Appl.Math.Mech. 24: 1286-1303

Bird, R.B., Stewart, W.E., and Lightfoot E.N., 2002. Transport Phenomena 2nd Ed., John Wiley &
Sons, Inc. USA

Carslaw, H.S. and Jaeger, J.C., 1959. Conduction of Heat in Solids, Oxford Science
Publications, Oxford University Press Inc., Oxford, England.

Chang, M., 1993. Deriving the shape factor of a fractured rock matrix. Technical Report NIPER-
696 (DE93000170), NIPER, Bartlesville OK.

Coats, K.H., 1989. Implicit compositional simulation of single-porosity and dual-porosity


reservoirs. Proceedings of the SPE Symposium on Reservoir Simulation, Houston, TX, Feb 6-8.
SPE 18427

Dean, R.H. and Lo, H.H., May 1988. Simulations of Naturally Fractured Reservoirs. SPERE
638-48; Trans.,AIME, 285.

Dershowitz, B., LaPointe,P., Eiben,T., Wei,L., 2000. Integration of discrete feature network
methods with conventional simulator approaches. SPE Reserv. Eval. Eng. 04.

Erdem, U.M., Fast Line Segment Intersection (2010),


http://nl.mathworks.com/matlabcentral/fileexchange/27205-fast-line-segment-
intersection/content/lineSegmentIntersect.m

Gilman, J.R., 2003. Practical Aspects of Simulation of Fractured Reservoirs. A keynote speech
in International Forum on Reservoir Simulation. June 23-27.

Gong, J. and Rossen, W.R., 2014, Shape Factor for Dual-Permeability Reservoir Simulation:
Effect of Non-Uniform flow in Fracture Network. ECMOR XIV 14th European Conference on
the Mathematics of Oil Recovery EAGE, Catania, Italy, 2014.

Hu, L.Y., Allwardt, P.F. and Mclennan, J.A., 2013. Method of calculating a shape factor of a dual
media fractured reservoir model from intensities and orientations of fracture sets for enhancing
the recovery of hydrocarbons. US Patent Application Publication, US20130124162 A1.

Kazemi, H. Merrill, L.S. Jr., Porterfield, K.L. and Zeman, P.R., 1976. Numerical Simulation of
Water-Oil Flow in Naturally Fractured Reservoirs. SPEJ 16 (6): 318-326. SPE-5719-PA.

Lim, K.T. and Aziz, K., 1995. Matrix-fracture transfer shape factors for dual porosity simulators.
J.Pet.Scie.Eng. 13, 169-178.

Fluid Flow in Fractured Reservoirs 27


Matthews, C.S. and Russell, D.G., 1967. Pressure buildup and flow tests in wells. SPE Monogr.,
Vol. I: 2-17.

Nelson, R., 2001. Geologic Analysis of Naturally Fractured Reservoirs. Gulf Professional
Publishing.

Saidi A. M., 1987. Reservoir Engineering of Fractured Reservoirs (Fundamental and Practical
Aspects). Total Edition Presse.

Schlumberger, 2013. ECLIPSE Technical Description Version 2013.2. Schlumberger.

Shephard, M., 2009. Factors influencing recovery from oil and gas fields, in M. Shepherd, Oil
field production geology: AAPG Memoir 91, p. 37 - 46

Warren, J.E. and Root, P.J., 1963. The Behavior of Naturally Fractured Reservoirs. SPEJ 3 (3):
245-255; Trans., AIME,228. SPE-426-PA.

Van den Akker, H. and Mudde, R., 2008. Fysische Transportverschijnselen. VSSD. Delft. The
Netherland.

Van der Valk, D.H., 2015. Heat Conduction Algorithm. Bachelor Thesis. TU Delft. The
Netherlands.

Vermeulen, T., 1953. Theory for irreversible and constant-pattern solid diffusion. Ind. Eng.
Chem. 45 (8): 1664-1670.

Weisstein, Eric W. "Rotation Matrix." From MathWorld--A Wolfram Web Resource.


http://mathworld.wolfram.com/RotationMatrix.html

White, F.M., 1988. Heat and Mass Transfer. Addision-Wesley Publishing company, Inc. USA.

Van Heel A.P.G., Boerrigter P.M., van Dorp, J.J., 2008, Thermal and hydraulic matrix fracture
interaction in dual-permeability simulation. SPE Reservoir Evaluation and Simulation, 11(04),
pp. 735-749.

Zimmerman, R.W., Chen, G. and Bodvarsson, G.S., 1992. A Dual-Porosity Reservoir Model
With an Improved Coupling Term. Proceedings, 7th Workshop on Geothermal Res. Eng. SGP-
TR-141. Jan 29 31.

Equation Chapter 1 Section 1

Fluid Flow in Fractured Reservoirs 28


Appendix A - Workflow in
Converting DFN to Orthogonal
Fractures Shape
We built our orthogonal fractures shape based on two parts that can be elaborated as follows:

A. Determining values of Lx and Ly


In this Part, our objective is to determine 2960 values of Lx and Ly from 2960 values of Lc and Rc
as specified by Gong and Rossen, from these 2960 pairs we can calculate 2960 values of area.
First, we set our constraints as expressed in Equations (A.1) and (A.2) to have a collection of
acceptable values of fracture spacing. Equation (A.2) is arranged based on the denominator of
equation (A.3) and it is constrained so that Ly can be defined as a positive-nonzero-real number.
If it meets the constraint, then we can calculate Ly by using equation (A.3). We generate Lx and
calculate Ly repeatedly for each of the 2960 values of Lc and Rc.

2Rc,min Lx 2Rc,max (A.1)


4
Lx (A.2)
Lc
4 L2x
Ly (A.3)
Lc L2x 4

From these 2960 sets of data, we generate an area-fraction cumulative distribution curve for Lc
and one for Rc, and name this as original cumulative distribution curve. We use area fraction
instead of number fraction because we would like to weigh blocks with larger area because they
contain more oil. The workflow for this part is presented in Figure 36. From Figure 36,
constraint-1 is equation (A.1) and constraint-2 is equation (A.2).

Fluid Flow in Fractured Reservoirs 29


Start Part A

Input:
2960 values of Lc
2960 values of Rc

For i from 1 to 2960. Start the


calculation for i = 1

Guess Lx,i within a range stated


by constraint-1

Calculate Ly,i

No
Check Ly,i.
Meet constraint-2?

Yes
Calculate Area
Areai = Lx,i x Ly,i

Go to
No
next Calculated 2960
element elements yet?
(i = i+1)

Yes

2960 values of Lx, Ly and


Areas

Generate cumulative
distribution curve by area
fraction for Lc and Rc

End Part A

Figure 36 Flowchart in Determining Lx and Ly

B. Choosing the Values of Lx and Ly


From Step-A, we have 2960 values of Lx and Ly. Because our new grid consists of 74 x 40
rectangles, we need to choose 74 values of Lx and 40 values of Ly and store them into two
different matrices. From the matrices, we can calculate 2960 values of areas by multiplying
them and generate a new cumulative-distribution curve accordingly. When the new curve match
to our original cumulative distribution curve, the new grid is consider to have the same
complexity as the original DFN grid of Gong and Rossen. Before we choose the values of Lx
and Ly, we sort 2960 values of Lx and Ly separately and ascendingly. Then, we choose the
values as a whole portion so that we maintain the initial sorting. We check the matching of the
cumulative distribution curves corresponding to the chosen values. Additional iterations are
required to improve the match, by sampling from different parts of the array but still keeping the
initial sorting. The workflow is presented in Figure 37, and it is named as Part B-1. For more
details, a Matlab script, which elaborates our workflow, is presented in Appendix D.

Fluid Flow in Fractured Reservoirs 30


Start Part B-1

Input (from Part A):


2960 values of Lx
2960 values of Ly

Sort elements by
increasing values

Choose 74 values of Lx
and 40 values of Ly

Calculate Area
Area = Lx * Ly

Generate cumulative
distribution curve by area
fraction for Lc and Rc

Check both
No
cumulative distribution
curve. Any match to
original distribution
curve?

Yes
74 values of Lx, 40 values
of Ly and
2960 values of Areas

End Part B-1

Figure 37 Choosing the Values of Lx and Ly (Part B-1)

We generated our realizations 1 and 4 by using Part B-1. We found that we can only match the
cumulative distribution curve for Lc by this way. We could not match the curve for Rc, although
we tried to change our choices of Lx and Ly values for many times. Trying to match Rc, we add
another step, by multiplying our choices of Lx and Ly by a different constant. This modified
workflow of Part B-1 is presented in Figure 38, and we named it as Part B-2.

Fluid Flow in Fractured Reservoirs 31


Start Part B-2

Input (from Part A):


2960 values of Lx
2960 values of Ly

Sort elements by
increasing values

Choose 74 values of Lx
and 40 values of Ly

Multiply all values of Lx


with a constant and all
values of Ly with a
different constant

Calculate Area
Area = Lx * Ly

Generate cumulative
distribution curve by area
fraction for Lc and Rc

Check both
No
cumulative distribution
curve. Any match to
original distribution
curve?

Yes

74 values of Lx, 40 values


of Ly and
2960 values of Areas

End Part B-2

Figure 38 Choosing the Values of Lx and Ly (Part B-2)

By using Part B-2, we generated realizations 2 and 5. The distribution curve of both realizations
could match original distribution curve for Rc. Similarly to Part B-2, we also multiply Lx and Ly by
a constant, but we multiply both parameters by the same value. This workflow is named Part B-
3 and presented in Figure 39. We used Part B-3 to generate realization 3 and matched the
original distribution curve for Rc. Realizations 1, 2 and 3 are generated from the same set of Lx
and Ly values selected from the 2960 values for each. Meanwhile, the other two realizations are
generated from another collection of Lx and Ly values. Complete workflows for all realizations
are summarized in Table 3.

Fluid Flow in Fractured Reservoirs 32


Start Part B-3

Input (from Part A):


2960 values of Lx
2960 values of Ly

Sort elements by
increasing values

Choose 74 values of Lx
and 40 values of Ly

Multiply all values of Lx


and Ly with a constant

Calculate Area
Area = Lx * Ly

Generate cumulative
distribution curve by area
fraction for Lc

Check both
cumulative distribution No
curve. Any match to
original distribution
curve?

Yes

74 values of Lx, 40 values


of Ly and
2960 values of Areas

End Part B-3


Figure 39 Choosing the Values of Lx and Ly (Part B-3)

Table 3 Overall Workflow for Each Realization

Realization Workflow

1 Part B-1
Part A
2 Part B-2
3 Part B-3
4 Part A Part B-1
5 Part B-2

We also try another approach to convert DFN data, which is based on the similarity that both
parameters have. Lc and Rc are functions of Lx and Ly as expressed by equations (2.4) and (2.6)

Fluid Flow in Fractured Reservoirs 33


. So, we can solve this system of equations algebraically. First, we re-arrange equation (2.6) to
become equation (A.4) and then we substitute it into equation (A.3). The result is expressed by
equation (A.5), which is a quadratic equation and can be solved by using the quadratic formula.
For each value of Lc and a value of Rc, we have two values of Lx and Ly. The calculations are
done for 2960 values of Lc and Rc.

Rc Lx
Ly (A.4)
Lx Rc
R L
2
c c 4 L2x 8Rc Lx 4Rc2 0 (A.5)

Not all results are acceptable. There are some results which are imaginary, and some are
negative numbers. We will have an imaginary number if Lx does not meet the constraint
expressed by equation (A.2). Moreover, we have a negative value when the value of Lx is
smaller than the value of Rc as expressed by the denominator in equation (A.4). In the end, we
find only 21 pairs of Lx and Ly that are acceptable. Since this number is way smaller than the
original number of original data sets (2960 sets), we do not use this approach to avoid
eliminating some variability of DFN data.

Equation Chapter (Next) Section 1

Fluid Flow in Fractured Reservoirs 34


Appendix B - Sensitivity checks on
methods for determining
characteristic fracture spacing
B. 1. Introduction

As some of the shape-factor definitions have similar form, Van Heel and Boerrigter (2006)
proposed the following generalization for shape factor for one matrix block:

nd
1
2
(B.1)
k 1 Lk

where nd is the dimensionality or number of orthogonal fracture sets and Lk is the fracture
spacing for that sets. The first term, which is symbolized with , is named as pre-factor; The
second term is named as geometrical factor which is symbolized with a Greek letter beta ()
by Hu et al. (2013). Beta is a function side lengths of matrix block or fracture spacing
(symbolized with L).

Dershowitz et al. (2000) use an imaginary line to determine fracture spacing from DFN grid.
They named the method as multi-directional spacing (MDS). It uses lines in three orthogonal
directions and repeats many times using a Monte-Carlo method. They then insert the average
fracture spacing in a given direction for the corresponding value of Lk.

In our 2D model, fracture spacing is the distance between 2 points of intersection between 2
parallel fractures which are intersected by a scanline. A scanline defines an imaginary line that
intersects consecutive fractures. In this study, orientation is defined as the smallest angle
between the scanline to fracture strike. Figure 40 illustrates fracture spacing (L1, L2, and L3)
between two intersections (A and B, B and C, and C and D respectively).

Fracture

A B C D
Scanline

L1 L2 L3

Figure 40 Illustration of Fracture Spacing (L1, L2, and L3)

Fluid Flow in Fractured Reservoirs 35


The backgrounds of this investigation are as follow:
1. Shape factor formulation is a function of fracture spacing
2. There is a possibility of distortion where strike direction and scanline direction are not
perpendicular
3. There is a possibility that one can only generate a few scanlines in a field investigation
4. A method of determining average fracture spacing for DFN models by using imaginary lines
has been proposed by Dershowitz et al. (2000)

Our objective is to investigate how sensitive the angle between the strike and scanline and
number of scanlines to the value of beta. This study assumes a fairly regular spacing of
fractures on a flat surface.

B. 2. Methodology

We generated and tested four types of shapes that represent a grid which consists of matrix
surrounded with orthogonal fractures. The shapes are: rectangular, square, randomized, and
with only one fracture set. We define randomized shapes by introducing additional non-
orthogonal fractures to the grid. To measure the fracture spacing, we use the scanline method
as illustrated in Figure 41. We vary the number of scanlines and the angles of the scanlines to
see the variability of the geometrical factor/beta (), i.e. its standard deviation. Beta can be
defined by equation (B.1), or, specifically for our 2D models, as

1 1
2
2 (B.2)
Lx Ly

To test how sensitive orientation angle is to beta, we keep the same number of scanlines, i.e.
20, and vary the angle between scanline and the fracture strike. We use three different set of
angles between 0o and 90o: 5, 51 and 101 equally spaced angles. For example, for five angles,
the angles that will be observed are 0o, 23o, 45o, 68o and 90o. To see how sensitive beta is to
scanline number, we vary the number of scanlines and keep the angles the same for every
observation. We use three numbers of scanlines: 2, 20 and 200, while rotating them using the
same 51 angles. The location for each scanline is generated randomly along the axis.

Scanline

Fracture

Figure 41 Illustration on How the Method of Scanlines Applied to Square Matrix Shape. Scanlines Need not be
Perpendicular to the Fractures.

Fluid Flow in Fractured Reservoirs 36


We built our models using Matlab software. The basic idea for measuring fracture spacing
measures the distance between two intersections. Our script employs open-source Matlab script
made by Erdem (2010), which detects the location of the intersection(s). We made some
adjustments to suit his script to our workflow and give fracture spacing as the output. The
scanlines are generated in random locations but still in a certain limit so that when the grid is
rotated there is still a possibility for any scanline passing the grids corner. To make the grid
rotate, we use matrix rotation in our script.

B. 3. Result and Discussion


The result details are presented in Appendix C and summarized in Table 4.
Table 4 Summary of the Results

Shape Angle STD Scanlines STD


5 0.1821 0.0029 2 0.2049 0.0014
51 0.2063 0.0020 20 0.2063 0.0020
Square
101 0.2096 0.0020 200 0.2029 0.0016
STD 0.0150 STD 0.0017

5 0.4331 0.0013 2 0.4635 0.0061


51 0.4701 0.0066 20 0.4701 0.0066
Rectangular
101 0.4708 0.0064 200 0.4682 0.0064
STD 0.0216 STD 0.0034

5 0.2640 0.0020 2 0.2542 0.0020


51 0.2975 0.0013 20 0.2975 0.0013
Random
101 0.2824 0.0007 200 0.2880 0.0097
STD 0.0168 STD 0.0228

5 0.0625 7.66E-27 2 0.0618 1.98E-06


One fracture 51 0.0623 2.91E-07 20 0.0623 2.91E-07
set 101 0.0623 3.14E-07 200 0.0623 2.91E-07
STD 0.0001 STD 0.0003

For each case, we see only a modest variation in beta in Appendix C as long at least five angles
are used. This variation shows that there is a range of possibilities when a scanline intersects
matrix block to measure its spacing. It may intersect the location near to the edge of the matrix
block which may become the smallest spacing or intersect the matrix at its diagonal location
which may become the biggest spacing.

From Table 4, we can see that beta for each shape varies only a little, i.e. the standard
deviation is small as long as at least 5 angles are used. The case where varies least is that
with only one fracture set. The variation of beta is huge (roughly doubling from its minimum to
maximum) if only one angle is used. Therefore it is essential to use multiple angles and
scanlines to obtain accurate estimates.

B. 4. Conclusion
From our investigation, we can draw the following conclusions:

1. Varying fracture orientation and number of scan lines gives little variation in beta, and
therefore little variation in shape factor, as long as multiple angles and scanlines are
used.
2. The smallest standard deviation is found for the case with one fracture set.

Fluid Flow in Fractured Reservoirs 37


3. Using only one angle can lead to wide variation in the estimate of beta and shape factor.
It is essential to use multiple angles to obtain an accurate estimate of fracture spacing
and shape factor.

This study assumes a fairly regular spacing of fractures. If fracture frequency varied greatly from
one part of an outcrop to another, more scanlines would be required to characterize the
spacing.

Fluid Flow in Fractured Reservoirs 38


Appendix C - Profile of for Idealized Shapes by
Varying Number of Angles and Scanlines
Beta () vs. Number of Imaginary Lines and Angles for Rectangular Shape

(a) 5 angles with 20 scanlines (b) 51 angles with 20 scanlines (c) 101 angles with 20 scanlines

(d) 2 Scanlines with 51 angles (e) 20 Scanlines with 51 angles (f) 200 Scanlines with 51 angles
Figure 42 Beta vs. Number of Imaginary Lines and Angles for Rectangular Shape

Fluid Flow in Fractured Reservoirs 39


Examples of Scanlines Survey and Rotation for Rectangular Shapes

(a) 0o rotation (b) 45o rotation

(c) 90o rotation


Figure 43 Examples of Scanlines Survey and Rotation for Rectangular Shapes

Fluid Flow in Fractured Reservoirs 40


Beta () vs. Number of Imaginary Lines and Angles for Square Shape

(a) 5 angles with 20 scanlines (b) 51 angles with 20 scanlines (c) 101 angles with 20 scanlines

(d) 2 scanlines with 51 angles (e) 20 scanlines with 51 angles (f) 200 scanlines with 51 angles
Figure 44 Beta vs. Number of Imaginary Lines and Angles for Square Shape

Fluid Flow in Fractured Reservoirs 41


Examples of Scanlines Survey and Rotation for Square Shapes

(a) 0o rotation (b) 45o rotation

(c) 90o rotation


Figure 45 Examples of Scanlines Survey and Rotation for Square Shapes

Fluid Flow in Fractured Reservoirs 42


Beta () vs. Number of Imaginary Lines and Angles for Random Shape

(a) 5 angles with 20 scanlines (b) 51 angles with 20 scanlines (c) 101 angles with 20 scanlines

(d) 2 scanlines with 51 angles (e) 20 scanlines with 51 angles (f) 200 scanlines with 51 angles
Figure 46 Beta vs. Number of Imaginary Lines and Angles for Random Shape

Fluid Flow in Fractured Reservoirs 43


Examples of Scanlines Survey and Rotation for Random Shapes

(a) 0o rotation (b) 45o rotation

(c) 90o rotation


Figure 47 Examples of Scanlines Survey and Rotation for Random Shapes

Fluid Flow in Fractured Reservoirs 44


Beta () vs. Number of Imaginary Lines and Angles for Infinite Fractures Shape

(a) 5 angles with 20 scanlines (b) 51 angles with 20 scanlines (c) 101 angles with 20 scanlines

(d) 2 scanlines with 51 angles (e) 20 scanlines with 51 angles (f) 200 scanlines with 51 angles
Figure 48 Beta vs. Number of Imaginary Lines and Angles for Infinite Fractures Shape

Fluid Flow in Fractured Reservoirs 45


Examples of Scanlines Survey and Rotation for Infinite Fractures Shapes

(a) 0o rotation (b) 45o rotation

(c) 90o rotation


Figure 49 Examples of Scanlines Survey and Rotation for Infinite Fractures Shapes

Fluid Flow in Fractured Reservoirs 46


Appendix D - Matlab Scripts Used
in This Study
1. Matlab Scripts for Converting DFN to orthogonal fractures set and calculating
remaining oil recovery curve
1.1. Script for Converting DFN to Orthogonal Fractures Set
The following script will convert DFN data as given in Step-A from Appendix C:
Aq = importdata('crcl.txt'); %importing Lc and Rc data from a text file
Bq = Aq.data;
Cq = 1000*Bq(:,1); %Characteristic Length
Dq = 1000*Bq(:,2); %Characteristic Radius
% 1000 is a conversion from meter to millimeter
Amax = 2*max(Dq);Amin = 2*min(Dq);

N = 10; % number of realizations in a single run


AS = 4*Cq.^2; % 4Lc^2 -> to help us choose among our new realizations
for j = 1: N;
for i = 1:numel(Cq);
% Initializing Values
X(i,j) = Amin + (Amax - Amin)*rand;
XS(i,j)= X(i,j).^2;
Y(i,j) = sqrt(4*XS(i,j)./(Cq(i,1).*XS(i,j)-4));

max_iter = 1000000; % maximum allowed number of iterations


iter = 0; % iteration counter
cek = 1;
while cek > 0
if iter > max_iter
disp('Maximum allowed number of iterations reached')
break
end
iter = iter+1;
X(i,j) = Amin + (Amax - Amin)*rand; % Eq. A.1 (Constraint-1)
if (X(i,j)> sqrt(4/Cq(i,1))) ; % Eq. A.2 (Constraint-2)
cek = 0;
else
cek = 1;
end
if cek == 0;
XS(i,j)= X(i,j).^2;
Y(i,j) = sqrt(4*XS(i,j)./(Cq(i,1).*XS(i,j)-4));
if (Y(i,j)> Amin) && (Y(i,j)< Amax);
cek = 0;
else
cek = 1;
end
else
cek = 1;
end
end

end
E(:,j) = XS(:,j).*Y(:,j)./(XS(:,j)+Y(:,j)) ; % Modified from Eq. 2.4 (Formula of Lc)
RMSE(j) = sqrt(1/N*sum((AS - E(:,j)).^2)); % Root Mean Square Error
end

CP = min(RMSE); % Choosing the smallest RMSE among realizations


ACP = find(RMSE==CP);
Lx = X(:,ACP); % Chosen Lx for single run
Ly = Y(:,ACP); % Chosen Ly for single run

Fluid Flow in Fractured Reservoirs 47


1.2. Script for Calculating Remaining Oil Curve

The following script are used to calculate remaining oil curve by using the methods of:
a) D method
b) V method
c) W&R method
d) L&A method
e) M W&R method
for one of the realization (specifically, this is the script for generating realization 1).
BigData = importdata('Lc_Lx_Ly.txt');
% Original Data from realization of Step-A
BD = BigData.data;
d_y = BD(:,2)';
d_x = BD(:,3)';

Aq = importdata('crcl.txt'); % Original Data from DFN


Bq = Aq.data;
Cq = 1000*Bq(:,1); %Characteristic Length
Dq = 1000*Bq(:,2); %Characteristic Radius

areag = d_y.*d_x;

d_y = sort(d_y);

mma = 15; %to match with Lc


mmb = 600;

M = round(linspace(mma,mmb,40));
M = M + round((mmb-mma)/80);
M(1) = mma;M(end) = mmb;

mmx = 2; %to match with Lc


mmy = 2930;
H = round(linspace(mmx,mmy,74));
H = H+ round((mmy-mmx)/74/2);
H(1) = mmx;H(end) = mmy;

HH = d_x(H);
MM = d_y(M);

MH = HH'*MM;
HHX = sort(MM);
HHY = sort(HH);

anew = HHX'; %x-axis direction


bnew = HHY'; %y-axis direction

for i = 1: numel(MH);
areatrans(1,i) = MH(i);
end

finLx = anew;
finLy = bnew;

for i = 1:length(anew);
for j = 1: length(bnew);
newLc(i,j) = 4*(1/anew(i,1).^2+1/bnew(j,1).^2);
newRc(i,j) = (anew(i,1).*bnew(j,1))/(anew(i,1)+bnew(j,1));
end
end

Fluid Flow in Fractured Reservoirs 48


for kk = 1: numel(newLc);
NeoLc(kk,1) = newLc(kk);
NeoRc(kk,1) = newRc(kk);
end
NeoLc = sort(NeoLc);
NeoRc = sort(NeoRc);

sareag = sort(areag);
sareatrans = sort(areatrans);
CN = cumsum(sareatrans);
CNF = CN/CN(end);
CG = cumsum(sareag);
CGF = CG/CG(end);

sCq = sort(Cq/1000);
sDq = sort(Dq/1000);

LCq = log10(sCq);
LDq = log10(sDq);
LNLc = log10(NeoLc/1000);
LNRc = log10(NeoRc/1000);

%% Plotting Cumulative Area Fraction Distribution

plot(LCq,CGF);
hold on
plot(LNLc,CNF);
title('Cumulative Area Fraction for Log L_c')
ylabel('Cumulative Area Fraction')
xlabel('Log L_c')
legend('Original L_c','New L_c','Location','Best')
grid on
hold off

figure
plot(LDq,CGF);
hold on
plot(LNRc,CNF);
title('Cumulative Area Fraction for Log R_c')
ylabel('Cumulative Area Fraction')
xlabel('Log R_c')
legend('Original R_c','New R_c','Location','Best')
grid on
hold off

%% construct the grid shape

d_x = finLx'/1000;
d_y = finLy'/1000;

dxsum = [0 cumsum(d_x)];
dysum = [0 cumsum(d_y)];
Farea = dxsum(end)*dysum(end);

%% Construct the Figure of the Grid

ee = repmat(dxsum,2,1);
ff = repmat([0; dysum(end)],1,numel(dxsum));
gg = repmat(dysum,2,1);
hh = repmat([0; dxsum(end)],1,numel(dysum));

for i = 1:length(dxsum)
pary(i,:)=[ee(1,i) ff(1,i) ee(2,i) ff(2,i)];
end

for i = 1:length(dysum)
parx(i,:)=[hh(1,i) gg(1,i) hh(2,i) gg(2,i)];
end

FI = (numel(d_x)*dxsum(end)+numel(d_y)*dysum(end))/Farea;

Fluid Flow in Fractured Reservoirs 49


figure
line([pary(:,1)';pary(:,3)'],[pary(:,2)';pary(:,4)'],'Color','r');
line([parx(:,1)';parx(:,3)'],[parx(:,2)';parx(:,4)'],'Color','r');
ylabel('width [m]');
xlabel('length [m]');
title('Fractures Setting')
axis([0 dxsum(end) 0 dysum(end)])

%% Grid Properties and Fluid Properties

perm = 18.6*10^-15; %m
por = 0.1392; %dimensionless
visco = 0.04; % Pa.s = 1 cp
co = 2.18*10^-9; % Pa^-1

mygrid = d_y'*d_x;
AreaT=sum(sum(mygrid)) ;
FA = mygrid/AreaT;

t = logspace(-8,2,30);

%% Calculation of Remaining Oil

Alf = perm/(por*visco*co);

Cubic_oil = 1;
X_number = length(d_x);
Y_number = length(d_y);

avLx = dxsum(end)/numel(d_x) ;
avLy = dysum(end)/numel(d_y) ;

if avLx > avLy


avLmin = avLy;
else
avLmin = avLx;
end
tD = Alf/(avLmin)^2*t; % Dimensionless Time based on the smallest fracture spacing

betax = (1./d_x).^2;
betay = (1./d_y).^2;

for i=1:numel(t)
for k=1:X_number
Fob_x(i,k) = (Alf*t(i))*betax(k);
end;
end;

for i=1:numel(t)
for k=1:Y_number
Fob_y(i,k) = (Alf*t(i))*betay(k);
end;
end;

%Calculating Remaining over time (Employing Van der Valk Method)

c1 = 2.24752380952381;
c2 = -9.816;
c3 = 0.8074;

for j = 1: size(Fob_x,2)
for i = 1: size(Fob_x,1)
if Fob_x(i,j)< 0.05
TDx(i,j) = 1-c1*sqrt(Fob_x(i,j));
else
TDx(i,j) = c3*exp(c2*Fob_x(i,j));
end
end
end

Fluid Flow in Fractured Reservoirs 50


for j = 1: size(Fob_y,2)
for i = 1: size(Fob_y,1)
if Fob_y(i,j)< 0.05
TDy(i,j) = 1-c1*sqrt(Fob_y(i,j));
else
TDy(i,j) = c3*exp(c2*Fob_y(i,j));
end
end
end

x = TDx;
y = TDy;

%Transpose y to calculate outerproduct;


y_transpose=transpose(y);

%calculate outerproduct;
for i=1:numel(t);
M_combined(:,:,i) = y_transpose(:,i)*x(i,:);
end;

%calculate area's of each individual matrix block ;


d_y_transpose = transpose(d_y);
Area_blocks=d_y_transpose*d_x;

%calculate total area of the matrix blocks;


Total_area=sum (sum(Area_blocks)) ;

%calculate fracture of the area's vs the total area of each individual %matrix block;
Fracture_area = Area_blocks/Total_area;

%calculate the dimensionless temperature of each block compared to the %area size;
for i=1:numel(t);
fracture_area_time(:,:,i)= Fracture_area(:,:);
Dim_Temp(:,:,i)= fracture_area_time(:,:,i).*M_combined(:,:,i);
end;

Sum_DimTemp = sum(sum(Dim_Temp));
%reshape to get matrix of dimensionless temperatures;
Sum_DT= reshape (Sum_DimTemp,numel(t), 1);

T_oil=1-Sum_DT;

%% New Method of W&R

xq = exp(-Fob_x);
yq = exp(-Fob_y);
y_q=transpose(y);
for i=1:numel(t);
M_q(:,:,i) = y_q(:,i)*xq(i,:);
end;
for i=1:numel(t);
DPq(:,:,i)= fracture_area_time(:,:,i).*M_q(:,:,i);
end;
Sum_DP = sum(sum(DPq));
Sum_DPreshape= reshape (Sum_DP,numel(t), 1);
NMWR = 1 - Sum_DPreshape;

%%

figure
plot(tD,T_oil,'r-','LineWidth',2);
axis([0 4 0 Cubic_oil])
xlabel('Dimensionless Time (\alpha t/(L_{x,avg} x L_{y,avg}) , [-]');
grid minor
ylabel('Oil recovery, [-]');
grid on
title('Oil Recovery Curve');

Fluid Flow in Fractured Reservoirs 51


Lox = avLx;
Loy = avLy;
SFx = (1/Lox^2);
SFy = (1/Loy^2);
SFLA = pi^2*(SFx +SFy); % Shape factor of Lim & Aziz
SFKZ = 4*(SFx +SFy); % Shape factor of Kazemi
SFWR = 8*4/(2*Lox*Loy/(Lox+Loy))^2; % Shape factor of Warren & Root

bet = t;

% V Method
for i = 1:length(SFKZ);
for j = 1:length(bet);
MVER(i,j) = (1-exp(-SFKZ(i)*perm*bet(j)/(por*visco*co)))^0.5;
end
end

% W&R Method
for i = 1:length(SFWR);
for j = 1:length(bet);
MWR(i,j) = (1-exp(-SFWR(i)*perm*bet(j)/(por*visco*co)));
end
end

% L&A Method
for i = 1:length(SFLA);
for j = 1:length(bet);
MLA(i,j) = (1-(8/pi^2)^3*exp(-SFLA(i)*perm*bet(j)/(por*visco*co)));
end
end

%% Generating Remaining Oil Curves

% comparison of D method vs. Methods of V, W&R and L&A


% (for y-axis scale: 0.1-1)
figure
semilogy((tD),(1 - T_oil),'bo-','LineWidth',1.5);
hold on
semilogy((tD),(1 - MVER),'r+-','LineWidth',1.5); % using Kz Shape Factor
semilogy((tD),(1 - MWR),'LineWidth',1.5); % using W&R Shape Factor
semilogy((tD),(1- MLA),'LineWidth',1.5); % using L&A Shape Factor
grid on
grid minor
ylabel('P_D')
xlabel('t_D')
legend('D','V','W & R','L & A','Location','Best');
title('Remaining Oil Curve')
ylim([0.01 1]);
axc = gca;
axc.GridAlpha = 1;
axc.MinorGridAlpha = 0.7;
axc.MinorGridLineStyle = '-.';

% comparison of D method vs. Methods of V, W&R and L&A


% (for expanded y-axis scale: 0.1-1)

figure
semilogy((tD),(1 - T_oil),'bo-','LineWidth',1.5);
hold on
semilogy((tD),(1 - MVER),'r+-','LineWidth',1.5); % using Kz Shape Factor
semilogy((tD),(1 - MWR),'LineWidth',1.5); % using W&R Shape Factor
semilogy((tD),(1- MLA),'LineWidth',1.5); % using L&A Shape Factor
grid on
grid minor
ylabel('P_D')
xlabel('t_D')
legend('D','V','W & R','L & A','Location','Best');
title('Remaining Oil Curve')
ylim([0.1 1]);
axc = gca;

Fluid Flow in Fractured Reservoirs 52


axc.GridAlpha = 1;
axc.MinorGridAlpha = 0.7;
axc.MinorGridLineStyle = '-.';
axc.GridLineStyle = '-';
axc.YTick = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1];
axc.YTickLabel = [0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1];

% comparison of D method vs. New Method of W&R


figure
semilogy((tD),(1 - T_oil),'bo-');
hold on
semilogy((tD),(1- NMWR ),'k','LineWidth',1.5);
grid on
grid minor
ylabel('P_D')
xlabel('t_D')
legend('D','M W & R','Location','Best');
title('Oil Remaining Curve')
ylim([0.01 1]);
axc = gca;
axc.GridAlpha = 1;
axc.MinorGridAlpha = 0.7;
axc.MinorGridLineStyle = '-.';

To match new distribution with original distribution, we choose different elements from the
available Lx and Ly values by changing the values of the following parameters: mma, mmb, mmx
and mmy. As explained in Appendix A, we multiply Lx and Ly by a constant when we try to match
cumulative distribution curve for Rc. For realizations 2 and 5, we multiply the array by different
values. Part of the script (from realization 2) is written as follows:

HH = d_x(H)*150; %multiplying all values of Lx with 150


MM = d_y(M)*2; %multiplying all values of Lx with 2

For realization 5, we multiply Lx by 5 and Ly by 185. For realization 3, we multiply by the same
value, which is 100.

2. Matlab Scripts for Generating Orthogonal Fractures Shape, Rotating and Measuring
the Fracture Spacing

We also use Matlab software to conduct our study on sensitivity checks on methods for
determining characteristic fracture spacing. Our scripts can be considered as alternative ways in
modeling fracture networks. The outlines of the scripts consist of the following points:
1. Building the fracture network
2. Generating scanlines and rotating the network
3. Measuring fracture spacing by detecting intersections
4. Calculating beta
5. Plotting the fracture network.
We do not write all of our scripts in this report. We present the script for studying square shaped
fracture set first, and then the script for other fracture sets are explained based upon it. The
script for square shaped fracture set is written as follow:

Fluid Flow in Fractured Reservoirs 53


%% BUILDING THE FRACTURE NETWORK

% Grid Building
ll = 8; % number of grids in x-direction
mm = 4; % number of grids in y-direction
mul = 1; % ratio length/width

% Scanlines
s = [20]; % number of scanlines
u = ll*2*2; % outer point where a scanline could be generated

% Angle
sudut = [linspace(0,90,5)]; % your angles definitions
V_c=[0 0]; % pivot point for grid rotation in [x y]

% Area of investigation (optional)


%>> use this option if you want to adjust your area of investigation
%>> 'ver' and 'hor' have to be bigger than 'u' to have your entire grid observed
ver = [40]; % half length of observation limit in y-direction # from pivot point
hor = [40]; % half length of observation limit in x-direction # from pivot point

%% Fracture Network

% fracture definition
exx = linspace(-ll,ll,mul*mm+1);
ee = repmat(exx,2,1);
ff = repmat([-ll; ll],1,mul*mm+1);
gxx = linspace(-ll,ll,mm+1);
gg = repmat(gxx,2,1);
hh = repmat([-ll; ll],1,mm+1);

% random fractures
gg1 = [0 ll -ll; ll 5 ll];
hh1 = [ll 0 -ll; 0 -ll ll-1];
gg(:,2)= [];
hh(:,3)= [];
gg = [gg gg1];
hh = [hh hh1];

dx = 2*ll/mm; %length of grid


dy = 2*ll/mul/mm; %length of grid

% plotting outline of the network


plot(ee,ff,'g-','LineWidth',2); %parallel to y-axis
hold on
plot(hh,gg,'g-','LineWidth',2); %parallel to x-axis
hold off

%% Area of investigations

wex = linspace(-ver,ver,2);
we1 = repmat(wex,2,1);
we2 = repmat([-hor; hor],1,2);
nox = linspace(-hor,hor,2);
no1 = repmat(nox,2,1);
no2 = repmat([-ver; ver],1,2);

%% change the matrix into input-matrix format

for i = 1:size(gg,2)
parx(i,:)=[hh(1,i) gg(1,i) hh(2,i) gg(2,i)];
end

for i = 1:size(ee,2)
pary(i,:)=[ee(1,i) ff(1,i) ee(2,i) ff(2,i)];
end

%% GENERATING SCANLINES

Fluid Flow in Fractured Reservoirs 54


for oo = 1:size(s,2)

v1 = 2*sqrt(2*ll^2)*rand(1,s(oo))-sqrt(2*ll^2);

for i = 1:s(oo)
perpx(i,:)=[v1(1,i) -u v1(1,i) u];
end

v2 = 2*sqrt(2*ll^2)*rand(1,s(oo))-sqrt(2*ll^2);
for i = 1:s(oo)
perpy(i,:)=[-u v2(1,i) u v2(1,i)];
end

%% ROTATING THE NETWORK

for r = 1:size(sudut,2);

sud = sudut(r);

% Processing

m = size(pary);
nn = size(parx);
a_rad=((sud*pi)./180); %Angle in radians
Rmat=[cos(a_rad) -sin(a_rad);...
sin(a_rad) cos(a_rad) ]; %Rotation Matrix
Rmat=round(Rmat,15); %rounding to the 10^15

for i = 1:m;
for im = 1:nn;

XS(:,i)= [pary(i,1) pary(i,3)];


YS(:,i) = [pary(i,2) pary(i,4)];

XD(:,im)= [parx(im,1) parx(im,3)];


YD(:,im) = [parx(im,2) parx(im,4)];

Vca = [XS(:,i) YS(:,i)];


Vc=Vca-(ones(size(Vca,1),1)*V_c);
Vrc=[Rmat*Vc']';
Vr=Vrc+ones(size(Vc,1),1)*V_c;

Vcb = [XD(:,im) YD(:,im)];


Vc2=Vcb-(ones(size(Vcb,1),1)*V_c);
Vrc2=[Rmat*Vc2']';
Vr2=Vrc2+ones(size(Vc2,1),1)*V_c;

parxx(i,:)=[Vr(1,1) Vr(1,2) Vr(2,1) Vr(2,2)];


paryy(im,:)=[Vr2(1,1) Vr2(1,2) Vr2(2,1) Vr2(2,2)];

end
end

%% MEASURING FRACTURE SPACING BY DETECTING INTERSECTIONS

parall = [parxx;paryy]; %re-shape matrix as input for the intersection locator

% Generating Intersection perpendicular to x-axis

% File lineSegmentIntersect.m is required to do the following operations:

outp1 = lineSegmentIntersect(parall,perpx);
mlp1 = size(outp1.intMatrixY,1);
szp1 = size(perpx,1);

CY = outp1.intMatrixY;
OUH = outp1.IAM;
CEKY = CY > -ver & CY < ver;
CY2 = outp1.intMatrixX;

Fluid Flow in Fractured Reservoirs 55


CEKYY2 = CY2 > -hor & CY2 < hor;
CEKY2 = OUH.*CEKY.*CEKYY2;

SCATY = CY.*CEKY2;
SCATY2 = CY2.*CEKY2;
SCATY_sort = sort(SCATY,1);
DIXneo=[]; %initiate and clear prev values

for jk = 1:mlp1;
for ik = 1:szp1;
if CEKY2(jk,ik)==0
CEKY2neo(jk,ik)= NaN;
else
CEKY2neo(jk,ik)= SCATY(jk,ik);
end
end
end
DIX_sort = sort(CEKY2neo,1);
for j = 1:mlp1-1;
for i = 1:szp1;
DIXneo(j,i) = abs(bsxfun(@minus,DIX_sort(j,i),DIX_sort(j+1,i)));
end
end

DIXneo(isnan(DIXneo))= [] ;
DIXneo(DIXneo==0)= [] ;
EYmean = mean(mean(DIXneo));

% Generating Intersection perpendicular to y-axis

outp2 = lineSegmentIntersect(parall,perpy);
mlp2 = size(outp2.intMatrixX,1);
szp2 = size(perpx,1);

CX = outp2.intMatrixX;
OUI = outp2.IAM;
CEKX = CX > -hor & CX < hor;
CX2 = outp2.intMatrixY;
CEKXX2 = CX2 > -ver & CX2 < ver;

CEKX2 = OUI.*CEKXX2.*CEKX;
SCATX = CX.*CEKX2;
SCATX2 = CX2.*CEKX2;

for jm = 1:mlp2;
for im = 1:szp2;
if CEKX2(jm,im)==0
CEKX2neo(jm,im)= NaN;
else
CEKX2neo(jm,im)= SCATX(jm,im);
end
end
end
DIYneo=[];
DIY_sort = sort(CEKX2neo,1);
for j = 1:mlp2-1;
for i = 1:szp2;
DIYneo(j,i) = abs(bsxfun(@minus,DIY_sort(j,i),DIY_sort(j+1,i)));
end
end

DIYneo(isnan(DIYneo))= [] ;
DIYneo(DIYneo==0) = [] ;
EXmean = mean(mean(DIYneo));

%% "Beta" Value Calculation

EXmean(isnan(EXmean))=0;
EYmean(isnan(EYmean))=0;

Fluid Flow in Fractured Reservoirs 56


EY = 1/EYmean;
EX = 1/EXmean;

if EYmean == 0
EY = 0;
else
EYmean = EYmean;
end

if EXmean == 0
EX = 0;
else
EX = 1/EXmean;
end
bet(r,:) = EX^2+EY^2;
beta_ini = EX^2+EY^2;

%% Plot Rotated

% Plotting Figures with intersection points


% ATTENTION!
% the x-axis' limit in histogram may need to be adjusted manually

figure
set(gca,'DataAspectRatio',[1 1 1])
subplot(4,2,[1 6])
hold on

lceky = size(CEKY2,1)*size(CEKY2,2);
for i = 1:lceky;
if CEKY2(i)==1
h_blue = scatter(SCATY2(i),SCATY(i),[],'b','filled','LineWidth',2);
else
;
end
end

lcekx = size(CEKX2,1)*size(CEKX2,2);
for j = 1:lcekx;
if CEKX2(j) == 1;
h_black = scatter(SCATX(j),SCATX2(j),[],'k','LineWidth',1.5);
else
;
end
end

line([parxx(:,1)';parxx(:,3)'],[parxx(:,2)';parxx(:,4)'],'Color','r','LineWidth',2.5);
line([perpx(:,1)';perpx(:,3)'],[perpx(:,2)';perpx(:,4)'],'Color','k');
line([paryy(:,1)';paryy(:,3)'],[paryy(:,2)';paryy(:,4)'],'Color','r','LineWidth',2.5);
line([perpy(:,1)';perpy(:,3)'],[perpy(:,2)';perpy(:,4)'],'Color','k');

legend([h_blue,h_black],{'intersection w vertical lines' ...


,'intersection w horizontal lines'},'FontSize',7);

% plot(V_c(1,1),V_c(1,2),'g.','MarkerSize',10) %center of rotation (point of origin)


% these scripts should only active if you have smaller area of investigation:
% plot(we2,we1,'c-','LineWidth',1.5);
% plot(no1,no2,'c-','LineWidth',1.5);

ylims=get(gca,'ylim');
xlims=get(gca,'xlim');
xrange=xlims(2)-xlims(1);
yrange=ylims(2)-ylims(1);
xpos=xlims(1)+0.02*xrange;
ypos=ylims(1)+0.1*yrange;
text(xpos,ypos,{['L_x = ', num2str(EXmean),''],...
['L_y = ', num2str(EYmean),''],...
['beta = ', num2str(beta_ini),'']},'FontSize',8);

Fluid Flow in Fractured Reservoirs 57


hold off
title( ['Fractures in Rotation of ', num2str(sud,'%.2g' ),' degree '] );
subplot(4,2,7)
edges = linspace(0,6,13);
h = histogram(DIYneo,edges);
title('Distribution of L_x','FontSize',9);
grid on
xlabel('Avg. Fracture Length','FontSize',8);
ylabel('Number','FontSize',8);
subplot(4,2,8)
edges = linspace(0,6,13);
h = histogram(DIXneo,edges);
title('Distribution of L_y','FontSize',9);
grid on
xlabel('Avg. Fracture Length','FontSize',8);
ylabel('Number','FontSize',8);

end

% Plotting The Profile of beta for all of the angles

figure
plot(sudut,bet,'r')
grid on

title('Rotation angle to \beta ( 1/L_x^2 + 1/L_y^2)')


xlabel('Angle, [degree]');
ylabel('\beta ( 1/L_x^2 + 1/L_y^2)');

rata_1 = mean(bet);

xlim([0 90]);

beta_variance = var(bet)

ylimz=get(gca,'ylim');
xlimz=get(gca,'xlim');
xrange=xlimz(2)-xlimz(1);
yrange=ylimz(2)-ylimz(1);
xpoz=xlimz(1)+0.4*xrange;
ypoz=ylimz(1)+0.2*yrange;
text(xpoz,ypoz,{['Mean of \beta is ', num2str(rata_1),''],...
['Variance is ', num2str(beta_variance),'']});

end

The output is presented in Appendix C for three angles (0o, 45o and 90o). The following
parameter should be used to substitute the earlier value to evaluate rectangular shape:
% Grid Building
mul = 2; % ratio length/width

The rest of the scripts are still the same. For randomized shape, random fractures are added. In
our case, we added two random fractures and eliminated some fracture strikes. We edit the
section in Fracture Network to be as follow:

Fluid Flow in Fractured Reservoirs 58


%% Fracture Network

% fracture definition
(the same as previous script)

% random fractures
gg1 = [0 ll -ll; ll 5 ll];
hh1 = [ll 0 -ll; 0 -ll ll-1];
gg(:,2)= [];
hh(:,3)= [];
gg = [gg gg1];
hh = [hh hh1];

For single fracture set, the model is built by eliminating one of the fracture sets and then adjusts
the scripts accordingly, i.e. generating scanlines and rotating the network, measuring fracture
spacing by detecting intersections, calculating beta and plotting only for one fracture network.
The script is written as follow:
%% BUILDING THE FRACTURE NETWORK

% Grid Building
ll = 8; % number of grids in x-direction
mm = 8; % number of grids in y-direction
mul = 1; % ratio length/width

% Scanlines
s = [20]; % number of scanlines
u = ll*2*2; % outer point where a scanline could be generated

% Angle
sudut = [linspace(0,90,5)]; % your angles definitions
V_c=[0 0]; % pivot point for grid rotation in [x y]

% Area of investigation (optional)


%>> use this option if you want to adjust your area of investigation
%>> 'ver' and 'hor' have to be bigger than 'u' to have your entire grid observed
ver = [25]; % half length of observation limit in y-direction # from pivot point
hor = [25]; % half length of observation limit in x-direction # from pivot point

%% Fracture Network

% fracture definition
gxx = linspace(-ll,ll,mm+1);
gg = repmat(gxx,2,1);
hh = repmat([-ll; ll],1,mm+1);

dx = 2*ll/mm; %length of grid


dy = 2*ll/mul/mm; %length of grid

% plotting outline of the network


plot(hh,gg,'g-','LineWidth',2); %parallel to x-axis
hold off

%% change the matrix into input-matrix format

for i = 1:size(gg,2)
parx(i,:)=[hh(1,i) gg(1,i) hh(2,i) gg(2,i)];
end

Fluid Flow in Fractured Reservoirs 59


%% GENERATING SCANLINES

for oo = 1:size(s,2)

v1 = 2*sqrt(2*ll^2)*rand(1,s(oo))-sqrt(2*ll^2);

for i = 1:s(oo)
perpx(i,:)=[v1(1,i) -u v1(1,i) u];
end

v2 = 2*sqrt(2*ll^2)*rand(1,s(oo))-sqrt(2*ll^2);
for i = 1:s(oo)
perpy(i,:)=[-u v2(1,i) u v2(1,i)];
end

%% ROTATING THE NETWORK

for r = 1:size(sudut,2);

sud = sudut(r);

% Processing

m = size(parx);
nn = size(parx);
a_rad=((sud*pi)./180); %Angle in radians
Rmat=[cos(a_rad) -sin(a_rad);...
sin(a_rad) cos(a_rad) ]; %Rotation Matrix
Rmat=round(Rmat,15); %rounding to the 10^15

for i = 1:m;
for im = 1:nn;

XD(:,im)= [parx(im,1) parx(im,3)];


YD(:,im) = [parx(im,2) parx(im,4)];

Vcb = [XD(:,im) YD(:,im)];


Vc2=Vcb-(ones(size(Vcb,1),1)*V_c);
Vrc2=[Rmat*Vc2']';
Vr2=Vrc2+ones(size(Vc2,1),1)*V_c;

paryy(im,:)=[Vr2(1,1) Vr2(1,2) Vr2(2,1) Vr2(2,2)];

end
end
%% MEASURING FRACTURE SPACING BY DETECTING INTERSECTIONS

parall = [paryy]; %re-shape matrix as input for the intersection locator

% Generating Intersection perpendicular to x-axis


% File lineSegmentIntersect.m is required to do the following operations:

outp1 = lineSegmentIntersect(parall,perpx);
mlp1 = size(outp1.intMatrixY,1);
szp1 = size(perpx,1);

CY = outp1.intMatrixY;
OUH = outp1.IAM;
CEKY = CY > -ver & CY < ver;
CY2 = outp1.intMatrixX;
CEKYY2 = CY2 > -hor & CY2 < hor;
CEKY2 = OUH.*CEKY.*CEKYY2;

SCATY = CY.*CEKY2;
SCATY2 = CY2.*CEKY2;

Fluid Flow in Fractured Reservoirs 60


SCATY_sort = sort(SCATY,1);
DIXneo=[]; %initiate and clear prev values

for jk = 1:mlp1;
for ik = 1:szp1;
if CEKY2(jk,ik)==0
CEKY2neo(jk,ik)= NaN;
else
CEKY2neo(jk,ik)= SCATY(jk,ik);
end
end
end
DIX_sort = sort(CEKY2neo,1);
for j = 1:mlp1-1;
for i = 1:szp1;
DIXneo(j,i) = abs(bsxfun(@minus,DIX_sort(j,i),DIX_sort(j+1,i)));
end
end

DIXneo(isnan(DIXneo))= [] ;
DIXneo(DIXneo==0)= [] ;
EYmean = mean(mean(DIXneo));

% Generating Intersection perpendicular to y-axis

outp2 = lineSegmentIntersect(parall,perpy);
mlp2 = size(outp2.intMatrixX,1);
szp2 = size(perpx,1);

CX = outp2.intMatrixX;
OUI = outp2.IAM;
CEKX = CX > -hor & CX < hor;
CX2 = outp2.intMatrixY;
CEKXX2 = CX2 > -ver & CX2 < ver;

CEKX2 = OUI.*CEKXX2.*CEKX;
SCATX = CX.*CEKX2;
SCATX2 = CX2.*CEKX2;

for jm = 1:mlp2;
for im = 1:szp2;
if CEKX2(jm,im)==0
CEKX2neo(jm,im)= NaN;
else
CEKX2neo(jm,im)= SCATX(jm,im);
end
end
end
DIYneo=[];
DIY_sort = sort(CEKX2neo,1);
for j = 1:mlp2-1;
for i = 1:szp2;
DIYneo(j,i) = abs(bsxfun(@minus,DIY_sort(j,i),DIY_sort(j+1,i)));
end
end

DIYneo(isnan(DIYneo))= [] ;
DIYneo(DIYneo==0) = [] ;
EXmean = mean(mean(DIYneo));

%% "Beta" Value Calculation

EXmean(isnan(EXmean))=0;
EYmean(isnan(EYmean))=0;

EY = 1/EYmean;
EX = 1/EXmean;

Fluid Flow in Fractured Reservoirs 61


if EYmean == 0
EY = 0;
else
EYmean = EYmean;
end

if EXmean == 0
EX = 0;
else
EX = 1/EXmean;
end
bet(r,:) = EX^2+EY^2;
beta_ini = EX^2+EY^2;

%% Plot Rotated

% Plotting Figures with intersection points


% ATTENTION!
% the x-axis' limit in histogram may need to be adjusted manually

figure
set(gca,'DataAspectRatio',[1 1 1])
subplot(4,2,[1 6])
hold on

h_blue = 0;
lceky = size(CEKY2,1)*size(CEKY2,2);
for i = 1:lceky;
if CEKY2(i)==1
h_blue = scatter(SCATY2(i),SCATY(i),[],'b','filled','LineWidth',2);
else
;
end
end

h_black = 0;
lcekx = size(CEKX2,1)*size(CEKX2,2);
for j = 1:lcekx;
if CEKX2(j) == 1;
h_black = scatter(SCATX(j),SCATX2(j),[],'k','LineWidth',1.5);
else
;
end
end

line([perpx(:,1)';perpx(:,3)'],[perpx(:,2)';perpx(:,4)'],'Color','k');
line([paryy(:,1)';paryy(:,3)'],[paryy(:,2)';paryy(:,4)'],'Color','r','LineWidth',2.5);
line([perpy(:,1)';perpy(:,3)'],[perpy(:,2)';perpy(:,4)'],'Color','k');

if h_black == 0;
legend([h_blue],{'intersection w vertical lines'},'FontSize',7);
elseif h_blue == 0 ;
legend([h_black],{'intersection w horizontal lines'},'FontSize',7);
elseif h_blue == 0 && h_black == 0;
;
else
legend([h_blue,h_black],{'intersection w vertical lines' ...
,'intersection w horizontal lines'},'FontSize',7);
end

% plot(V_c(1,1),V_c(1,2),'g.','MarkerSize',10) %center of rotation (point of origin)


% these scripts should only active if you have smaller area of investigation:
% plot(we2,we1,'c-','LineWidth',1.5);
% plot(no1,no2,'c-','LineWidth',1.5);

Fluid Flow in Fractured Reservoirs 62


ylims=get(gca,'ylim');
xlims=get(gca,'xlim');
xrange=xlims(2)-xlims(1);
yrange=ylims(2)-ylims(1);
xpos=xlims(1)+0.02*xrange;
ypos=ylims(1)+0.1*yrange;
text(xpos,ypos,{['L_x = ', num2str(EXmean),''],...
['L_y = ', num2str(EYmean),''],...
['beta = ', num2str(beta_ini),'']},'FontSize',8);

hold off
title( ['Fractures in Rotation of ', num2str(sud,'%.2g' ),' degree '] );
subplot(4,2,7)
edges = linspace(0,6,13);
h = histogram(DIYneo,edges);
title('Distribution of L_x','FontSize',9);
grid on
xlabel('Avg. Fracture Length','FontSize',8);
ylabel('Number','FontSize',8);
subplot(4,2,8)
edges = linspace(0,6,13);
h = histogram(DIXneo,edges);
title('Distribution of L_y','FontSize',9);
grid on
xlabel('Avg. Fracture Length','FontSize',8);
ylabel('Number','FontSize',8);

end

% Plotting The Profile of beta for all of the angles

figure
plot(sudut,bet,'r')
grid on

title('Rotation angle to \beta ( 1/L_x^2 + 1/L_y^2)')


xlabel('Angle, [degree]');
ylabel('\beta ( 1/L_x^2 + 1/L_y^2)');
rata_1 = mean(bet);
xlim([0 90]);

beta_variance = var(bet)

ylimz=get(gca,'ylim');
xlimz=get(gca,'xlim');
xrange=xlimz(2)-xlimz(1);
yrange=ylimz(2)-ylimz(1);
xpoz=xlimz(1)+0.4*xrange;
ypoz=ylimz(1)+0.2*yrange;
text(xpoz,ypoz,{['Mean of \beta is ', num2str(rata_1),''],...
['Variance is ', num2str(beta_variance),'']});
End

The file lineSegmentIntersect.m detects the intersection between fractures strike and scanlines.
The script is made by Erdem (2010) which can be downloaded in File Exchange forum of The
Mathworks, Inc. The script is written as follow:

Fluid Flow in Fractured Reservoirs 63


function out = lineSegmentIntersect(XY1,XY2)

validateattributes(XY1,{'numeric'},{'2d','finite'});
validateattributes(XY2,{'numeric'},{'2d','finite'});

[n_rows_1,n_cols_1] = size(XY1);
[n_rows_2,n_cols_2] = size(XY2);

if n_cols_1 ~= 4 || n_cols_2 ~= 4
error('Arguments must be a Nx4 matrices.');
end

%%% Prepare matrices for vectorized computation of line intersection points.


X1 = repmat(XY1(:,1),1,n_rows_2);
X2 = repmat(XY1(:,3),1,n_rows_2);
Y1 = repmat(XY1(:,2),1,n_rows_2);
Y2 = repmat(XY1(:,4),1,n_rows_2);

XY2 = XY2';

X3 = repmat(XY2(1,:),n_rows_1,1);
X4 = repmat(XY2(3,:),n_rows_1,1);
Y3 = repmat(XY2(2,:),n_rows_1,1);
Y4 = repmat(XY2(4,:),n_rows_1,1);

X4_X3 = (X4-X3);
Y1_Y3 = (Y1-Y3);
Y4_Y3 = (Y4-Y3);
X1_X3 = (X1-X3);
X2_X1 = (X2-X1);
Y2_Y1 = (Y2-Y1);
numerator_a = X4_X3 .* Y1_Y3 - Y4_Y3 .* X1_X3;
numerator_b = X2_X1 .* Y1_Y3 - Y2_Y1 .* X1_X3;
denominator = Y4_Y3 .* X2_X1 - X4_X3 .* Y2_Y1;

u_a = numerator_a ./ denominator;


u_b = numerator_b ./ denominator;

% Find the adjacency matrix A of intersecting lines.


INT_X = X1+X2_X1.*u_a;
INT_Y = Y1+Y2_Y1.*u_a;
INT_B = (u_a >= 0) & (u_a <= 1) & (u_b >= 0) & (u_b <= 1);
PAR_B = denominator == 0;
COINC_B = (numerator_a == 0 & numerator_b == 0 & PAR_B);

% Arrange output.
out.IAM = INT_B; %intAdjacencyMatrix
out.intMatrixX = INT_X .* INT_B;
out.intMatrixY = INT_Y .* INT_B;
out.intNormalizedDistance1To2 = u_a;
out.intNormalizedDistance2To1 = u_b;
out.parAdjacencyMatrix = PAR_B;
out.coincAdjacencyMatrix= COINC_B;

end

The function lineSegmentIntersect requires input from two matrices, which is XY1 and XY2. It
generates coordinates where the lines intersect.

Fluid Flow in Fractured Reservoirs 64

You might also like