9
Application Note Copyright © Materials Design, Inc. 2002-2008 1 Y. MEDEA GIBBS — Liquid - Vapor Pressure Curve of Methane Introduction MEDEA GIBBS calculates equilibrium properties of fluids either pure or mixed, in a single phase or in multiple phases, using a force field based Gibbs ensemble Monte Carlo technique. The present application note focuses on the vapor pressure curve of methane, in other words we will deal with a one-component two-phase system. For such a system the Gibbs phase rule, with the number of components and the number of phases , States that there is only one degree of freedom, , so we can control either temperature or pressure. Defining the temperature as an initial condition, we can thus calculate the corresponding equilibrium pressure for the liquid-gas system. Doing this for a range of temperatures we get the equilibrium vapor pressure of the liquid-gas system. Now, how does MEDEA GIBBS model the two phases and what does it do to find the equilibrium? The figure below illustrates the condition of liquid-vapor equilibrium. At a given temperature, particles in the liquid phase evaporate into the gas phase until saturation, i.e. a number balance between particles in both phases is reached. Evaporation which has reached equilibrium with the liquid surface is said to have reached saturation In modeling this system we are limited to a rather small number of particles, typically a few hundred to keep computational efforts within limits. In MEDEA GIBBS we therefore define two boxes containing the liquid and the gas phase respectively. Technically this means that we squeeze many more particles into a volume unit for the liquid phase than we do for the gas phase resulting in a higher starting density of articles in the box representing the liquid. During the computation, we allow for random moves of the particles, i.e. translations, rotations and moves between the boxes. For each move into a new configuration a “penalty” function is calculated using force fields and over the duration of the simulation a minimum energy configuration is established. = +2 (6) (6-1) Evaporation

MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Embed Size (px)

Citation preview

Page 1: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Application Note

Copyright © Materials Design, Inc. 2002-2008 1

Y. MEDEA GIBBS — Liquid - Vapor Pressure Curve of Methane

Introduction

MEDEA GIBBS calculates equilibrium properties of fluids either pure or mixed, in a single phase or in multiple phases, using a force field based Gibbs ensemble Monte Carlo technique. The present application note focuses on the vapor pressure curve of methane, in other words we will deal with a one-component two-phase system. For such a system the Gibbs phase rule, with the number of components 𝐶𝐶 and the number of phases 𝜋𝜋,

States that there is only one degree of freedom, 𝐹𝐹, so we can control either temperature or pressure. Defining the temperature as an initial condition, we can thus calculate the corresponding equilibrium pressure for the liquid-gas system. Doing this for a range of temperatures we get the equilibrium vapor pressure of the liquid-gas system.

Now, how does MEDEA GIBBS model the two phases and what does it do to find the equilibrium? The figure below illustrates the condition of liquid-vapor equilibrium. At a given temperature, particles in the liquid phase evaporate into the gas phase until saturation, i.e. a number balance between particles in both phases is reached.

Evaporation which has reached equilibrium with the liquid surface is said to have reached saturation

In modeling this system we are limited to a rather small number of particles, typically a few hundred to keep computational efforts within limits. In MEDEA GIBBS we therefore define two boxes containing the liquid and the gas phase respectively. Technically this means that we squeeze many more particles into a volume unit for the liquid phase than we do for the gas phase resulting in a higher starting density of articles in the box representing the liquid.

During the computation, we allow for random moves of the particles, i.e. translations, rotations and moves between the boxes. For each move into a new configuration a “penalty” function is calculated using force fields and over the duration of the simulation a minimum energy configuration is established.

𝐹𝐹 = 𝐶𝐶 + 2 − 𝜋𝜋 (6) (6-1)

Evaporation

Page 2: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 2

In this final or equilibrium configuration, particles are distributed over both the liquid and the gas phase, provided that the initial temperature lies in the range of liquid-vapor coexistence.

Before we start working with MEDEA GIBBS, a few words about force fields: Force fields are system specific parameterizations of interatomic forces that hold a number of atoms together in a specific arrangement, e.g. a molecule or a crystalline structure. While force-field parameters can be more or less complex and very sophisticated parameterizations exist, they typically only work for the class of systems they were designed for.

Therefore, whenever using force fields we need to make sure they are appropriate in describing the physical interactions we are looking to model!

Now, let us get started with the MEDEA GIBBS code. In the rest of this document you will learn how to:

• Assign a force field to a molecule using the MEDEA interface • Extract experimental liquid-vapor equilibrium data from the NIST webbook • Run MEDEA GIBBS to calculate the liquid-vapor curve of methane

Outline of procedure

• Build methane (CH4) and assign a force field • Get experimental data from NIST webbook • Set up the conditions of the run in the GIBBS interface • Analyze the result

1. Build methane (CH4) and assign a force field

MEDEA comes with a number of structures already carrying force fields in the .sci structure file (including methane CH4). These systems are located in C:/MD/Structures/Gibbs (standard installation path). To load any of these structures simply invoke File≫Open from disk in the MEDEA main menu.

In the following, we will first build the molecule and then attach a force field to it.

Build a CH4 molecule We will build a CH4 molecule from scratch using the MEDEA molecule builder.

In the MEDEA File menu select New Molecule.

Select C in the periodic table of the elements on the right and subsequently click into the center of the drawing area to drop a C atom in its standard fourfold coordination. Finish with Hydrogenate to attach hydrogen atoms to each of the carbon bonds. Right-click into the drawing area and select All≫ Center to origin from the context menu

Page 3: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 3

In the MEDEA Edit menu select Create a periodic copy and close the molecule builder window

Attach a force field to the CH4 molecule

With the windows focus on the new CH4 structure window, click on the spreadsheet icon

to invoke the detailed view of atomic properties of CH4

You can resize the window and use the slider at the bottom to see more of the spreadsheet. Right click in the title bar and select New≫FF Atom Type, which will create a new column on the right. You may have to use the scroll bar to see it. In the first row, click into the FF Atom Type column to select the cell, right click in the selected cell and select CH4-Moller from the list of force fields. Now you have assigned this force-field to the carbon atom. Do not assign anything to the H atoms.

Toggle off the detailed view by clicking once more on the spreadsheet icon

2. Get experimental data from NIST webbook

We now have an appropriate CH4 molecule to use with the GIBBS module. However, before calculating the liquid-vapor equilibrium curve, we will have a look at the NIST webbook to obtain experimental data describing the liquid-vapor equilibrium properties of methane.

Open a web browser and go to the URL: http://webbook.nist.gov/chemistry/fluid/

Please follow the steps below to select the data required.

1. Please select the species of interest: Methane 2. Please choose the units you wish to use: … 3. Choose the desired type of data: Saturation properties — temperature increments 4. Please select the desired standard state convention: Default 5. Press to Continue

This will direct you to another web page titled Saturation properties for Methane – Temperature Increments. On this page:

Page 4: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 4

1. Enter temperature range and increment in selected units:

𝑇𝑇low: 100 (min value: 90.6941 K)

𝑇𝑇high 190 (max value: 190.564 K)

𝑇𝑇increment: 15

2. Check here if you want to use the display applet (requires Java capable browser)

3. Press for Data

The NIST webbook will display two tables containing data for the liquid and vapor phases of methane. The first seven columns of each table should look like

Liquid Phase Data

Data on Saturation Curve Temperature Pressure Density Volume Internal Energy Enthalpy Entropy (K) (MPa) (mol/l) (l/mol) (kJ/mol) (kJ/mol) (J/mol*K) 100.00 0.034376 27.357 0.036554 -0.64728 -0.64603 -6.0856 115.00 0.13221 26.021 0.038431 0.18241 0.18749 1.6440 130.00 0.36732 24.562 0.040714 1.0379 1.0529 8.6383 145.00 0.82322 22.917 0.043636 1.9317 1.9676 15.154 160.00 1.5921 20.964 0.047702 2.8887 2.9647 21.462 175.00 2.7765 18.384 0.054394 3.9734 4.1244 28.021 190.00 4.5186 12.515 0.079902 5.7074 6.0685 38.000

Vapor Phase Data

Data on Saturation Curve Temperature Pressure Density Volume Internal Energy Enthalpy Entropy (K) (MPa) (mol/l) (l/mol) (kJ/mol) (kJ/mol) (J/mol*K) 100.00 0.034376 0.042048 23.782 7.0469 7.8644 79.019 115.00 0.13221 0.14457 6.9171 7.3680 8.2825 72.036 130.00 0.36732 0.37278 2.6825 7.6403 8.6256 66.890 145.00 0.82322 0.80691 1.2393 7.8406 8.8608 62.693 160.00 1.5921 1.5821 0.63206 7.9306 8.9369 58.789 175.00 2.7765 3.0268 0.33038 7.8184 8.7357 54.371 190.00 4.5186 7.8027 0.12816 6.7850 7.3641 44.819

The data gives the experimental values of pressure, density and volume of the liquid and vapor phases of methane at the chosen temperatures.

3. Use MEDEA GIBBS to calculate the liquid vapor saturation curve of methane

We will now employ the MEDEA GIBBS module to calculate the liquid vapor saturation curve of methane.

Open the Tools≫ Gibbs menu and select Run.

This will bring up the GIBBS interface in MEDEA. The computational setup and parameters are specified under the tabs Calculation, Conditions, Moves, and Forcefield.

Page 5: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 5

Calculation tab

Here, we need to specify the type of calculation and system to study:

Set Goal to Liquid-liquid or liquid-vapor equilibria.

In the Components field, add methane by clicking Add from MEDEA, in the Add Component file selector, select and Insert≫ the CH4 structure (its structure window must be open in MEDEA) and confirm with OK.

In Simulation Conditions we leave the Number of steps unchanged at 1 million steps for sampling the statistical ensemble in each temperature run.

Page 6: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 6

The Calculation tab should now look like this:

Conditions tab

Let us now set the initial conditions for the liquid and vapor phase of methane.

Click the Conditions tab and then click into the table to select it. Right click and select Add phase

We have created two phases, one for the liquid and one for the gas phase of CH4. For each of these phases, we now need to define values for the number of particles and starting density Note that the box size for each phase is adjusted by the program based on input number of particles and input density. We will work with 1000 particles in each phase and we will use starting values for the density taken from the NIST web book. In order to run at temperatures T=100 K, T=115 K, T=130 K, T=145 K, T=160 K, T=175 K, and T=190 K we create additional rows, each of them corresponding to one GIBBS simulation at fixed temperature where equilibrium pressure between the two phases will be calculated.

Let’s have Phase 1 represent the liquid and Phase 2 the vapor phase.

Page 7: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 7

The NIST webbook gives in units of mol/L, so let’s adjust to these units:

• Right click on both Density column headers and select Units and change the units to mol/L

• Click in the first cell in the table and change the temperature to 100 K • Change the number of molecules in both phases (# of CH4) to 1000

Type in the experimental value for the density of the liquid phase (27.357) and for the density of the vapor phase (0.042048) at T=100 K in the Density columns for Phase 1 and Phase 2, respectively.

Note that the values for the density are only starting values. We will check the sensitivity of results to these values later in this work.

With the cursor anywhere in the last row, press Down arrow or Enter to create additional rows and fill in the experimental values. For each temperature, set # of CH4 to 1000 and add the densities of the liquid and vapor phase.

Moves tab

Next, the relative probability of the different types of Monte-Carlo moves in each simulation step needs to be specified.

Go to the Moves tab, set Translation to 50, set Volume change to 0 set Transfer Between Phases to 50.

Page 8: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 8

Forcefield tab

A good value for the cutoff radius of the intermolecular potential is 10Å, as it generally leads to a reliable evaluation of the Lennard-Jones interactions. In any event the cutoff should be smaller than half the box size used in the simulation.

The default (zero) uses half the size of the box, however, this option may result in longer computational time if large simulation boxes are used.

Go to the Forcefield tab and set Cutoff to 10.

Submit the calculation

Enter an appropriate job name in the Title field at the bottom of the GIBBS interface, let's use Methane vapor-liquid, and submit the job by Run

4. Analyze the result

After completion, the calculated equilibrium properties are summarized in the file job.out. Similar to all other MEDEA jobs, you can access the output files through View and Control Jobs in the Job Control menu.

For a liquid vapor equilibrium calculation, job.out gives both initial and calculated values of the properties of the two phases. In our calculations we assigned phase 1 and phase 2 to be the liquid phase and gas phase respective. Now we are interested in the vapor pressure as a function of temperature, and thus need the calculated pressures of phase 2.

In job.out, scroll to the Calculated Results for Phase 2

pressure volume density # mol of CH4

bar Ang^3 mol/L 0.3701 ± 0.0061 39492000 ± 0 0.04441 ± 0.00019 1056.3 ± 4.5

1.39 ± 0.037 11487000 ± 0 0.14588 ± 0.00038 1009.2 ± 2.6 3.749 ± 0.061 4454700 ± 0 0.3691 ± 0.0013 990.4 ± 3.4 8.229 ± 0.077 2058100 ± 0 0.8015 ± 0.0044 993.6 ± 5.5 16.09 ± 0.38 1049700 ± 0 1.5444 ± 0.0093 976.4 ± 5.9 27.66 ± 0.8 548610 ± 0 2.88 ± 0.056 952 ± 18

44.1 ± 1.8 212820 ± 0 5.47 ± 0.13 701 ± 16

The calculated vapor pressure is listed in job.out for each of the temperatures. The pressures are given in units of bar. The calculated values (converted in MPa) are plotted below together with the experimental values from the NIST webbook. The agreement is very good, but we were using excellent initial conditions: the experimental values.

Page 9: MedeA Gibbs 97 Liquid - Vapor Pressure Curve of Methane

Materials Design Application Note MedeA Gibbs — Liquid - Vapor Pressure Curve of Methane

Copyright © Materials Design, Inc. 2002-2008 9

Sensitivity analysis

Initial pressure:

To check the sensitivity of the computed equilibrium pressure on the initial density we rerun with initial pressures for the liquid/vapor phase randomly deviating up to 26 % from the experimental equilibrium pressures. We change the initial density of the vapor phase from {0.042, 0.144,0.372,0.806,1.582,3.027,7.803} to {0.05,0.12,0.4,0.9,2,2.5,7} mol/L respectively. In addition we reduce the number of Monte Carlo steps per temperature to 100000. Apart from that we start with identical parameters to the first set of calculations.

The resulting vapor pressure curve is shown above. Even though quite large deviations from experimental values of the initial pressures of the two phases were introduced, the calculated vapor pressure curve is in good agreement with experiment. Not surprising, the most difficult temperature to obtain good computed values for methane is 190 K since this is close to the critical point of methane.

0

1

2

3

4

5

6

100 120 140 160 180 200

Pres

sure

[MPa

]

Temperature [K]

Vapor Pressure Methane

experiment

calculated

check