Skip to contents

\(f(s) = \sqrt{2\,sill/M} \sum_m \cos(\omega_m \cdot s + \phi_m)\) with uniform phases and wave vectors from the normalised spectral density (Shinozuka 1971; Shinozuka and Deodatis 1991), so the covariance is exactly \(sill\,\rho(h)\). Radius quantiles: gaussian \((2/a)\sqrt{-\log U}\); matern (exponential = nu 1/2) \(\sqrt{U^{-1/\nu} - 1}/a\); uniform direction. Uniforms are Philox streams 0, 1, 2 of seed, identical to the Python arm.

Usage

RandomPhaseField(
  coords,
  cov_model = "exponential",
  sill = 1,
  range_ = 1,
  nu = 0.5,
  n_waves = 500L,
  seed = 1L
)

Arguments

coords

Two-column matrix of locations.

cov_model

"exponential", "gaussian" or "matern".

sill

Variance.

range_

Range a.

nu

Matern smoothness.

n_waves

Number of waves M.

seed

Philox seed.

Value

List with field, omega (M x 2), phase.

References

Shinozuka, M. (1971). Simulation of multivariate and multidimensional random processes. Journal of the Acoustical Society of America 49, 357-367.

Shinozuka, M. and Deodatis, G. (1991). Simulation of stochastic processes by spectral representation. Applied Mechanics Reviews 44, 191-204.

Examples

RandomPhaseField(rbind(c(0, 0), c(1, .5)), "gaussian", n_waves = 4, seed = 2)$field
#> [1]  0.4811861 -0.2496274