2. Local disorder-based CMC method

Let the considered physical system be characterized by a discrete spectrum of microscopic energy states (microstates) labeled by Eα. Furthermore, let the system be in equilibrium with a thermostat having a temperature T. According to basic principles of statistical mechanics, the probability that the system occupies the state α is proportional to the Boltzmann factor: exp ð Þ �βE<sup>α</sup> , where β ¼ 1=kBT, kB refers to the Boltzmann constants. Then, the equilibrium value of some system quantity (observable) F can be calculated using the following formula [12, 13]:

$$\overline{F} = \frac{1}{Z} \sum\_{a} F\_{a} \exp\left(-\beta E\_{a}\right),\tag{1}$$

where <sup>Z</sup> <sup>¼</sup> <sup>P</sup> <sup>α</sup> exp ð Þ �βE<sup>α</sup> is the partition function. The direct use of Eq. (1) is impractical due to a very large number of states that should be taken into account. Indeed, even for small systems as, for example, a two-dimensional 10 � 10 lattice of Application of Local Information Entropy in Cluster Monte Carlo Algorithms DOI: http://dx.doi.org/10.5772/intechopen.88627

spins, we get a total of 2100 states—the number that makes the summation occurring in Eq. (1) impossible.

In order to estimate the average ´F, a nonuniform sampling of the system states can be applied. If f gα denotes a set of indices of M system states selected with the probability pα, the equilibrium value of the observable F can be modeled [13] by the estimator:

$$F\_S = \frac{\sum\_{\{a\}} F\_a \exp\left(-\beta E\_a\right) p\_a^{-1}}{\sum\_{\{a\}} \exp\left(-\beta E\_a\right) p\_a^{-1}} = \frac{1}{N} \sum\_{\{a\}} F\_{a\nu} \tag{2}$$

where probabilities p<sup>α</sup> were selected to be equal exp ð Þ �βE<sup>α</sup> =Z. All we need is a method that generates a set of system states with the Boltzmann probabilities pα. Because the exact value of the partition function Z is unknown, the generation of the states is usually carried out by the ergodic Markov process. This process produces a proper chain of states under the assumption that transition probability Wαβ (from α to β state) is independent of the states preceding α. Moreover, It is also assumed that the detailed balance condition, pβWβα ¼ pαWαβ, is satisfied when the system is in a state of equilibrium [12–15].

The transition probability Wαβ can be considered as a product of the selection probability gαβ and the acceptance ratio (probability)Aαβ. In general, the selection probabilities can be chosen to a large extent freely, e.g., they can be symmetrical gαβ ¼ gβα [12]. In that case the acceptance probabilities satisfy the equation:

$$A\_{a\beta}/A\_{\beta a} = \exp\left(-\beta\left(E\_{\beta} - E\_a\right)\right) \tag{3}$$

As an example, let us consider Ising model of N interacting spins placed at the nodes of a two-dimensional regular. The energy of the system is, then, given by the formula

$$E = -J\sum\_{i \neq j=1}^{N} s\_i s\_j \tag{4}$$

where si ¼ �1 describes the spin state at the ith lattice node and J refers to the exchange integral. In order to determine the physical properties of our magnetic system, the Metropolis algorithm can be employed. It relies on the particular choice of both the selection probability and the acceptance ratio. Having some configuration of spins, the next one is obtained by the flip of a single spin (single-spin-flip algorithm) [12, 13]. This procedure results in uniform distribution of the selection probabilities, i.e., each new state participates in simulations with probability gαβ ¼ 1=N. Then, the new spin configuration can be accepted or rejected with an acceptance ratio Aαβ ¼ exp �β E<sup>β</sup> � E<sup>α</sup> � � � � (for <sup>E</sup><sup>β</sup> � <sup>E</sup><sup>α</sup> <sup>&</sup>gt;0) and <sup>A</sup>αβ <sup>¼</sup> 1 (for all other cases). Although the Metropolis algorithm can be applied to a variety of physical problems, when applied to magnetic systems, it has disadvantage that relies on a very rapid increase of the correlation time as well as correlation length near the critical point. As a result the system contains domains of the same oriented spins and therefore becomes configurationally frozen. This unexpected behavior (critical slowing down) of the Metropolis algorithm is the reason for the difficulties in the generation of statistically independent spin configurations that are needed for the calculation of the estimator FS.

The solution of the critical slowing down problem was proposed by Swendsen-Wang [7] and later by Wolff [8]. The approach developed by Wolf (cluster-flipping

One of the bright examples of the application of the MMC algorithm is the Ising model of spins located on the nodes of some lattice. Indeed, using this method one can study a course of magnetic ordering and its dependence of temperature and

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

The MMC method utilizes the single-spin-flip procedure to change the spin configuration; however, in many cases (e.g., simulations of magnetization processes) a more effective algorithm is needed. The simplest approach relies on the generation of a cluster of uniformly oriented spins and their subsequent flip to reach new state of the system. The main question is how to determine the cluster and how to establish a rule of its acceptance, simultaneously satisfying the detailed balance condition. Classical approaches, based on the Kasteleyn-Fortuin theorem [5, 6], were proposed by Swendsen and Wang (SW) [7] as well as by Wolff [8] who assumed a specific cluster-building procedure controlled by the so-called adding probability. It is known that the cluster Monte Carlo methods (CMC) are very efficient in the analysis of critical phenomena, e.g., transformation from ferromagnetic to paramagnetic phase [9, 10]. In contrast, their application for studying magnetization processes of systems far below the Curie point produces artificial results, which can be demonstrated for the systems containing magnetically different phases (e.g., hard and soft) as well as geometrical irregularities. The clusterbuilding algorithms implemented within SW and Wolf approaches are steered by the exchange interactions and the system temperature, but they are not sensitive to

In order to broaden the applications of the CMC methods to simulations of real magnetic composites, we proposed a new method based on some modification of the SW/Wolff adding probability and a particular Metropolis-like algorithm, ensuring the principle of detailed balance [11]. The idea is based on the fact that some kind of regions of the system, characterized by a local disorder of selected system property, constitutes natural barriers for the extension of clusters. In the case of magnetic multiphase composites, spatial distribution of the magnetic anisotropy can be considered as the property affecting the cluster formation.

In the chapter, the disorder-based CMC algorithm is introduced and discussed in a context of classical CMC methods. We show that the new simulation procedure is efficient leading to physically reliable results, especially for multiphase magnetic

Let the considered physical system be characterized by a discrete spectrum of microscopic energy states (microstates) labeled by Eα. Furthermore, let the system be in equilibrium with a thermostat having a temperature T. According to basic principles of statistical mechanics, the probability that the system occupies the state α is proportional to the Boltzmann factor: exp ð Þ �βE<sup>α</sup> , where β ¼ 1=kBT, kB refers to the Boltzmann constants. Then, the equilibrium value of some system quantity

impractical due to a very large number of states that should be taken into account. Indeed, even for small systems as, for example, a two-dimensional 10 � 10 lattice of

F<sup>α</sup> exp ð Þ �βE<sup>α</sup> , (1)

<sup>α</sup> exp ð Þ �βE<sup>α</sup> is the partition function. The direct use of Eq. (1) is

(observable) F can be calculated using the following formula [12, 13]:

<sup>F</sup> <sup>¼</sup> <sup>1</sup> Z X α

other features, potentially affecting the clusterization of spins.

details of interactions between the spins.

composites.

where <sup>Z</sup> <sup>¼</sup> <sup>P</sup>

140

2. Local disorder-based CMC method

algorithm) based on the generation of the uniformly oriented spin cluster and its subsequent flipping [12]. In contrast to single-spin-flip algorithm, this procedure easily destroys domains of correlated spins and allows the system to walk through the configuration space. The Wolff algorithm is recognized to be more effective than the Swendsen-Wang one [16–18]. The selection of a spin cluster starts from randomly chosen spin to which the neighbors occupying the same spin state are added with the probability Padd. The cluster grows up until no spin is added to it. It is a great advantage that the Wolff algorithm is a rejection-free one. Indeed, adding probability Padd is defined so that the detailed balance condition (with acceptance ratio equal to one) is met:

$$P\_{add} = \mathbf{1} - \exp\left(-2\beta I\right) \tag{5}$$

where pi ¼ Ni=N stands for the probability of finding Ki value inside the sphere

NK

� � (8)

� � (9)

pK <sup>¼</sup> exp �Sloc � � (10)

add among the system nodes.

add by

add exp <sup>S</sup>loc � � <sup>¼</sup>

add, we follow an analogy with deriva-

i¼1 pi ln pi

<sup>Ω</sup>f g ni <sup>≈</sup> exp NSloc

The probability of particular local distribution f g ni of the system property K is proportional to Ωf g ni . If the only one value of K dominates its distribution inside the sphere V, e.g., Nf g ; 0; …0 , the local information entropy achieves the lowest value <sup>S</sup>loc <sup>¼</sup> 0. Other local distribution f g ni that involves more than one value of <sup>K</sup> results

Now we can introduce the perception of local disorder of the K system property and its measure pK. We will say that the K system property is fully ordered inside the sphere V if all the nodes inside the sphere have the same value of K. Consequently, one can say that the sphere V exhibits some local disorder of K if more values of K are distributed inside the sphere. The measure of the local disorder can

which gives pK <sup>¼</sup> 1 if the case of fully ordered system property (Sloc <sup>¼</sup> 0). One

We assume that local disorder of K system property decreases the probability of

can see that pK decreases when local disorder of K system property increases

cluster growth and constitutes barriers for cluster expansion. Thus, one could

tion of the van der Waals equation. Our "ideal gas" corresponds to the uniform distribution of adding probability given by Wolff algorithm, while "real gas" refers to the case when the distribution of adding probability is affected by local disorder of some system property. In order to still play with Wolf algorithm, an influence of local disorder should be compensated in some way, e.g., by multiplication P<sup>0</sup>

1 � exp ð Þ �2βJ , the adding probability that takes into account the impact of local

The above equation is the clue of our method which expresses the decrease of the classical adding probability by the disorder-based factor. A set of property, for which the disorder is determined (by the local information entropy), should be chosen dependently on a specific application. The α parameter expresses some enhancement or weakness of the influence of the entropy on the system clusterization. It should be

add <sup>¼</sup> ½ � <sup>1</sup> � exp ð Þ �2β<sup>J</sup> exp �αSloc � � (11)

<sup>k</sup> . Then, assuming that this product satisfies the Wolff's formula P<sup>0</sup>

expect nonuniform distribution of adding probability P<sup>0</sup>

disorder of some system property can be easily obtained:

defined regarding the specific problem (see next paragraphs).

P0

In order to derive a reasonable formula for P<sup>0</sup>

f g ni

V. The expression on the right side of Eq. (7) contains the term called local

f g ni ¼ �<sup>X</sup>

Sloc

Application of Local Information Entropy in Cluster Monte Carlo Algorithms

So the number of "microstates" corresponding to the K-state is

information entropy [19]:

DOI: http://dx.doi.org/10.5772/intechopen.88627

in Sloc >0.

(Sloc >0).

p�<sup>1</sup>

143

be defined by as follows:

Despite the great achievements, the Wolff model is not able to correctly simulate magnetic phenomena that occur far below the critical point in real magnetic materials, including those that are composed of various magnetic phases as well as those containing geometrical irregularities. To be more precise, one can consider, as an example, remagnetization of the system build of two magnetically hard and soft ferromagnetic spheres coupled by a narrow bridge. Let us assume that in the initial state, the magnetization of the system is collinear with the direction of the external magnetic field and then the magnetic field is switched in the opposite direction. What happens to the system is that the magnetization of the soft sphere will follow the change of the magnetic, and then the similar behavior of the hard sphere is expected. Unfortunately, for systems with strong spin-spin coupling, the two-step behavior of the considered system cannot be modeled using Wolff clusterization algorithm. Indeed, every attempt to build a cluster within the two-sphere magnetic system results in that the hard and soft spheres belong to the same cluster independently on magnetic anisotropy and geometry of the system. So, even if the two-step remagnetization process is energetically preferred, the simulated magnetization curve consists of one step related to the common spin rotation. Taking into account the problems encountered during modeling the remagnetization of magnetically inhomogeneous system, we propose a modification of the Wolff algorithm that relies on an assumption that some regions of the system, characterized by a disorder of selected system property, can serve barriers for an extension of magnetic clusters.

We began from the introduction a distribution of system property K that can refer, for example, magnetic anisotropy or some other properties potentially affecting the clusterization of the system. Let us define a sphere V around a node of the spin lattice—the sphere containing N nodes in total. Furthermore, let the system property be characterized by a discrete and finite set of values: K1, K2, …, KNK . The local distribution of the K system property is defined by the numbers f g ni ¼ n1; n2; …; nNK f g, where ni stands for the number of nodes having the value Ki. The sum overall is ni equals N. Thus, the particular K-state of the sphere V is defined by the set of numbers f g ni . The number of possible realizations of the K-state denoted by Ωf g ni is given by the expression

$$\mathcal{Q}\_{\{n\_{i}\}} = \frac{N!}{n\_{1}!n\_{2}!...n\_{N\_{K}}!} \tag{6}$$

Using the Stirling formula, the previous equation takes the form

$$\ln\left(\mathcal{Q}\_{\{n\_i\}}\right) \approx -N\sum\_{i=1}^{N\_K} p\_i \ln\left(p\_i\right) \tag{7}$$

Application of Local Information Entropy in Cluster Monte Carlo Algorithms DOI: http://dx.doi.org/10.5772/intechopen.88627

where pi ¼ Ni=N stands for the probability of finding Ki value inside the sphere V. The expression on the right side of Eq. (7) contains the term called local information entropy [19]:

$$S\_{\{n\_i\}}^{loc} = -\sum\_{i=1}^{N\_K} p\_i \ln \left( p\_i \right) \tag{8}$$

So the number of "microstates" corresponding to the K-state is

$$\mathcal{Q}\_{\{n\_i\}} \approx \exp\left(N S\_{\{n\_i\}}^{loc}\right) \tag{9}$$

The probability of particular local distribution f g ni of the system property K is proportional to Ωf g ni . If the only one value of K dominates its distribution inside the sphere V, e.g., Nf g ; 0; …0 , the local information entropy achieves the lowest value <sup>S</sup>loc <sup>¼</sup> 0. Other local distribution f g ni that involves more than one value of <sup>K</sup> results in Sloc >0.

Now we can introduce the perception of local disorder of the K system property and its measure pK. We will say that the K system property is fully ordered inside the sphere V if all the nodes inside the sphere have the same value of K. Consequently, one can say that the sphere V exhibits some local disorder of K if more values of K are distributed inside the sphere. The measure of the local disorder can be defined by as follows:

$$p\_K = \exp\left(-\mathcal{S}^{\rm loc}\right) \tag{10}$$

which gives pK <sup>¼</sup> 1 if the case of fully ordered system property (Sloc <sup>¼</sup> 0). One can see that pK decreases when local disorder of K system property increases (Sloc >0).

We assume that local disorder of K system property decreases the probability of cluster growth and constitutes barriers for cluster expansion. Thus, one could expect nonuniform distribution of adding probability P<sup>0</sup> add among the system nodes. In order to derive a reasonable formula for P<sup>0</sup> add, we follow an analogy with derivation of the van der Waals equation. Our "ideal gas" corresponds to the uniform distribution of adding probability given by Wolff algorithm, while "real gas" refers to the case when the distribution of adding probability is affected by local disorder of some system property. In order to still play with Wolf algorithm, an influence of local disorder should be compensated in some way, e.g., by multiplication P<sup>0</sup> add by p�<sup>1</sup> <sup>k</sup> . Then, assuming that this product satisfies the Wolff's formula P<sup>0</sup> add exp <sup>S</sup>loc � � <sup>¼</sup> 1 � exp ð Þ �2βJ , the adding probability that takes into account the impact of local disorder of some system property can be easily obtained:

$$P\_{add}' = \left[1 - \exp\left(-2\beta I\right)\right] \exp\left(-a\mathbf{S}^{loc}\right) \tag{11}$$

The above equation is the clue of our method which expresses the decrease of the classical adding probability by the disorder-based factor. A set of property, for which the disorder is determined (by the local information entropy), should be chosen dependently on a specific application. The α parameter expresses some enhancement or weakness of the influence of the entropy on the system clusterization. It should be defined regarding the specific problem (see next paragraphs).

algorithm) based on the generation of the uniformly oriented spin cluster and its subsequent flipping [12]. In contrast to single-spin-flip algorithm, this procedure easily destroys domains of correlated spins and allows the system to walk through the configuration space. The Wolff algorithm is recognized to be more effective than the Swendsen-Wang one [16–18]. The selection of a spin cluster starts from randomly chosen spin to which the neighbors occupying the same spin state are added with the probability Padd. The cluster grows up until no spin is added to it. It is a great advantage that the Wolff algorithm is a rejection-free one. Indeed, adding probability Padd is defined so that the detailed balance condition (with acceptance

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

Despite the great achievements, the Wolff model is not able to correctly simulate magnetic phenomena that occur far below the critical point in real magnetic materials, including those that are composed of various magnetic phases as well as those containing geometrical irregularities. To be more precise, one can consider, as an example, remagnetization of the system build of two magnetically hard and soft ferromagnetic spheres coupled by a narrow bridge. Let us assume that in the initial state, the magnetization of the system is collinear with the direction of the external magnetic field and then the magnetic field is switched in the opposite direction. What happens to the system is that the magnetization of the soft sphere will follow the change of the magnetic, and then the similar behavior of the hard sphere is expected. Unfortunately, for systems with strong spin-spin coupling, the two-step behavior of the considered system cannot be modeled using Wolff clusterization algorithm. Indeed, every attempt to build a cluster within the two-sphere magnetic system results in that the hard and soft spheres belong to the same cluster independently on magnetic anisotropy and geometry of the system. So, even if the two-step remagnetization process is energetically preferred, the simulated magnetization curve consists of one step related to the common spin rotation. Taking into account the problems encountered during modeling the remagnetization of magnetically inhomogeneous system, we propose a modification of the Wolff algorithm that relies on an assumption that some regions of the system, characterized by a disorder of selected system property, can serve barriers for an extension of magnetic clusters. We began from the introduction a distribution of system property K that can refer, for example, magnetic anisotropy or some other properties potentially affecting the clusterization of the system. Let us define a sphere V around a node of the spin lattice—the sphere containing N nodes in total. Furthermore, let the system property be characterized by a discrete and finite set of values: K1, K2, …, KNK . The

local distribution of the K system property is defined by the numbers

K-state denoted by Ωf g ni is given by the expression

142

f g ni ¼ n1; n2; …; nNK f g, where ni stands for the number of nodes having the value Ki. The sum overall is ni equals N. Thus, the particular K-state of the sphere V is defined by the set of numbers f g ni . The number of possible realizations of the

<sup>Ω</sup>f g ni <sup>¼</sup> <sup>N</sup>!

� �<sup>≈</sup> � <sup>N</sup><sup>X</sup>

NK

i¼1 pi ln pi

Using the Stirling formula, the previous equation takes the form

ln Ωf g ni

<sup>n</sup>1!n2!…nNK ! (6)

� � (7)

Padd ¼ 1 � exp ð Þ �2βJ (5)

ratio equal to one) is met:
