Computation of phase equilibria: Difference between revisions

From SklogWiki
Jump to navigation Jump to search
mNo edit summary
Line 20: Line 20:
- In these simulations we can compute for each density (at fixed temperature) the values of the pressure and the
- 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]])
chemical potentials (for instance using the [[Widom test-particle method]])
==== A quick (and dirty?) 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.
Using the previously obtained results the following somewhat unsophisticated procedure can be used to obtain a first inspection of the possible phase equilibrium.


Line 30: Line 30:
<math> \mu </math> as a function of <math> p </math> and check if the two lines intersect. The crossing point
<math> \mu </math> as a function of <math> p </math> and check if the two lines intersect. The crossing point
provides  (to within statistical uncertainty, the errors due to [[finite size effects]], etc.) the coexistence conditions.
provides  (to within statistical uncertainty, the errors due to [[finite size effects]], etc.) the coexistence conditions.
==== Improving the dirty method ====
==== Improving the 'first guess' method ====
It can be useful to take into account classical thermodynamics to improve the previous analysis. This can be useful
It can be useful to take into account classical thermodynamics to improve the previous analysis. This can be useful
because is is not unusual have large uncertainties in the results of the properties.
because is is not unusual have large uncertainties in the results of the properties.
Line 37: Line 37:
== Methodology in the [[Isothermal-isobaric ensemble|NpT]] ensemble ==
== Methodology in the [[Isothermal-isobaric ensemble|NpT]] ensemble ==


For temperatures well below the critical point, (if  the calculation of the chemical potential
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 get quick results.
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 <math> NpT </math> simulation of the liquid phase at zero pressure, <math> p \simeq 0 </math>
*Perform an <math> NpT </math> simulation of the liquid phase at zero pressure, i.e. <math> p \simeq 0 </math>
 
*Arrive at an initial estimate, <math> \mu^{(1)} </math> for the coexistence value of the chemical potential by computing, in the liquid phase:


*Get an initial estimate, <math> \mu^{(1)} </math> of the coexistence value of the chemical potential by computing in the liquid phase:
: <math> \left. \mu^{(1)} = \mu_l (N,T,p=0) \right. </math>
: <math> \left. \mu^{(1)} = \mu_l (N,T,p=0) \right. </math>


*Make a first estimate of the coexistence pressure, <math> p^{(1)} </math>, by computing --using simulation or the virial coefficients of the gas phase--  the pressure at which the gas phase fulfills:
*Make a first estimate of the coexistence pressure, <math> p^{(1)} </math>, by computing --either via simulation or via the [[Virial coefficients of model systems |virial coefficients]] of the gas phase--  the pressure at which the gas phase fulfills:


:  <math> \left. \mu_g(N,T, p^{(1)} ) = \mu^{(1)} \right. </math>
:  <math> \left. \mu_g(N,T, p^{(1)} ) = \mu^{(1)} \right. </math>


* Refine the results, if required, by performing a simulation of the liquid phase at <math> \left.  p^{(1)} \right.  </math>, or use estimates of
* Refine the results, if required, by performing a simulation of the liquid phase at <math> \left.  p^{(1)} \right.  </math>, or use estimates of <math> \left( \partial V / \partial p \right)_{N,T,p=0} </math> (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.
<math> \left( \partial V / \partial p \right)_{N,T,p=0} </math> (from the initial simulation) and the gas equation of state data
to correct the initial estimates of pressure and chemical potential at coexistence.
 
  This method works only if the liquid phase remains metastable at zero pessure


== Van der Waals loops, in the [[canonical ensemble|canonical ]]  ensemble ==
== Van der Waals loops, in the [[canonical ensemble|canonical ]]  ensemble ==
Line 61: Line 58:
== Gibbs ensemble Monte Carlo ==
== Gibbs ensemble Monte Carlo ==


This method is often considered as a smart variation of the standard canonical ensemble procedure.  
This method is often considered as a 'smart' variation of the standard canonical ensemble procedure.  
The simulation is, therefore, carried out at constant volume, temperature and number of particles.
The simulation is, therefore, carried out at constant volume, temperature and number of particles.
However the whole system is divided in two non-interacting parts (each one has its own simulation
However the whole system is divided in two non-interacting parts (each one has its own simulation
box with [[periodic boundary conditions]]).
box with its own [[periodic boundary conditions]]).
 
The basic idea is to separate the two phases in different boxes in order to suppress any interfacial effects.
The basic idea is to separate the two phases in different boxes to supress the interfacial effects.
 
The two subsystems can interchange volume and particles. The rules of these interchanges are
The two subsystems can interchange volume and particles. The rules of these interchanges are
built up to guarantee that the conditions of chemical and mechanical equilibrium between  
built up so as to guarantee that the conditions of chemical and mechanical equilibrium between  
the two phases are satisfied.
the two phases.
 
If the overall conditions are of phase separation, it is expected that two phases will appear in
If the overall conditions are of phase separation, it is expected that two phases will appear in
different simulation boxes.
different simulation boxes.
*[http://dx.doi.org/10.1080/00268978700101491 Athanassios Panagiotopoulos "Direct determination of phase coexistence properties of fluids by Monte Carlo simulation in a new ensemble", Molecular Physics '''61''' pp. 813-826 (1987)]
 
====References====
#[http://dx.doi.org/10.1080/00268978700101491 Athanassios Panagiotopoulos "Direct determination of phase coexistence properties of fluids by Monte Carlo simulation in a new ensemble", Molecular Physics '''61''' pp. 813-826 (1987)]
[[category: Monte Carlo]]
[[category: Monte Carlo]]
[[category: Computer simulation techniques]]
[[category: Computer simulation techniques]]

Revision as of 12:26, 25 September 2007

Thermodynamic equilibrium implies, for two phases and :

  • Equal temperature:
  • Equal pressure:

The computation of phase equilibria using computer simulation can follow a number of different strategies.

Independent simulations for each phase at fixed in the canonical ensemble

Simulations can be carried out either using Monte Carlo or Molecular dynamics techniques. 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 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 can be useful because is is not unusual have large uncertainties in the results of 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

Direct simulation of the two phase system in the Canonical ensemble

Gibbs ensemble Monte Carlo

This method is often considered as a 'smart' variation of the standard canonical ensemble procedure. The simulation is, therefore, carried out at constant volume, temperature and number of particles. However the whole system is divided in two non-interacting parts (each one has its own simulation box with its own periodic boundary conditions). The basic idea is to separate the two phases in different boxes in order to suppress any interfacial effects. The two subsystems can interchange volume and particles. The rules of these interchanges are built up so as to guarantee that the conditions of 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.

Mixtures

Symmetric mixtures

References