View source: R/fracture_matrix.R
fracture_matrix | R Documentation |
Generate a fracture field matrix
fracture_matrix(
dims = c(10, 10),
span = diag(nrow = length(dims)),
period = diag(nrow = length(dims)),
shift = rep(0, length(dims)),
power.iso,
power.spectrum = function(f) power.iso(sqrt(rowSums(f * f))),
cov.iso,
cov.structure = function(d) cov.iso(sqrt(rowSums(d * d))),
corr.profile = function(k) 0,
closed = 0.1,
gap,
seed,
corr.method = c("midline", "top", "mixed"),
length_one = FALSE,
gauss.order = 1
)
dims |
Dimensions of the fracture matrix (length N) |
span |
base spanning the fracture (matrix NxN) |
period |
base of periodicity parallelogram |
power.spectrum |
power spectrum of the fields (function of frequency) |
corr.profile |
correlation profile between (function of wave length) |
closed |
the probability of fields touching |
gap |
mean gap between upper and lower fields (overwrites closed) |
seed |
random seed |
length_one |
use complex numbers of length one for field generation |
Brown, S. R. (1995). Simple mathematical model of a rough fracture. Journal of Geophysical Research: Solid Earth, 100(B4), 5941-5952.
seed = 123
power.spectrum = function(f) f^{-2.5}
par(mfrow=c(2,2))
ret = fracture_matrix(dims=c(50,50),span = diag(2), power.iso = power.spectrum, seed=seed)
plot(ret)
ret = fracture_matrix(dims=c(50,50),span = matrix(c(1,1,-1,1),2,2), power.iso = power.spectrum, seed=seed)
plot(ret)
ret = fracture_matrix(dims=c(50,50),span = diag(2)*2, power.iso = power.spectrum, seed=seed)
plot(ret)
ret = fracture_matrix(dims=c(50,50),span = diag(2)*2,period=diag(2)*2, power.iso = power.spectrum, seed=seed)
plot(ret)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.