Sie sind auf Seite 1von 6

Monte Carlo Simulation of Hard Sphere Fluid in

Isothermal-Isobaric (N,P,T) Ensemble

Physics Instructor
physicsassignmenthelp@gmail.com

Physics Assignment Help Facebook Page


1

0.1 Introduction
Metropolis Monte Carlo method is used to simulate a system of hard sphere
particles in (N,P,T)-constant ensemble, where there are two types of trial
moves: displacement trials (random move of particles), and trial move of
volume.
(N,P,T) ensemble simulation is more applicable to real problems when the
pressure and temperature are constant. For instance when we want to find
density of a fluid under constant atmosphere pressure, (N,P,T) is prefered.
(N,P,T) ensemble simulation is also used for equilibration, in order to find
a fixed volume under constant pressure (usually 1atm) for (N,V,T) ensemble.

0.2 (N,P,T) constant ensemble


Partition function of (N,P,T) constant ensemble is given by,

βP
Z Z
−βP V N)
∆N (N, P, T ) = 3N dV e drN e−βU (r (1)
Λ N!
where the thermodynamic potential of a system with specified values of N,P,
and T, is Gibbs free energy:

G = −KB T Ln(∆N ) (2)

According to the equation (1), the average of a thermodynamics property,


A in (N,P,T) ensemble is given by,
N
dve−βP v drN e−βU (r ) A(rN , v)
R R
< A >= (3)
dve−βP v drN e−βU (rN )
R R

So in order to find the average values of thermodynamics properties numer-


ically by Monte Carlo method, in addition to the trial moves of coordinates,
trial move of volume must be considered.

0.3 Hard Sphere potential energy


The hard sphere potential is defined as,
n
∞ , r<d
u(r) = 0 , r≥d (4)

where d is the diameter of hard sphere (or particle), and r is the distance
between two particles.
2

A simple but accurate equation of state for a hard sphere fluid is given by
Carnahan-Starling equation as,

βP 1 + η + η2 − η3
= (5)
ρ (1 − η)3

where η = π6 ρd3 , and ρd3 is reduced density.

0.4 Trial moves


Due to the strong repulsive force between hard spheres, the smallest parti-
cle separation in the fluid is d. So after any displacement, overlaps in hard
sphere fluid must be checked, i.e. after any displacement trial, we must
check the distance of displaced particle with the other particles, and if there
is a distance less than d, we must reject the trial. In fact due to the zero
pair potential, overlap check is enough to accept or reject displacement trial.

Trial move of volume is given by,

v → v 0 = v + ∆v

where ∆ has to be selected randomly by the help of a random number


generator. In this simulation instead of volume itself, the logarithm of vol-
ume is changed randomly, and the trial move is accepted/rejected based on
Metropolis criterion,
0
P(old→ new)=min (1,exp[−β (U(v 0 )-U(v))-β P(v-v 0 )+N Ln( vv )])
3

0.5 Estimating the range of input


For a constant βP d3 , we can find average values of volume and reduced
d3
density, and the plot of Z = βP
ρd3
in terms of ρd3 .
We are interested in a graph of Z in the range of ρd3 = 0.2....0.8 . So in
order to estimate the range of input βP d3 , we can use Carnahan-Starling
equation of state, equation (5). The results of computation is given in the
table above.

The entire project, packed in a zip file, is available for sale, and
by purchasing it you will get Simulation code (Fortran 90 project
for simulation of hard-sphere fluid in (N, P, T )-constant ensemble
with Metropolis Monte Carlo method.), and this report. For more
information,
send email to Physics Instructor physicsassignmenthelp@gmail.com
or message to Physics Assignment Help Facebook Page.
I’m available to help students with their homework assignments
in calculus, physics, and computer simulation projects.
4

Figure 1: Compressibility in terms of ρd3 for N=256 hard spheres in isothermal-isobaric ensemble (N,P,T).
The compressibility factor found from simulation is compared with the compressibility factor found from
Carnahan-Starling equation of state. For small values of reduced density, compressibility factor found from
Carnahan-Starling equation is very close to its values found from simulation, but by increasing ρd3 , Z of
Carnahan-Starling grows faster than Z of simulation.

0.6 Averaging thermodynamics properties


Now by entering βP d3 in the range of 0.1, ...., 9.0, as input values, we can
get the desired outputs from simulation (table above), and the plot of com-
pressibility factor versus reduced density (figure above).

0.7 Standard deviation


Standard deviation (or square root of variance) in reduced density is found
from this relation: q
SD = |< ρ2 > − < ρ >2 | (6)
In order to find it we need to get < ρ2 > in addition to < ρ > from each
run of simulation.
5

References:
1. David P. Landau, Kurt Binder. A Guide to Monte Carlo Simulations in
Statistical Physics. Cambridge University Press.
2. Daan Frenkel, Berend Smit. Understanding Molecular Simulation. Aca-
demic Press.
3. Jean-Pierre Hansen. Theory of Simple Liquid.
4. Richard L. Rowley. Statistical Mechanics for Thermophysical Property
Calculations.

The entire project, packed in a zip file, is available for sale, and
by purchasing it you will get Simulation code (Fortran 90 project
for simulation of hard-sphere fluid in (N, P, T )-constant ensemble
with Metropolis Monte Carlo method.), and this report. For more
information,
send email to Physics Instructor physicsassignmenthelp@gmail.com
or message to Physics Assignment Help Facebook Page.
I’m available to help students with their homework assignments
in calculus, physics, and computer simulation projects.

Das könnte Ihnen auch gefallen