Random Fields
Random Fields
Manual for
Generation of Random Fields
and
Geostatistical Modelling
by
Version 3 (May.,2004)
-20
-40
Y=Log (K)
1
(i) Multi-Variate Normal Random Number Generator
1 ⎡ 1 ⎤
exp ⎢ - ( Z- µ ) C -1 ( Z-µ )⎥
T
f (Z) = 1/ 2 p/ 2
|C| ( 2π ) ⎣ 2 ⎦
where, Np(µ,C) is a multi-variate normal distribution with mean µ, and covariance matrix C,
p is the number of parameters (nodes of the model),
Z = {Z1, Z2,..., Zp}T, p-dimensional random vector, (p×1),
µ = {µ1, µ2,…, µ p}T , p-dimensional mean values vector, (p×1),
T is superscript transpose operation of a matrix,
-1 superscript is inverse operation of a matrix,
C is a pxp covariance matrix,
0 Y
, , ,
1 2 3
X Z
, j
Z , s ij
i
p ,
2
Cov( Z i , Z j )
ρ ij =
σZ σZ i j
1) Build the covariance matrix C of the system. The elements of C are denoted by,
2)
C ij = Cov ( Z i , Z j )
⎡ 1. ρ12 . . . . . ρ1 p ⎤
⎢ρ 1. . . . . . ρ 2 p ⎥⎥
⎢ 21
⎢ . . 1 . . . . . ⎥
⎢ ⎥
1 . . . . . . . . ⎥
R = 2 (C ij ) = ⎢ .
σZ ⎢ . . . . . . . . ⎥
⎢ ⎥
⎢ . . . . . . . . ⎥
⎢ . . . . . . . . ⎥
⎢ ⎥
⎢⎣ ρ p1 . . . . . . 1. ⎥⎦
where, ρij = cij/σ2Z is the correlation coefficient between point i and point j.
The correlation matrix can be calculated for a certain random field given its auto-
correlation function as follows.
3
For pairs of values Zi and Zj with i = 1,...p and j = 1,...p determine (xi - xj) and (yi - yj)
where, (xi,yi) are the coordinates of point Zi and point (xj,yj) are the corresponding coordinates for
point Zj. The distance sij between two points is,
2 2
sij = ( xi - x j ) + ( yi - y j )
Types of correlation functions:
1. ρ(sij) is isotropic: one gets circular contours, which means that, it depends on the
magnitude of sij only.
2. ρ(sij) is anisotropic: one can get elliptic contours, which means that, it depends not
only on the magnitude of sij but also on the orientation of the vector sij.
For a known auto-correlation function one can determine all relevant values of ρij.
C=LU
where, L is a unique lower triangular matrix, U is a unique upper triangular matrix, and U
is LT which means that U is the transpose of L.
Cholesky method is sometimes called "Square-Root" method which is used only for the
decomposition of symmetric matrices. For more details about Cholesky method see Westlake
[1968]. In brief, the elements of the lower triangular matrix are given by,
ci1
l i1 = ,1 ≤ i ≤ p
c11
l ii = [cii - ∑k=1 l ik2 ] , 1 ≤ i ≤ p
i -1 1/2
l ij =
1
[c ij - ∑kj=1
-1
l ik l jk ] , 1 < j < i ≤ p
l jj
l ij = 0 , i< j ≤ p
4
X =U ε
MVG:
-1
-2
-3
-4
-5
-6
-7
Ly
-8
-9
-10
-11
-12
-13
-14
-15
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Lx
Figure 1. Domain dimensions and descritization.
AQUIFER PARAMETERS:
5
SIMULATION PARAMETERS:
DOMAIN DIMENSIONS:
LX = LENGTH OF THE DOMAIN IN X-DIRECTION.
LY = LENGTH OF THE DOMAIN IN Y-DIRECTION.
CORRELATION PARAMETERS:
LAMDAX = CORRELATION LENGTH IN X-DIRECTION.
LAMDAY = CORRELATION LENGTH IN Y-DIRECTION.
RXY = CORRELATION COEFFICIENT BETWEEN KX AND KY.
DSAA
93 141
0.0000000000 276.0000000000
-14.0000000000 0.0000000000
0.0001000000 864.0000000000
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
6
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
0.9999999747E-04 0.9999999747E-04 0.9999999747E-04 0.9999999747E-04
…….
7
Figure 2. 3D graphical display of Kx.grd and Ky.grd by surfer.
8
Figure 3. 3D graphical display of lnKx.grd and lnKy.grd by wire-frame in surfer
0 0
-2 -2
4 4
-4 3.5 -4
3.5
3
3 2.5
2.5 2
-6
2 -6 1.5
1.5 1
0.5
1
-8 -8 0
0.5 -0.5
0 -1
-0.5 -1.5
-10 -10
-1 -2
-2.5
-1.5 -3
-12 -2 -12 -3.5
-2.5 -4
-14 -14
0 2 4 6 8 10 12 14 0 2 4 6 8 10 12 14
9
KX.dat and KY.dat
Data in these files are the generated hydraulic conductivity. They can be displayed by surfer.
The following is Kx.dat.
X Y K(X,Y)
0 0 0.28699
0 -1 0.124
0 -2 0.35436
0 -3 0.52029
0 -4 0.43376
0 -5 2.82339
0 -6 3.2875
0 -7 0.41146
0 -8 2.22913
0 -9 25.93681
0 -10 43.908
0 -11 16.6936
0 -12 16.32112
0 -13 2.46761
0 -14 8.78845
0 -15 3.88168
1 0 0.55741
1 -1 0.32082
1 -2 0.39515
1 -3 0.99136
1 -4 1.48065
1 -5 0.25476
1 -6 0.17868
1 -7 0.97759
1 -8 2.54657
1 -9 0.86342
1 -10 11.6818
1 -11 16.45898
1 -12 6.8163
30.88329
17.31905 42.75402
24.54117 32.30068
0.28699
0.55741 4.55303
0.67606 2.87417 1.05422
0.30428 6.31553
0.91244 11.75237 11.47101
0
67.8035
1.21027 10.3489 8.09313
2.35346 10.20065
5.34666
1.42068 20.53919
5.12404 11.23448 30.41061
8.69777
0.1240.32082 0.51062
34.90381
7.09925 20.79013
8.29183 15.94668
0.35436 2.21103
0.39515 1.48523
2.14791 2.41725 3.39635
1.06186 3.95855
0.50234
0.81607
-2
0.52029 1.240530.47061.30414.98365
0.99136 3.17875 6.10433
4.86354 2.48164
1.57271 3.09853
1.05312 5.57951
3.91638 5.63443
1.48065
0.43376 0.30544
0.21063
0.21507 1.77417
0.42634 11.5938
10.50685 11.58156
2.50022 5.21557
2.15537 26.73628
12.63803 1.11147
-4
2.82339 30.56805
3.156326.2773 3.80179
4.44101 3.65272
2.07862 8.108631.373
5.24909
0.25476 0.46403
0.15782 0.40068
0.37859
3.28750.17868
0.48668
0.88586
0.69966 3.99769
1.09454 1.36955 7.00725
6.02858
4.74742 1.07008
1.14008
0.97956
0.65337
1.39489
-6
0.97759
0.41146 0.44252 3.84575
1.06082
0.49245 21.5799
4.03731 14.05327
4.90209
2.796490.9570.59477
0.38689 1.65188
0.28631
2.54657
2.22913 1.61891
0.23542 13.19885
1.45117 9.903938.90955.07495
4.05737
2.09579
0.85158 1.417250.59947.8432
1.29644
-8
25.93681
0.86342 7.24654
2.76874
1.04765
0.30282 5.02196 10.62526
5.07274 2.12508
1.30898
1.42507 6.85438
4.752921.5960.88886
43.908
11.6818 4.96095
2.49902 3.80318
1.44676 2.13703 4.79206
2.08731 0.55931
0.42914 1.36096
0.39869 4.81038
0.91391
0.39142
-10
16.6936
16.45898 32.34987
9.83698 8.52594 3.21752
2.85126
1.035880.56541.90731
1.38666
0.59714 1.91535
2.04016 2.76398
1.01115
16.32112
6.81635.211261.13182.34658
1.31321 4.757912.30331.250921.66084.851721.926 1.12984.40591
0.94896
0.44073
-12
2.46761 6.71247
4.51375 1.24446
0.64885 2.48386
1.63322
0.80853 0.99505 7.68545
3.60753 2.76972
0.88426
0.74543 2.70342
0.63288
11.43681
8.78845 36.83797
32.3879 31.53325
4.49048
1.66288
1.34587
0.17252
0.92027 5.32333
0.67849 1.68710.91028
0.66496
1.15642
-14
21.196324.2612.43532
3.88168 1.14081 2.8762421.886
3.38088
0.20769 16.70758
11.20657
2.08603 1.289721.74687.86256
1.13734
0 2 4 6 8 10 12 14
10
can be displayed by SURFER. A sample data is given here in Figure 5. The auto-correlation is
calculated by,
∑ [Z (i + s , j + s ][Z (i, j) - Z ]
m( sx ) n( s y )
1
Cov( s x , s y ) = ∑
m( s x )n( s y ) i =1 j=1
x y )-Z
Cov( s x , s y )
ρ ZZ ( s x , s y ) = 2
σ Z
RHOTH.GRD
Data in this file is the model auto-correlation of log-hydraulic conductivity. They are also
written in a SURFER software format, so, it can be displayed by SURFER. A sample data is
given here in Figure 6. Exponential auto-correlation is given in the program.
11
Figure 6. 3D graphical display of RHOTH.grd model auto-correlation surfer by wire-frame in
surfer.
12
0 0
-2 -2
15
23
-4 14 -4
13 21
12 19
-6 -6
11
17
10
9 15
-8 -8
8
13
7
6 11
-10 -10
5 9
4
7
-12 3 -12
2 5
-14 -14
0 2 4 6 8 10 12 14 0 2 4 6 8 10 12 14
-2 -2
-4 -4
-6 -6
-8 -8
-10 -10
-12 -12
-14 -14
0 2 4 6 8 10 12 14 0 2 4 6 8 10 12 14
Figure 8. 2D graphical display of sigKX.grd and sigKY.grd the ensemble average sigkx over
the realizations and also for Ky by contour in surfer.
13
8
Ln(Ky)
0
-2
-4
-6
-6 -4 -2 0 2 4 6 8
Ln(Kx)
Figure 9. 2D graphical display of the experimental jpdf and theoretical jpdf of Kx and Ky
(correlation coefficient =0.2).
KxKy.dat
This file contains scatter plot of Kx and Ky and lnkx and lnky
Kx Ky lnKx lnKy
0.28699 0.01812 -1.24832 -4.01051
0.124 0.40156 -2.08749 -0.91239
0.35436 0.83821 -1.03745 -0.17649
0.52029 4.72366 -0.65337 1.55258
0.43376 1.98411 -0.83526 0.68517
2.8233 0.97743 1.03794 -0.02283
3.2875 2.54384 1.19013 0.93368
0.41146 1.33061 -0.88803 0.28564
2.22913 4.1738 0.80161 1.42883
25.93681 11.34292 3.25566 2.42859
43.908 9.15263 3.7821 2.21404
16.6936 35.59773 2.81503 3.57228
16.32112 22.68975 2.79246 3.12191
2.46761 4.42012 0.90325 1.48617
8.78845 6.03772 2.17344 1.79803
3.88168 1.98559 1.35627 0.68592
14
50 4
40 2
30 0
lnKy
Ky
20 -2
10 -4
0 -6
0 20 40 60 80 -4 -2 0 2 4 6
Kx lnKx
Figure 10. Scatter plot of Kx and Ky (left) and lnKx ans lnKy (right) of the generated
realization. The data file is KXKY.dat.
Kx1Kx2.dat
2
lnky(2,-2)
lnkx(2,-2)
-2
-4 -2
-4 -2 0 2 4 6 -8 -4 0 4 8
lnky(0,0) lnKx(0,0)
Figure 10. Scatter plot of lnKy at two locations (0,0) and (2,-2) (left) and lnKx at two
locations (0,0) and (2,-2) (right) of the generated realization.
15
Autkxx.dat, Autkxy.dat, Autkyx.dat, Autkyy.dat
Theses files contain the calculation of the autocorrelation function, auto-covariance function
and the theoretical auto-correlation function (exponential decay) versus lag for lnKx and lnKy
in x and y-directions respectively for the generated realization. The files have the following
format.
1.2
1.2
Realization Auto-correlation
Experimental Auto-coorlation of Ln(Kx) in Y-direction Realization Auto-correlation
Experimatal Auto-correlation of Ln(Ky) in Y-direction Experimental Auto-coorlation of Ln(Kx) in X-direction
Theoretical Auto-correlation Experimatal Auto-correlation of Ln(Ky) in X-direction
0.8 Theoretical Auto-correlation
0.8
0.4
auto-corrlation
0.4
auto-corrlation
0
0
-0.4
-0.4
-0.8
-0.8
0 4 8 12 16
Lag in Y 0 4 8 12 16
La g in X
Figure 11. Auto-correlation of lnKx and lnKy in y-direction (left) and auto-correlation of
lnKx and lnKy in X-direction (right) of the generated realization.
E{Auto}x.dat, E{Auto}y.dat
Theses files contain the calculation of the ensemble autocorrelation function versus lag for
lnKx and lnKy with its 95% confidence intervals in X-direction. And similarly for lnKx and
lnKy in y-directions. The files have the following format.
16
1.2
1.2
Ensemble Auto-correlation
Ensemble Auto-correlation Ensemble Auto-coorlation of Ln(Kx) in X-direction
Ensemble Auto-coorlation of Ln(Ky) in X-direction e{auto}-2*sd of Ln(Kx) in X-direction
e{auto}-2*sd of Ln(Ky) in X-direction e{auto}+2*sd of Ln(Kx) in X-direction
e{auto}+2*sd of Ln(Ky) in X-direction Theoretical Auto-correlation
Theoretical Auto-correlation 0.8
0.8
auto-corrlation
auto-corrlation
0.4
0.4
0
0
-0.4
-0.4
0 4 8 12 16
0 4 8 12 16 Lag in X
Lag in Y
Figure 12. Ensemble auto-correlation of lnKx in Y-direction (left) and in X-direction (right)
respectively.
1.2
1.2
Ensemble Auto-correlation
Ensemble Auto-correlation Ensemble Auto-coorlation of Ln(Ky) in X-direction
Ensemble Auto-coorlation of Ln(Ky) in Y-direction e{auto}-2*sd of Ln(Ky) in X-direction
e{auto}-2*sd of Ln(Ky) in Y-direction e{auto}+2*sd of Ln(Ky) in X-direction
e{auto}+2*sd of Ln(Ky) in Y-direction Theoretical Auto-correlation
Theoretical Auto-correlation 0.8
0.8
auto-corrlation
auto-corrlation
0.4
0.4
0
0
-0.4
-0.4
0 4 8 12 16
0 4 Lag8in X 12 16 Lag in X
Figure 13. Ensemble auto-correlation of lnKy in Y-direction (left) and in X-direction (right)
respectively.
normalx.dat, normaly.dat
These files contain the normal density function with the given mean and variance.
Lnkx pdf
-6.98133 0
-5.66835 0
-4.35537 0.0001
-3.04239 0.00338
-1.72941 0.04112
-0.41642 0.18429
0.89656 0.30384
2.20954 0.18429
3.52252 0.04112
17
4.8355 0.00338
6.14848 0.0001
7.46146 0
8.77444 0
0.4 0.4
pdf of Ky pdf of Kx
Theoretical pdf Theoretical pdf
Experimental pdf Experimental pdf
0.3 0.3
0.2 0.2
0.1 0.1
0 0
-8 -4 0 4 8 12 -8 -4 0 4 8 12
Figure 14. Experimental and theoretical pdf of lnKy (left) and lnKx (right) respectively.
Log-nx.dat, log-ny.dat
These files contain the lognormal density function with the given mean and variance.
Kx pdf
0.00093 0
0.00345 0.00033
0.01284 0.00794
0.04772 0.07073
0.17739 0.23181
0.6594 0.27948
2.45115 0.12396
9.11149 0.02023
33.86954 0.00121
125.90113 3E-005
0 0
0 0
18
0 0
pdf of Ky pdf of Kx
Theoretical pdf Theoretical pdf
Experimental pdf Experimental pdf
0.4
0.2
0.3
0.2
0.1
0.1
0 0
Figure 15. Experimental and theoretical pdf of Ky (left) and Kx (right) respectively.
STAT.RES
This file displays the input data given to the program.
------------------
ARITHMATIC MEAN OF KX, (m/day) = 10.00000
STANDARD DIVIATION OF KX,(m/day) = 20.00000
ARITHMATIC MEAN OF KY, (m/day) = 5.00000
STANDARD DIVIATION OF KY,(m/day) = 10.00000
ANISOTROPY RATIO = 0.50000
LOGARITHMIC TRANSFORMATION
--------------------------
ARITHMATIC MEAN OF ln(KX) = 1.49787
STANDARD DIVIATION OF ln(KX) = 1.26864
ARITHMATIC MEAN OF ln(KY) = 0.80472
STANDARD DIVIATION OF ln(KY) = 1.26864
CORR. COEFF. BET. ln(KX) & ln(KY) = 0.36521
19
SIMULATION PARAMETERS
---------------------
LENGTH OF AQUIFER (m) = 15.00000
DEPTH OF AQUIFER (m) = 15.00000
DISCRETIZATION IN X-DIRECTION (m) = 1.00000
DISCRETIZATION IN Y-DIRECTION (m) = 1.00000
CORRELATION LENGTH IN X-DIRECTION= 2.00000
CORRELATION LENGTH IN Y-DIRECTION = 2.00000
CORR. COEFF. BETWEEN KX AND KY = 0.20000
NO. OF MONTE-CARLO SIMULATIONS = 100
20
(ii) Nearest Neighbour Method
Whittle Model: the value of the parameter at a given node is replaced by weighted average of
previous random values at the given node and few surrounding ones.
Z i = ∑Wij Z j + ε i
i≠ j
N=2 N=3
i,j-1 ,
N=4 ,
i-1,j ,i,j ,i+1,j
,
i,j+1
Figure 00. Numbering system in the NNG and number of neighbours .
where, α x is an auto-regressive parameter expressing the degree of dependence of Zij on its two
neighbouring values in the horizontal direction, Zi-1j and Zi+1j, ( α x <1), and α y is an auto-
regressive parameter expressing the degree of dependence of Zij on its two neighbouring values
in the vertical direction, Zij-1 and Zij+1, ( α y < 1).
The scheme should be applied with modifications at the boundaries of the domain of interest
where necessary, because the blocks do not extend across the boundaries i.e. the equation will be
truncated near the boundary.
21
w*kl = 0 otherwise, i.e., if k = l, or if blocks k and l are not contiguous, and
N is the total number of blocks surrounding block k, i.e.,
The scaling of N is required to ensure stationarity in the generated sequence of Zij values near the
domain boundaries because the model is truncated near the boundaries.
ε ~ N(µε, σε).
In order to simulate the predetermined standard deviation σz, one should start from a
random sequence ε with a standard deviation of one. This vector can be pre-multiplied by an
appropriate factor to yield the desired value of σz. This factor is denoted by η, so becomes,
Z = W Z + ηε
Z = ( I - W ) ηε
-1
To determine the simulation parameter η, one can follow the procedure of Smith and Freeze
[1979] or the procedure of [Baker, 1984] as given in brief here. The auto-correlation matrix of
the process Z can be written as
E (ZZ T )
R=
σ z2
With some algebraic manipulations, one gets
1
R= V η 2.σ ε2
σ 2
Z
η= σZ
Vm
where, Vm = tr V/p, and the symbol "tr" is the trace of the matrix, which is given by, tr V = Σ vii
, i = 1,..., p
22
The final nearest neighbour generator is obtained.
Z = ( I - W)
-1 σZ ε
Vm
where, the Z sequences have a mean of zero. By adding the constant µZ to each element of Z the
system of equations for the nearest neighbour model can be written as
Z = µ Z + ( I - W)
-1 σZ ε
Vm
The analysis of the covariance function describing the generated random field with
first-order dependence is approximately an exponential decay function Smith and Freeze
[1979]. By adjusting the number of neighbors (higher-order nearest neighbour models), the
weighting coefficients and the variance of the initial random independent parameters, it is
possible to approximately fit any given real covariance function as observed on the data.
The advantage of this technique is that at the beginning of any simulation the matrix (I -
W) must be inverted only once. For each realization of the process Z, the inverted matrix (I - W)-
1
is simply multiplied by the generated random vector ηε. The drawback of this method is
computing the inverse matrix.
There is a relation between the correlation length and the autoregressive parameters which is
given by,
α
λ=a
1− α
π
a= in case of 2 D
4
23
(iii) Turning Bands Method (TBM)
The basic idea of the algorithm in brief is, generating two- and three-dimensional fields by
subsequent projection and combining values found from a series of one-dimensional simulations
along several lines radiating outward from an arbitrary origin in space. This procedure yields
discrete values or realizations of the random field.
There are two main approaches for generating the one-dimensional line process in TBM:
- Space Domain Approach: proposed by Matheron and applied by Journal and Huijbregts
[1978] and Delhomme [1979]. This approach can handle only particular forms of auto-
correlation functions.
- Spectral (frequency) Domain Approach, STBM: implemented by Mantoglou and Wilson
[1982]. It is a more general approach that can handle a wide variety of two-dimensional
24
processes, multi-variate (cross-correlated) processes, as well as spatial averaged
(integrated) processes.
L
1
Z s(x, y,z) =
L
∑ Z (u)
i =1
i
is a realization of a two- or three-dimensional process. The subscript s represents the term "
simulated" or " synthetic". The field generated by Eq.(2.106) has zero mean as well. The relation
between the auto-correlation function on the line process ρ1(uo) and the auto-correlation function
in the three-dimensional random field ρ(uo) is given by [for the derivation, refer to Mantoglou
and Wilson, 1982; and Mantoglou, 1987],
d
ρ 1 ( uo ) = [u o ρ ( u o )]
du o
It can be observed from Eq.(2.108) that, it is not easy to obtain ρ1(uo) directly as a function of
ρ(s). Sironvalle [1980] wrote [referenced by Baker, 1984] " This integral equation is too difficult
to solve, so we discard this (the TBM) method." Therefore, Mantoglou and Wilson [1982] used a
spectral method to generate uni-dimensional process along the lines for different types of auto-
correlation functions. In the following section this method will be given more attention.
Generation of 2-D random fields by TBM needs the solution of the integral equation given by
Eq.(2.108). This integral equation cannot be directly expressed as a function of ρ(s). Particular
solutions can be found for certain two-dimensional auto-correlation functions [Mantoglou and
Wilson, 1982]. To circumvent this difficulty, an expression for the spectral density function of
the one-dimensional processes as a function of the radial spectral density function of the two-
dimensional process is used. This expression is given in Fourier space by,
2
σ Z S( ω )
S 1( ω ) =
2
This means, that the spectral density function of the uni-dimensional process S1(ω) along the
turning bands lines is given by one half of the radial spectral density function S(ω) of the two-
dimensional process multiplied by the variance of the two-dimensional process.
Steps used in implementing the STBM generator in simulating a two-dimensional random field
are given below:
25
(1) Generation of One-dimensional Uni-variate Process on The Turning Bands Line:
In the literature, there are two main techniques used for generation of the line process. The first,
is called the "Fast Fourier Transform" (FFT) algorithm, which can be used to construct a
complex process X(u) = Z(u) + i Y(u) given by Tompson, et al. [1989],
where, in the approximate form, X is the sum of a complex series of sinusoidal functions of
varying wavelength, each magnified by complex random amplitude with zero mean dW(ωj), ωj =
j.∆ω.
The second is the "Standard Fourier Integration" method. The real part of the complex
process X(u) is given by
Re X(u) = Z(u) = ∫ | dW( ω ) | cos(ω u + φ ω )
allω
can be used to develop a straightforward discrete approximation using positive frequencies,
M
Z i (u ) = ∑ | dW (ω j ) | cos(ω j u + φ j )
j =1
where, φj represents independent random angles which is uniformly distributed between 0 and
2π, M is the number of harmonics used in the calculations, ωj = (j - .5) ∆ω, j = 1,2,...M, and ∆ω is
the discretized frequency which is given by ωmax/M, and ωmax is the maximum frequency used in
the calculations.
| dW (ω j ) |= [4 S 1 (ω j ).∆ω ]
1/2
where, S1(ωj) is the spectral density function of the real process Z(u) on the line.
S1(ω) is assumed to be insignificant outside the region [-ωmax,+ωmax]. Substitution of this equation
into the previous equation gives the generator of the uni-dimensional process on line i as,
Z i (u ) = 2 ∑ [S 1 (ω j ).∆ω ] cos(ω j u + φ j )
M
1/2
j =1
This is the classical method proposed by Rice [1954]. The form of above equation is slightly
modified by Shinozuka and Jan [1972] to give,
Z i (u ) = 2 ∑ [S 1 (ω j ).∆ω ] cos(ω ′ j u + φ j )
M
1/2
j =1
where, ώj = ωj + δω
The frequency δω is a small random frequency added here in order to avoid periodicities. δω is
uniformly distributed between -∆ώ/2 and ∆ώ/2, where, ∆ώ is a small frequency, ∆ώ<<∆ω. ∆ώ is
taken equal to ∆ω/20 according to Shinozuka and Jan [1972].
26
This approach involves a discrete summation over frequency increments ∆ω up to a
maximum cutoff frequency of ωmax = M ∆ω. The method involves a larger computational effort
than FFT, but it is more flexible in the choice of the parameters, M, ∆ω, ∆u, ωmax and umax
[Tompson, et al., 1989].
(2) Distribution of The Turning Bands Lines and The Number of Lines:
Theory of TBM is based on an infinite number of lines. The lines are assumed to be
randomly oriented, as taken from a uniform distribution on a unit circle in 2-D space or sphere in
3-D space. It has been shown by Mantoglou and Wilson [1982] that by spacing the lines evenly
on the unit circle or sphere, with prescribed directions, the simulated correlation function
converges much faster to the theoretical function. Mantoglou and Wilson show that a number of
8 -16 lines is generally a satisfactory choice in isotropic auto-correlation function. In anisotropic
case, however, a larger number of lines might be required.
A realization of the line process Zi(un) at point n on line i is constructed from a discrete
integration of a series of random components over all the frequency domain. The frequency
discretization ∆ω must be kept small enough to ensure a sufficient degree of accuracy, while the
number of harmonics M must be kept large enough to account for the contributions of the
spectral tail at ωmax = M ∆ω. Mantoglou and Wilson [1982] considered the case where M is
varying between 50 and 100 and ωmax is 40 times the correlation length of isotropic auto-
correlation function in both cases. They found that while the accuracy for M = 50 is poor at large
distances, the accuracy shown for M = 100 improves rapidly.
The physical increment ∆u used along the line should be chosen less than the domain
discretization ∆x, ∆y as a pragmatic rule of thumb in order to avoid some numerical problems
[Mantoglou and Wilson, 1982].
The minimum length of the line is determined by the orientation of the line and the size
of the simulation domain.
The construction of a simulated field Zs(x,y,z) will include the selection of a finite number
of lines L and their orientation, the discrete simulation of one-dimensional process Zi(u) on each
line, the subsequent projection of these values onto all simulation points x in the domain, and the
division of each sum at each point by L1/2 to yield Zs(x,y,z).
27
1.0 1.0 70 LAMBDAX, LAMBDAY, MC
0.25 0.25 DX, DY
80 3 0.1 0 No. of lines, Coefficient, disceretization on the line
process, switch to choose for random lines (1) or evenly spaced lines (0).
0.25 100 Dk (spectral discretization) , Max. Harmonics
1999999 20 12 SEED, IB, KNORM
28
(iv) Coupled Markov Chain (CMC)
INTRODUCTION
This paper proposes an extension of the coupled Markov chain model, developed by
Elfeki, (1996) to characterize heterogeneity of natural formations, to conditioning on any number
of well data. The coupled Markov chain model is also an extension of the one-dimensional
Markov chain model used by Krumbein (1967) to synthesize a stratigraphic sequence. The
methodology is based on a Markov chain that is conditioned on the future states. The
conditioning is performed in an explicit way that makes it efficient in terms of computer time
and storage. In the next sections, the basic concepts of the classical one-dimensional Markov
chain and the coupled Markov chains theories are presented followed by the concept of
conditioning of Markov chain on the future states. Some applications on a hypothetical case
study and on real outcrop data are presented.
A Markov chain is a probabilistic model that exhibits a special type of dependence: given the
present the future does not dependent on the past. In formulas, let Z0, Z1, Z2,…, Zm be a sequence
of random variables taking values in the state space {S1, S2,…, Sn}. The sequence is a Markov
chain or Markov process if,
Pr( Z i = S k | Z i -1 = S l , Z i - 2 = S n , Z i -3 = S r ,..., Z 0 = S p ) =
(1)
Pr( Z i = S k | Z i -1 = S l ) =: plk ,
Sl Sk Sq
0 1 2 i-1 i i+1 N
29
Figure 1. Numbering series of events for a one-dimensional Markov chain.
where plk denotes the probability of transition from state Sl to state Sk, and n is the number of
states in the system. Thus the probability of a transition from S1 to S1, S2, ..., Sn is given by p1l, l =
1,2,…, n in the first row and so on. The matrix p has to fulfil specific properties: (1) its elements
are non-negative, plk ≥ 0; (2) the elements of each row sum up to one or,
∑p
k =1
lk =1 (2)
The transition probabilities considered in the previous section are called single step transitions.
One considers also N-step transitions, which means that transitions from a state to another take
place in N steps. The N-step transition probabilities can be obtained by multiplying the single-
step transition probability matrix by itself N times. Under some mild conditions on the transition
matrix (aperiodicity and irreducibility), the successive multiplication leads to identical rows (w1,
w2…, wn). So the wk (k=1, 2,…, n) are given by
(N)
lim plk = wk (3)
N →∞
and are called stationary probabilities. The wk are no longer dependent on the initial state Sl. The
stationary probabilities may also be found by solving the equations,
∑
l =1
wl plk = wk , k = 1 , ..., n (4)
30
One-dimensional Markov Chain Conditioned on Future States
Consider a one-dimensional series of events that are Markovian (see Figure 1). The probability
of cell i to be in state Sk, given that the previous cell i-1 is in state Sl and cell N is in state Sq can
be expressed mathematically as
Pr ( Z i = S k | Z i −1 = S l , Z N = S q )
Pr( Z i −1 = S l , Z i = S k , Z N = S q )
Pr ( Z i = S k | Z i −1 = S l , Z N = S q ) = (5)
Pr ( Z i −1 = S l , Z N = S q )
Pr ( Z i = S k | Z i −1 = S l , Z N = S q ) =
Pr ( Z N = S q | Z i −1 = S l , Z i = S k ) Pr ( Z i −1 = S l , Z i = S k ) (6)
Pr ( Z i −1 = S l , Z N = S q )
By applying the Markovian property on the conditional probability in the numerator of Eq. 6,
one obtains
Pr ( Z i = S k | Z i −1 = S l , Z N = S q ) =
Pr ( Z N = S q | Z i = S k ). Pr ( Z i −1 = S l , Z i = S k ) (7)
Pr ( Z i −1 = S l , Z N = S q )
The joint distributions in the numerator and the denominator can be expressed in terms of
conditional probabilities and marginal probabilities as
Pr ( Z i = S k | Z i −1 = S l , Z N = S q ) =
Pr ( Z N = S q | Z i = S k ). Pr ( Z i = S k | Z i −1 = S l ). Pr ( Z i −1 = S l ) (8)
Pr ( Z N = S q | Z i −1 = S l ). Pr( Z i −1 = S l )
31
( N −i )
p kq plk
Pr ( Z i = S k | Z i −1 = S l , Z N = S q ) = (9)
plq( N −i +1)
where, pkq(N-i) is the (N-i)-step transition probability, plk(N-i+1) is the (N-i+1)-step transition
probability. Eq. 9 can be rearranged in the form
plk p kq( N −i )
plk q = (10)
plq( N −i +1)
where plk|q is our target, the probability of cell i to be in state Sk, given that the previous cell i-1
is in state Sl and the future cell N is in state Sq.
In Eq. 10 when cell N is far from cell i the terms plq(N-i+1) and pkq(N-i) will cancel because they
will almost be equal to the stationary probability wq. However, when we get closer to cell N,
its state will start to play a role and the simulation results will be influenced by the state at that
cell.
The coupled chain describes the joint behaviour of a pair of independent systems, each evolving
according to the laws of a classical Markov chain (Billingsley, 1995). Consider two Markov
chains (Xi), (Yi) both defined on the state space {S1, S2,..., Sn} and having the positive transition
probability defined as,
The coupled transition probability plm,kf on the state space {S1, S2,..., Sn}×{S1, S2,..., Sn}is given
by,
32
1,1 Nx,1
i,j-1
i-1,j i,j Nx,j
1,Ny Nx,Ny
1,1 Nx,1
i,j-1
i-1,j i,j Nx,j
1,Ny Nx,Ny
Figure 2. Numbering system in two-dimensional domain for the coupled Markov chain.
Unconditional Markov chain (top) and conditional Markov chain on the states of the future
(bottom). Dark grey cells are known boundary cells, light grey cells are known cells inside the
domain (previously generated, the past), white cells are unknown cells. The future state used
to determine the state of cell (i,j) is cell (Nx, j).
Two coupled one-dimensional Markov chains (Xi) and (Yi) can be used to construct a two
dimensional spatial stochastic process on a lattice (Zi,j). Consider a two dimensional domain of
cells as shown in Figure 2. Each cell has a row number j and a column number i. Consider also a
given number of geological materials say n. The geological materials are coded as numbers. The
word "state", in this text, describes a certain geological unit, lithology, or bedding type. The (Xi)
chain will describe the structure of the geological unit in the horizontal direction. We will write
plkh = Pr ( X i +1 = S k | X i = S l ) (13)
Similarly, the (Yi) chain will describe the structure in the vertical direction and we will write,
v
p mk = Pr (Y j +1 = S k | Yi = S m) (14)
The stochastic process (Zij) will be obtained by coupling the (Xi) and (Yi) chain, but
forcing these chains to move to equal states. Hence,
Pr ( Z i , j = S k | Z i −1, j = S l , Z i , j −1 = S m) =
(15)
C Pr( X i = S k X i −1 = S l ) Pr(Y j = S k Y j −1 = S m )
where C is a normalizing constant which arises by not permitting transitions in the (Xi) and (Yi)
chain to different states. Hence
−1
⎛ n ⎞
C = ⎜⎜ ∑ plfh . pvmf ⎟⎟ . (16)
⎝ f =1 ⎠
33
h v
plk . p mk
plm ,k := Pr( Z i , j = S k | Z i −1, j = S l , Z i , j −1 = S m ) = . k = 1,...n (17)
∑p
f
h
lf . pvmf
1 1 1 1
1 2 1 2
1 1 1 2 1 2 1 1
1 1 1 1
1 2 1 2
2 1 2 2 2 2 2 1
2 2 2 2
1 2 1 2
1 1 1 2 1 2 1 1
2 2 2 2
1 2 1 2
2 1 2 2 2 2 2 1
As an example, suppose we have two chains that are operating on two different states coded as 1
and 2. The possible states at cell (i, j) given that the state of the previous cell (i-1, j) was 1, and
top cell (i, j-1) was in state 1 as well, are displayed in Figure 3 top row. It is possible that one
obtains the same state 1 or 2 from both chains as in the first two possibilities in Figure 3 top row,
or one could get different states from the chains as in the last two possibilities in the top row.
Here for example one has
h v
p11 . p 21
p12,1 = Pr( Z i , j = 1 | Z i −1, j = 1, Z i , j −1 = 2) = h v h v
. (18)
p11 . p 21 + p12 . p 22
Since it is already not evident how to define a notion for “future” in two dimensions, it is not
straightforward to extend the conditioning of one-dimensional Markov chains on future states to
the coupled chain. We shall therefore mainly consider a very simple and computationally cheap
approximative way by performing conditioning of the horizontal chain first, and coupling the
conditioned horizontal chain with the vertical chain afterwards. The expression of the conditional
probability in the coupled chain, according to this way, given the cell on the right hand side
boundary is given by
Pr ( Z i , j = S k | Z i −1, j = S l , Z i , j −1 = S m , Z N x , j = S q ) =
(19)
C ' Pr( Z i , j = S k | Z i −1, j = S l , Z N x , j = S q ) . Pr ( Z i , j = S k | Z i , j −1 = S m)
34
By inserting the expression derived in Eq. 10 into Eq. 19 and proceeding as in the
previous section we obtain
h h ( N x −i )
plk . p kq
Pr ( Z i , j = S k | Z i −1, j = S l , Z i , j −1 = S m , Z N x , j = S q ) = C '
h ( N x −i +1)
. pvmk (20)
p kq
Computing C’ as in the previous section and cancelling the numerators we finally find
A GEOLOGICAL SYSTEM
This section is similar to the description given by Elfeki, (1996) for estimation of model
parameters from field observations. For the sake of completeness, parameter estimation is
explained once again in the present context. A Markov chain is completely described when the
state space, transition probabilities and initial probabilities are given. The initial probabilities will
be chosen equal to the stationary probabilities. We will not need to estimate an initial distribution
as we well do simulations conditioned on well log and surface data. For a geological system
represented by a Markov chain, one has to perform the following steps. Firstly, the set of
possible states of the system {S1, S2,…, Sn} must be defined. Secondly, the probability, plk, of
going from a state Sl to state Sk in one interval must be estimated. Finally, the stationary
probabilities wk are determined either by estimation from the data or by calculation from the
transition probabilities. In practical applications, transition and stationary probabilities of a
geological system can be estimated from well logs, bore holes, surface and subsurface mapping
or from geological image synthesized by information derived from geologically similar sites or
analogous outcrops. The estimation procedure is given below.
v
v T lk
plk = (22)
n
∑
q =1
T lq
v
The vertical transition probability matrix can be estimated from well logs. The tally matrix of
vertical transitions is obtained by superimposing a vertical line with equidistant points along the
well with a chosen sampling interval. The transition frequencies between the states are calculated
by counting how many times a given state say Sl is followed by itself or the other states say Sk in
the system and then divided by the total number of transitions,
where Tlkv is the number of observed transitions from Sl to Sk in the vertical direction.
35
Similarly, the horizontal transition probability matrix can be estimated from geological
maps. Maps that shows formation extensions in the horizontal plane may be obtained from
geological survey. On the map plan, a transect is defined where the subsurface profile is
required. On the transect, a similar procedure is performed as in the case of vertical
transitions. A horizontal line with equidistant points at a proper sampling interval for the
horizontal direction is superimposed over the map. The transitions between different states are
counted and the horizontal transition probability matrix is computed using Eq. 25 with
superscript h instead of v.
Estimation of the proper sampling intervals is a trial and error procedure. There is no specific
rule. Perhaps the proper sampling interval in the vertical direction would be less than or equal to
the minimum thickness of the geologic unit found in the well log in order to be reasonably
reproduced in the simulation. Similarly, the proper sampling interval in the horizontal direction
would be less than or equal to the minimum length of a geological unit found in the planar
geological map.
THE ALGORITHM
Step 1: The two dimensional domain is discretized using proper sampling intervals.
Step 2: Well data is inserted in their locations at the well on the left side of the domain at
(1, j), j = 2,..., Ny, the well at the right side of the domain at (Nx ,j), j = 2,..., Ny, and the top surface
information at location (i,1), i = 1,..., Nx.
Step 3: Generate the rest of the cells inside the domain that is numbered (i, j), i = 2,..., Nx-
1 and j = 2,..., Ny row-wise using the conditional distribution Pr (Zi,j = Sk | Zi-1,j = Sl, Zi,j-1 = Sm,
ZNx,j = Sq), given that the states at (i-1, j), (i, j-1) and (Nx, j) are known. The four-index
conditional probability plm,k|q is calculated by Eq. 21. From state Sl at the horizontal neighbouring
cell (i-1, j), Sm at the vertical neighbouring cell (i, j-1) and the state Sq at the cell on the right hand
side boundary (Nx, j) one can determine the succeeding state Sk at cell (i, j). We simulate a state
for Sk according to the distribution given by (plm,r|q: r=1,…n).
Step 4: The procedure stops after having visited all the cells in the domain between the
two given wells at i=1 and i= Nx.
Step 5: The same procedure is followed for the next two wells and so on until the domain
is filled with the states.
36
Input data file for GEOMARKOV:
-10
Depth (m)
-20 2
-30
0 10 20 30 40 50 60 70 80 90 100
Longitudinal direction (m)
1
Figure .Geological realization generated by the GEOMARKOV.exe using the data presented in
the table.
Gmodel.res
This file contains the input data for the model and some statistics of one generated realization
(This file can be opened by “notpad”).
***********************************
* Input Data for Geological Model *
***********************************
Length of The Given Section (m)= 100.0000
37
Depth of The Given Section (m)= 30.00000
Sampling interval in X-axis (m)= 10.00000
Sampling interval in Y-axis (m)= 0.5000000
No. of States = 3
Seed = 9991
-------------------------------------
****************** ************************
*Input Statistics* *Calculated Statistics *
****************** ************************
Horizontal Transition Probability Matrix
0.700 0.150 0.150 0.708 0.162 0.130
0.150 0.700 0.150 0.108 0.716 0.176
0.150 0.150 0.700 0.145 0.131 0.724
Vertical Transition Probability Matrix
0.340 0.330 0.330 0.370 0.280 0.350
0.340 0.330 0.330 0.227 0.369 0.404
0.340 0.330 0.330 0.315 0.340 0.345
Marginal Probabilities of The States
State......Marginal Prob.............Marginal Prob.
from Transitions from Model
1 0.30236 0.29955
2 0.33386 0.33681
3 0.36378 0.36364
Geo.res
This file contains the input transition probabilities and their cumulative distributions (This file
can be opened by “notpad”).
***********************************
* Input Data for Geological Model *
***********************************
Length of The Given Section (m)= 100.0000
Depth of The Given Section (m)= 30.00000
Sampling interval in X-axis (m)= 10.00000
Sampling interval in Y-axis (m)= 0.5000000
No. of States = 3
Seed = 9991
-------------------------------------
***********************************
* Input Statistics for The Model *
***********************************
Horizontal Transition Probability Matrix
0.70000 0.15000 0.15000
0.15000 0.70000 0.15000
0.15000 0.15000 0.70000
HL. Cumulative Transition Prob. Matrix
0.70000 0.85000 1.00000
0.15000 0.85000 1.00000
0.15000 0.30000 1.00000
38
Vertical Transition Probability Matrix
0.34000 0.33000 0.33000
0.34000 0.33000 0.33000
0.34000 0.33000 0.33000
VL. Cumulative Transition Prob. Matrix
0.34000 0.67000 1.00000
0.34000 0.67000 1.00000
0.34000 0.67000 1.00000
Statist.dat
This file contains the computed transition probabilities and marginal probabilities form the first
generated realization and its cumulative distribution (This file can be opened by “surfer”)..
****************************************
*Calculated Statistics from The Single Realization*
****************************************
Horizontal Transition Probability Matrix
0.69469 0.17257 0.13274
0.19588 0.63918 0.16495
0.17895 0.13158 0.68947
HL. Cumulative Transition Prob. Matrix
0.69469 0.86726 1
0.19588 0.83505 1
0.17895 0.31053 1
Vertical Transition Probability Matrix
0.35628 0.35628 0.28745
0.39109 0.27228 0.33663
0.36967 0.28436 0.34597
VL. Cumulative Transition Prob. Matrix
0.35628 0.71255 1
0.39109 0.66337 1
0.36967 0.65403 1
Marginal Probabilities of The States
State......Marginal Probability
1 0.37407
2 0.30849
3 0.31744
P123.res
This file contains the coupled chain probabilities of both vertical and horizontal chains (This file
can be opened by “notpad”).
39
0.05100 0.04950 0.23100
0.70623 0.85312 1.00000
0.15385 0.85068 1.00000
0.15385 0.30317 1.00000
0.70623 0.85312 1.00000
0.15385 0.85068 1.00000
0.15385 0.30317 1.00000
0.70623 0.85312 1.00000
0.15385 0.85068 1.00000
0.15385 0.30317 1.00000
PIIT.DAT
This file contains some statistics about the average thickness of the generated layers and its
standard deviations.
PIIW.DAT
This file contains some statistics about the average widths of the generated layers and its
standard deviations.
HCURVE.DAT
VCURVE.DAT
40
0
-20
-40
0 0
-20 -20
-40 -40
0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
0 0
-20 -20
4
-40 -40
0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
0 0 3
-20 -20
-40 -40
2
0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
0 0
1
-20 -20
-40 -40
0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
0 0
-20 -20
-40 -40
0 20 40 60 80 100 120 140 160 180 200 0 20 40 60 80 100 120 140 160 180 200
Figure 4. Hypothetical example (with four different lithologies) showing how the method
works when conditioning on more than two wells is performed. Top left is the "real" reservoir
and all the next rows show the well locations and lithologies observed at each well (on the left
of the figure). The corresponding stochastic simulations (single realisations) conditioned on
these wells are shown on the right hand side of the
41