ssa30: Site cluster on Square Anisotropic 3D lattice with...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

ssa30() function provides sites labeling of the anisotropic cluster on 3D square lattice with von Neumann (1,0)-neighborhood.

Usage

1
2
ssa30(x=33, p=runif(6, max=0.6), 
      set=(x^3+1)/2, all=TRUE, shape=c(1,1))

Arguments

x

a linear dimension of 3D square percolation lattice.

p

a vector of relative fractions (0<p)&(p<1) of accessible sites (occupation probability) for lattice directions: (-x,+x,-y,+y,-z,+z).

set

a vector of linear indexes of a starting sites subset.

all

logical; if all=TRUE, mark all sites from a starting subset; if all=FALSE, mark only accessible sites from a starting subset.

shape

a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites.

Details

The percolation is simulated on 3D square lattice with uniformly weighted sites acc and the vector p, distributed over the lattice directions.

The anisotropic cluster is formed from the accessible sites connected with the initial subset set, and depends on the direction in 3D square lattice.

To form the cluster the condition acc[set+e[n]]<p[n] is iteratively tested for sites of the von Neumann (1,0)-neighborhood e for the current cluster perimeter set, where n is equal to direction in 3D square lattice.

Von Neumann (1,0)-neighborhood on 3D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1, 1, -x, x, -x^2, x^2).

Forming cluster ends with the exhaustion of accessible sites in von Neumann (1,0)-neighborhood of the current cluster perimeter.

Value

acc

an accessibility matrix for 3D square percolation lattice:
if acc[e]<p[n] then acc[e] is accessible site;
if acc[e]==1 then acc[e] is non-accessible site;
if acc[e]==2 then acc[e] belongs to a sites cluster.

Author(s)

Pavel V. Moskalev

References

[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2013) The structure of site percolation models on three-dimensional square lattices. Computer Research and Modeling, Vol.5, No.4, pp.607–622; in Russian.

See Also

fssa30, ssa20, ssi20, ssi30, ssa2d, ssa3d

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Example No.1. Axonometric projection of 3D cluster
require(lattice)
set.seed(20120521)
x <- y <- z <- seq(33)
cls <- which(ssa30(p=.09*c(1,6,1,3,2,1))>1, arr.ind=TRUE)
cloud(cls[,3] ~ cls[,1]*cls[,2],
xlim=range(x), ylim=range(y), zlim=range(z), 
col=rgb(1,0,0,0.4), xlab="x", ylab="y", zlab="z", main.cex=1,
main="Anisotropic (1,0)-cluster")

# Example No.2. Z=17 slice of 3D cluster
set.seed(20120521)
x <- y <- z <- seq(33)
cls <- ssa30(p=.09*c(1,6,1,3,2,1))
image(x, y, cls[,,17], zlim=c(0,2), cex.main=1, 
main="Z=17 slice of an anisotropic (1,0)-cluster")
abline(h=17, lty=2); abline(v=17, lty=2)

SPSL documentation built on May 2, 2019, 12:34 p.m.