Documente Academic
Documente Profesional
Documente Cultură
The Simulation
Sizing the System
The first task is to establish an estimate of the dimensions of the domain that corresponds to our
prescribed number of particles, and to show why it was impractical to simulate a 100 micron wide
channel.
From the ideal equation of state,
V =
NkT
P
From experience, it is known that for surface interaction problems, the number of particles should be
kept close to 1000 if results are needed within a few hours using a dual-core 2.66 Ghz computer*. If
we are to deal with 1000 particles at atmospheric conditions,
V =
It was also found that for a free gas simulation (no surfaces), the simulation is much faster, and in that case using 10,000
or more particles was very practical.
L = V 1 / 3 = 3.5 10 -8 m
The resulting length dimension is 35 nm, which is coincidentally representative of Carbon nanotubes.
A similar procedure for a 100 micron wide channel calls for particle numbers on the order of 1013,
something that was not practical given the computing resources.
Implementation
For a detailed, step-by-step explanation of the implementation, the code has been thoroughly
commented, and so a brief overview will be given here with the governing equations.
First, the number of particles, the volume of the system, and the temperature were prescribed.
Next, three arrays of length N were generated, and the values were random numbers between 0 and the
box length. Each array represents a dimension, and so the index numbers represent particle numbers,
and the values at each index number of the arrays correspond to the coordinates in 3 dimensions. A
sample random distribution of particles is shown in figure 1.
z-dimension (Angstroms)
200
150
100
50
0
200
150
100
50
0
y-dimension (Angstroms)
50
100
150
200
x-dimension (Angstroms)
r0 6 r0 12
U (r ) = 4 +
r r
where the constants r0 and depend on the gas that is under consideration.
It is common practice to evaluate this energy only over the area where it is significant, and so it was
calculated up to a radius rC, where rC is usually around 20r0-30r0 but it was adjusted for each
simulation keeping in mind the box size. However, simply truncating the potential at a specified radius
can result in noise which can corrupt our calculations. A better approach is to use the same potential
expression, but subtracted by its (insignificant) value at rC. This causes the energy to smoothly
approach zero at rC, while causing a negligible change in the absolute magnitude of the energy.
So the potential was
U C (r ) = U ( r ) U (rC )
r < rC
dU
24
F =
=
dr
r
And this force will be used to calculate the pressure;
P = kT +
1
3V
r r
F (r ).r
ij
ij
j >i
For the periodic boundary case (free gas), this is all we need to calculate the compressibility.
The standard Metropolis algorithm was then implemented: the particles were placed in their initial
random positions, and the energy of the system was calculated. Then a particle was chosen at random
and displaced, the new energy was calculated, and the move was accepted or rejected based on the
Metropolis criterion. Iterations continued until relatively steady values of the configurational energy
were achieved, and then the relevant properties of the gas were calculated (pressure and
compressibility). The results of the baseline simulation are presented in the next section, and they are
intended to validate the fundamental code.
When a surface is added, the energy field of the system changes, and so this energy now also has to be
accounted for. The interaction of a gas with a surface is stronger than inter-particles interactions,
primarily due to the higher density at a surface. Using the same Lennard-Jones potentials, integrated
results for the interaction with a surface were first obtained by Steele (1974):
2 r gs
2
U gs ( z ) =
gs 0ss
3
15 r0
12
r0ss
r0gs
ss
r0
r0ss
Where the subscript ss stands for pure solid properties and gg stands for pure gas properties.
Parameters with subscript gs have been traditionally obtained as
gs = gg . ss
gs =
ss + gg
2
The second set of simulations were run with this surface energy field added at two opposing faces of
the system, and the remaining four faces with periodic boundary conditions. The effective geometry is
that of an infinite slab of gas surrounded by walls on both sides, as shown in figure 3.
Wall
Periodic
boundary
condition
System
Periodic
boundary
condition
Wall
Figure 3: System Geometry (Front and Isometric views)
Results
The gas chosen for the simulation was Nitrogen, N2, because it is the major constituent of air.
First, the results of the baseline simulation (periodic boundary conditions on all sides, free gas) will be
given. Compressibility results for three test cases were evaluated and all were in good agreement with
results from EES, as shown in table 1.
Table 1: Baseline simulation results
Test Cases
Monte Carlo
v =0.025 m3/mol., T = 300 K (atmospheric)
Z = 0.998 (P = 1 atm)
v =0.0025 m3/mol., T = 110 K
Z = 0.953 (P = 3.5 atm)
3
v =0.00025 m /mol., T = 110 K
Z = 0.908 (P = 6.5 atm)
EES
Z = 0.999
Z = 0.947
Z = 0.894
Once the validity of the code had been established, surfaces were added. For these cases, the surface
was assumed to be that of a Carbon nanotube and hence, C-C bond parameters were used. The results
are summarized in table 2.
Free Gas
Z = 0.998
Z = 0.953
Z = 1.001
A consistent trend can be seen from table 2; the compressibility increases by about 0.2-0.3 when a
surface is added. However, the more interesting result is the arrangement of the particles. Under the
studied conditions, all the particles in all the cases almost completely adsorbed onto the surface, as
shown in figure 3, and therefore the system is not quite a gas anymore.
z-dimension (Angstroms)
200
150
100
50
0
200
100
y-dimension (Angstroms)
50
100
150
200
x-dimension (Angstroms)
Figure 3: Particle positions for v =0.0025 m3/mol., T = 330 K, but representative of all the test cases
with surfaces
Figure 3 represents the situation for all three test cases; all the particles completely adsorb onto the
surface and are positioned approximately at the bottom of the surface potential well. The probability
density function of the particle positions (heights) is also shown in figure 4.
v = 0.0025 m3/mol.
0.09
T = 110
T = 330 K
0.08
T = 300 K
0.04
0.035
Probability Density Function
0.07
0.06
0.05
0.04
0.03
0.03
0.025
0.02
0.015
0.02
0.01
0.01
0.005
50
100
150
Height (Angstroms)
100
200
300
Height (Angstroms)
v = 0.0025 m3/mol.
T = 110
T = 330 K
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
3.1
3.15
3.2
3.25
3.3
Height (Angstroms)
3.35
3.4
Conclusions
A Monte Carlo simulation to assess the effect of surface interaction on the compressibility of Nitrogen
from a Carbon nanotube surface was conducted. The results indicate that compressibility increases by
a non-negligible amount due to the effect of the surfaces. However, this led to another important
observation; the gas particles, under the conditions that were studied, were almost completely adsorbed
onto the surface, and therefore the system is not quite a gas in this situation. Furthermore, it has been
shown by Hoinkes (1980), that the assumed classical expression for the surface potential as derived by
Steele (1974) is an under-prediction of the actual interaction, and therefore the effects observed in this
study may actually be stronger in reality.
References
Hoinkes, H., 1980, Rev. Mod. Physics, Vol. 52, No. 4, October 1980
Steele, W. A., 1974, The Interaction of Gases with Solid Surfaces (Pergamon, Oxford)