Computation of phase equilibria
Thermodynamic equilibrium implies, for two phases and :
- Equal temperature:
- Equal pressure:
- Equal chemical potential:
The computation of phase equilibria using computer simulation can follow a number of different strategies.
Independent simulations for each phase at fixed temperature in the canonical ensemble
Simulations can be carried out using either the Monte Carlo or the molecular dynamics technique. Assuming that one has some knowledge on the phase diagram of the system, one can try the following recipe:
- Fix a temperature and a number of particles
- Perform a limited number of simulations in the low density region (where the gas phase density is expected to be)
- Perform a limited number of simulations in the moderate to high density region (where the liquid phase should appear)
- In these simulations we can compute for each density (at fixed temperature) the values of the pressure and the chemical potentials (for instance using the Widom test-particle method)
A quick 'first guess' method
Using the previously obtained results the following, somewhat unsophisticated, procedure can be used to obtain a first inspection of the possible phase equilibrium:
- Fit the simulation results for each branch by using appropriate functional forms:
- Use the fits to build, for each phase, a table with three entries: , then plot for both tables as a function of and check to see if the two lines intersect.
- The crossing point provides (to within statistical uncertainty, the errors due to finite size effects, etc.) the coexistence conditions.
Improving the 'first guess' method
It can be useful to take into account classical thermodynamics to improve the previous analysis. This is because is is not unusual have large uncertainties in the results for the properties. The basic idea is to use thermodynamic consistency requirements to improve the analysis.
Methodology in the NpT ensemble
For temperatures well below the critical point, provided that the calculation of the chemical potential of the liquid phase using Widom test-particle method gives precise results, the following strategy can be used to obtain a 'quick' result:
- Perform an simulation of the liquid phase at zero pressure, i.e.
- Arrive at an initial estimate, for the coexistence value of the chemical potential by computing, in the liquid phase:
- Make a first estimate of the coexistence pressure, , by computing, either via simulation or via the virial coefficients of the gas phase, the pressure at which the gas phase fulfills:
- Refine the results, if required, by performing a simulation of the liquid phase at , or use estimates of (from the initial simulation) and the gas equation of state data to correct the initial estimates of pressure and chemical potential at coexistence.
Note that this method works only if the liquid phase remains metastable at zero pressure.
Van der Waals loops in the canonical ensemble
[WORKING IN THIS SECTION]
It is possible to compute the liquid-vapor equilibrium without explicit calculations of the chemical potential (or the pressure) by performing a number of simulations sampling appropriately the vapor, liquid, and intermediate regions.
As an example, consider a simple fluid at a given subcritical temperature (). We can perform a number of simulations for a given number of particles, and different densities:
In these simulations, we can compute the pressure (or the chemical potential) and fit the result to an appropriate equation. With such an equation of state the phase equilbria can be estimated.
If two phase equilibria exists, a loop in the representation of (or ) should appear.
- Computing from the equation of state given as :
For fixed temperature and number of particles:
[NOTATION SHOULD BE EXPLAINED; A, a, ]--Noe 12:47, 26 September 2007 (CEST)
- , integrating:
On the other hand
therefore: [I have to check the equations]--Noe 13:03, 26 September 2007 (CEST)
Practical details
Some precautions should be taken if this procedure is used:
- The precision of the simulation results in the two phase region will be poor (so, large simulations are required to have a good estimation of the equation of state)
- The simulation results in the two phase region will depend dramatically on the system size (calculations with different number of particles become convenient to check the quality of the phase equilibria results)
Direct simulation of the two phase system in the canonical ensemble
Gibbs ensemble Monte Carlo for one component systems
The Gibbs ensemble Monte Carlo method is often considered as a 'smart' variation of the standard canonical ensemble procedure (See Ref. 1). The simulation is, therefore, carried out at constant volume, temperature and number of particles. The whole system is divided into two non-interacting parts, each one has its own simulation box with its own periodic boundary conditions. This separation of the two phases into different boxes is in order to suppress any influence due to interfacial effects. The two subsystems can interchange volume and particles. The rules for these interchanges are built up so as to guarantee conditions of both chemical and mechanical equilibrium between the two phases. If the overall conditions are of phase separation, it is expected that two phases will appear in different simulation boxes.