Contents: Background Log-Normal Model Covariance Functions Spectral Algorithm References

This tutorial describes the mathematical model and spectral simulation algorithm underlying the Fgen92 applet. We assume the reader is familiar with stochastic groundwater hydrology and the basic concepts of random fields.

For a guide to the applet controls and interface see the User Interface Tutorial.

Source: This applet is a JavaScript implementation of the spectral algorithm described in:

Robin, M.J.L., Gutjahr, A.L., Sudicky, E.A., and Wilson, J.L. (1993). “Cross-Correlated Random Field Generation with Direct Fourier Transform Method.” Water Resources Research, 29(7), 2385–2397.

A FORTRAN implementation of this algorithm (FGEN v. 9.2.1) was originally converted to Java at UIUC. Only the two-dimensional, single random field case has been implemented here.

1 Background: Heterogeneity in Porous Media

It is well-recognized that natural porous media exhibit significant small-scale spatial variability in hydraulic conductivity. This heterogeneity has been documented in several detailed field experiments, including the Borden and Cape Cod tracer tests:

  • Mackay et al., Water Resour. Res., 22(13), 2017–2030, 1986
  • LeBlanc et al., Water Resour. Res., 27(5), 895–910, 1991

These studies and subsequent research led to the development of stochastic models for subsurface heterogeneity. The simplest and most widely used model assumes that the hydraulic conductivity K(x) is a realization of a log-normally distributed stationary random field.


2 Log-Normal Stationary Hydraulic Conductivity Field

Field Decomposition

The spatially variable hydraulic conductivity is expressed as the exponential of a random log-conductivity field Y(x):

(1) Y = ln K(x) = μY + y(x)

where μY is the expected value or mean of Y, and y(x) is a zero-mean deviation from μY. We assume that the mean value is a constant. The vector x represents a spatial location. We only consider a two-dimensional random field here, so x = (X1, X2). The coordinate X1 is assumed to be the horizontal direction and X2 is the transverse direction.

The fluctuation y(x) is modeled as a stationary Gaussian random field, completely characterized by its covariance function.

Covariance Function

The covariance between the field values at two arbitrary points x1 and x2 is defined as:

(2) RYY(x1, x2) = E[(Ŷ(x1) − μY)(Ŷ(x2) − μY)]

where E{} refers to the Expectation taken over an ensemble of random fields. Since the mean is assumed constant and y is zero-mean, expression (2) reduces to:

(3) RYY(x1, x2) = E[y(x1) · y(x2)]

Here we further assume that the random field y(x) is second-order stationary so that the covariance function between two points x1 and x2 depends only on the separation distance ξ = x2x1. Thus RYY(x1, x2) = RYY(x2x1) = RYY(ξ). Note that when the separation distance is zero, the covariance reduces to the variance of y: RYY(0) = σY².


3 Covariance Functions

Two covariance models are available in the applet. Both are anisotropic, with potentially different correlation lengths in x (λ1) and y (λ2).

Exponential Covariance

The exponential covariance model produces fields with a relatively rough (non-differentiable) spatial structure. It is commonly used in groundwater modeling:

(4) Ryy(ξ) = σy² exp [( ξ1² λ1² + ξ2² λ2² ) 1/2 ]

where:

  • σy² = variance
  • λ1, λ2 = correlation lengths in the x1 and x2 directions
  • ξ1, ξ2 = separation distances/components of ξ
Integral scale: For the exponential model, the integral scale in each direction equals λ (the input correlation length). The correlation length controls how quickly the covariance decays with distance — larger λ means longer-range spatial dependence and visually larger-scale patterns in the field.

Gaussian Covariance

The Gaussian (bell-shaped) covariance model produces fields that are infinitely differentiable (very smooth):

(5) Ryy(ξ) = σy² exp [( ξ1² λ1² + ξ2² λ2² ) ]

Gaussian fields appear visually smoother than exponential fields with the same λ, because the covariance decays more slowly near the origin.

Nugget Effect

The nugget variance σn² adds a discontinuity at the origin, representing small-scale variability below the grid resolution:

(6) CY,total(ξ) = σn² · δ(ξ) + (σY² − σn²) · Ĉ(ξ)

where δ(ξ) is the Dirac delta at the origin and Ĉ is the normalized covariance model. A nugget of 0 (default) means all variability is spatially correlated.


4 Spectral Simulation Algorithm

Overview

The Fgen92 algorithm uses the direct Fourier transform (spectral) method to generate a realization of the correlated Gaussian field Y(x). The key idea is that a stationary Gaussian random field is completely characterized by its spectral density function S(k1, k2), which is the 2D Fourier transform of the covariance function RYY(ξ).

Spectral Density Function

For the exponential covariance model, the 2D spectral density is:

(7) S(k1, k2) = σY² · Hcorv · π−1 · [1 + (k1λ1)² + (k2λ2)²]−3/2

For the Gaussian covariance model:

(8) S(k1, k2) = σY² · Hcorv · (4π)−1 · exp[−(k1λ1/2)² − (k2λ2/2)²]

where k1 and k2 are the angular wavenumbers and Hcorv = λ1 · λ2 is the correlation volume.

Simulation Steps

The algorithm proceeds on a periodic grid of size nfull_x × nfull_y (powers of 2):

  1. Compute spectral amplitudes: For each wavenumber pair (k1, k2), compute A(k) = √[S(k1, k2) · Δk1 · Δk2], where Δk are the wavenumber spacings.
  2. Generate random phases: For each mode, draw two independent standard normal random numbers U1, U2 using the seeded pseudo-random generator. These form the real and imaginary parts of the complex Fourier coefficient: Z(k) = A(k) · (U1 + i U2).
  3. Inverse FFT: Apply a 2D inverse FFT to the array of Z(k) values. This produces a realization of the spatially correlated Gaussian field Y(x) at each grid node. The FFT is unnormalized (following the original FORTRAN Fgen92 convention, matching the ISIGN=1 convention of the original FFTMD subroutine).
  4. Extract sub-grid: Only the first Nx × Ny values are used (the remainder of the nfull grid is discarded). The mean μY is added to obtain the final log K field: Y(x) = μY + y(x).

Pseudo-Random Number Generator

The applet uses a multi-generator PRNG faithful to the original FORTRAN implementation (RANH/GAUSH routines). The generator produces standard normal deviates using a combination of multiplicative congruential generators with constants M1, M2, M3, ensuring the same field is produced from the same seed across platforms.

FFT Grid Size and Accuracy

The FFT grid (nfull_x, nfull_y) must be powers of 2 and must be at least as large as the desired output grid (Nx, Ny). Larger FFT grids improve the spectral resolution of the simulation (finer wavenumber sampling), which yields a more accurate representation of the target covariance. The minimum power-of-2 grid size is used by default.

Periodic boundary effects: The spectral method inherently produces a periodic field. Only the first Nx × Ny cells are extracted, so the field does not repeat within the displayed domain as long as nfull ≥ N.

5 References

Primary Reference (Algorithm)

  • Robin, M.J.L., Gutjahr, A.L., Sudicky, E.A., and Wilson, J.L. (1993). “Cross-Correlated Random Field Generation with Direct Fourier Transform Method.” Water Resources Research, 29(7), 2385–2397.

Field Experiment Studies

  • Mackay, D.M., Freyberg, D.L., Roberts, P.V., and Cherry, J.A. (1986). “A natural gradient experiment on solute transport in a sand aquifer: 1. Approach and overview of plume movement.” Water Resources Research, 22(13), 2017–2030.
  • LeBlanc, D.R., Garabedian, S.P., Hess, K.M., Gelhar, L.W., Quadri, R.D., Stollenwerk, K.G., and Wood, W.W. (1991). “Large-scale natural gradient tracer test in sand and gravel, Cape Cod, Massachusetts, 1. Experimental design and observed tracer movement.” Water Resources Research, 27(5), 895–910.

Further Reading — Stochastic Groundwater Hydrology

  • Dagan, G. (1989). Flow and Transport in Porous Formations. Springer-Verlag.
  • Gelhar, L.W. (1993). Stochastic Subsurface Hydrology. Prentice-Hall.
  • Zhang, D. (2002). Stochastic Methods for Flow in Porous Media: Coping with Uncertainties. Academic Press, San Diego, CA.

← User Interface Tutorial
► Launch the Model ← UI Tutorial