ssi2d {SPSL}R Documentation

Site cluster on Square Isotropic 2D lattice with (1,d)-neighborhood

Description

ssi2d() function provides sites labeling of the isotropic cluster on 2D square lattice with Moore (1,d)-neighborhood.

Usage

ssi2d(x=33, p0=0.5, p1=p0/2, 
      set=(x^2+1)/2, all=TRUE, shape=c(1,1))

Arguments

x

a linear dimension of 2D square percolation lattice.

p0

a relative fraction (0<p0)&(p0<1) of accessible sites (occupation probability) for percolation lattice.

p1

p0 value, weighted by Minkowski distance: p1=p0/rhoMe1.

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 2D square lattice with uniformly weighted sites acc and the constant parameters p0 and p1.

The isotropic cluster is formed from the accessible sites connected with initial sites subset set.

To form the cluster the condition acc[set+eN]<pN is iteratively tested for sites of the Moore (1,d)-neighborhood eN for the current cluster perimeter set, where eN is equal to e0 or e1 vector; pN is equal to p0 or p1 value.

Moore (1,d)-neighborhood on 2D square lattice consists of sites, at least one coordinate of which is different from the current site by one: e=c(e0,e1), where
e0=c(-1, 1, -x, x, -x^2, x^2);
e1=colSums(matrix(e0[c(1,3, 2,3, 1,4, 2,4)], nrow=2)).

Minkowski distance between sites a and b depends on the exponent d:
rhoM <- function(a, b, d=1)
if (is.infinite(d)) return(apply(abs(b-a), 2, max))
else return(apply(abs(b-a)^d, 2, sum)^(1/d)).

Minkowski distance for sites from e1 subset with the exponent d=1 is equal to rhoMe1=2.

Forming cluster ends with the exhaustion of accessible sites in Moore (1,d)-neighborhood of the current cluster perimeter.

Value

acc

an accessibility matrix for 2D square percolation lattice:
if acc[e]<pN 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 <moskalefff@gmail.com>

References

[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
[2] Moskalev, P.V. (2014) Estimates of threshold and strength of percolation clusters on square lattices with (1,d)-neighborhood. Computer Research and Modeling, Vol.6, No.3, pp.405–414; in Russian.

See Also

fssi2d, ssi3d, ssi20, ssi30, ssa2d, ssa3d

Examples

set.seed(20120507)
x <- y <- seq(33)
image(x, y, ssi2d(), zlim=c(0,2), 
main="Isotropic (1,1)-cluster")
abline(h=17, lty=2); abline(v=17, lty=2)

[Package SPSL version 0.1-9 Index]