1. Introduction

In statistical physics only a few problems can be solved exactly. For complex problems, numerical methods can give exact results for problems that could only be solved in an approximate way. Numerical simulation can be a way to test the theory. The numerical results can be compared to the experimental results. The numerical simulation is placed between the fundamental and the experimental treatment; it has a quasi-experimental character (numerical experience). For problems of statistical physics, the most widely used simulation methods are the Monte Carlo method and the molecular dynamics method.

The first Monte Carlo simulation (MCS) was proposed by Metropolis et al. in 1953 [1]. The second Monte Carlo simulation was proposed by Wood and Parker in 1957 [2]. The obtained results were in good agreement with the experimental results of Bridgman [3] and those of Michels et al. [4]. In this method we attribute a series of initial positions chosen randomly to a system of N particles interacting through a defined potential. A sequence of particle configurations is generated by giving successive displacements to particles; we only retain configurations to ensure that the probability density is that of the chosen.

Molecular dynamics simulation (MDS) has been first introduced to simulate the behavior of fluids and solids at the molecular or atomic level. MDS was used for the first time by Alder and Wainwright in the late 1950s [5, 6] to study the interactions of hard spheres. The principle is the resolution of equations of motion for a hard sphere system in a simulation cell. The basic algorithm is Verlet's algorithm [7].

3.2 Definition of the mathematical model

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

• The forces between particles and elements

or probabilistic problem.

• The potential interaction

• The determination of a time scale

• The determination of a length scale

3.3 Elaboration of simulation code

• Validation of the model on simple cases

4. Algorithms and techniques for MCS

4.1 Integration of function of a single variable

domain {a, b} has been proposed (Figure 1):

Let:

119

• Simulation calculation on complex phenomena

phenomenon:

Mathematical model requires a mathematical formulation of the problem. It may be a problem of elements or discrete object or a problem of a continuous medium; it may be a spatiotemporal problem or frequency problem and may be a deterministic

How to Use the Monte Carlo Simulation Technique? Application: A Study of the Gas Phase…

It would be interesting to know the mathematical equations that govern the

• Definition of constant magnitudes of motion and equilibrium magnitudes

The MCS technique has been chosen for this work; knowing its basic algorithm

The MCS is based on a probabilistic process with a random choice of configura-

Calculation of the definite integral for a function f(x) of a single variable x on

f xð Þdx (1)

I ¼ ð b

greater than the f(x) for x belonging to the domain {a, b} (or x ∈ {a, b}).

other IMSL mathematical libraries) of random numbers can be used:

a

Let xi and yi be real random numbers (i = 1, 2,…, N), and let H be a real number

Let r1 and r2 be two random numbers belonging to the domain {0, 1} according to a uniform distribution law. Generators (e.g., Ran, RANDOM, RANDUM, or

tions and samples of the situation of the physical system. The two pedagogical examples most cited in the literature are the integration of a single variable function and Ising's model of spin. In the following subsection, we define the integration of a single variable function. We introduce the Ising model at the end of Section 4.2.2.

• Continuity equations, balance equations, transfer equations, etc.

is necessary for elaborating the simulation. This step requires some actions:

In this chapter, we will present techniques of numerical simulations using the Monte Carlo method. We will present an application on the gas phase during plasma-enhanced chemical vapor deposition (PECVD) of thin films. The application concerns collisions between particles. Particles are in Brownian motion. Collisions, elastic or inelastic, are considered to be binary. Non-elastic collisions result in effective chemical reactions.

In Section 2, we cite some MCS and MDS works on PECVD processes. Section 3 presents general rules on numerical simulation methods. Section 4 presents how to simulate a physical problem using MCS? We present the Metropolis algorithm as a scheme to trait random configurations and different modules related to elaborate an MCS code. In Section 5, we apply the MCS on SiH4/H2 gas mixture during a PECVD process. Finally the conclusion summarizes the contents of the chapter.
