Tina Düren

Research Group

  • Home
  • Research
  • People
  • Publications
  • Teaching
  • Contact

 


Department of Chemical Engineering, University of Bath

Music links

  • Back to main Music tutorial page
  • Music pages at Northwestern
  • Music documentation at Northwestern
  • Back to main research page

The excess amount adsorbed

This tutorial explains how to calculate the excess amount adsorbed after you have analysed your music gcmc simulation and created a post file for single component systems. Thanks to Boyke Schoenborn from the University of Kiel, Germany who wrote a first version of the tutorial when he spent time with us in Edinburgh in April 2008.

Why calculate the excess amount adsorbed?

The output of a GCMC simulation is the absolute amount adsorbed, that is, the total number of adsorbate molecules present in the pore, whereas experimentally the excess amount adsorbed is measured. The excess number of molecules, nex, is related to the absolute number of molecules, nabs, by


where Vg is the pore volume of the adsorbent and rhog is the molar density of the bulk gas phase calculated with the Peng-Robinson equation of state. We normally calculate the pore volume with the second virial coefficient as described by AL Myers and PA Monson, Langmuir 2002, 18, 10261.


Here, curly V is the fluid-adsorbent interaction of a single helium atom m is the mass of the adsorbent, and T is the temperature.

The program described here, uses equation (1) to calculate the excess amount adsorbed from the absolute amount adsorbed read from a music post file. This tutorial does not contain a description of how to calculate the pore volume. You have to supply that value in the subroutine adsorbent_properties_UFF.f90 , but it is up to you how to determine it.

Downloading the code

Although the excess program uses a music post file as input, it is not part of music itself but a separate program which uses the Peng Robinson equation of state to calculate the volume of the bulk gas phase.

The code to calculate the excess amount adsorbed is available under the General Public Licence. Read the conditions of the license before proceeding with the download .

The files are available as a tar archive. To extract the files use the following commands

gunzip excess.tar.gz
tar -xvf excess.tar

After extracting the archive, you should end up with the following file

The program files
  • div_mod.f90
  • adsorbent_mod.f90
  • fuga_mod.f90
  • molecules_prop.f90
  • adsorption_isotherm.f90
  • calc_fugacity_bin.f90
  • fluid_properties.f90
  • main_excess.f90

A simple makefile that takes care of compiling the program
  • makefile

and the input file
  • input.dat

Compiling the code

A few things to be aware of before compiling the program:

  • The program can be compiled with the makefile provided. This makefile uses the intel ifort compiler. If you are using a different compiler, replace ifort with the name of your compiler.

  • Different compilers use different definitions for double precision variable. The intel compiler (and several other compilers) uses real(kind = 8) . The most common other definiton is real(kind = 2) . The definition of the double precision variables can be changed in the module div_mod.f90.

To compile the program, simply type make and an executable called excess.exe will be created.

Running the program

The program is run with the input file input.dat . An example set up to calculate the excess amount adsorbed for methane in IRMOF1 is given below.

! file with pressure data
pressure.dat
! music post processing file
IRMOF1.Methane.post
! output file
adiso.IRMOF1.Methane.298K.dat
! number of species
1
! name of species (music name)
Methane
! temperature of gcmc run in K
298.
! name of adsorbent
IRMOF1

So, to run the program you need

  • a file containing the pressure data (pressure.dat). This filecontains in the first line the name of the fluid for which you have been doing the GCMC simulation, in the second line the number of pressure points for which you have been running the isotherm, and in the third line the pressures in kPa separated by commas.

  • the name of the music post file that you created when analysing your GCMC simulation. This is the file that will be analysed to get the absolute amount adsorbed.

  • the name of the output file you want to create.

  • the number of species. Please note that this program should only be used for pure component isotherms. For binary isotherms, a different version of the program should be used that uses a music logfile as input instead of the post file..

  • the name of fluid / gas you calculated the isotherm for. This name has to be same as specified in the subroutine fluid_properties.f90 . .

  • the temperature at which you have been running your GCMC simulation.

  • and the name of the MOF framework. The properties of the framework are specified in the subroutine adsorbent_properties.f90.


To run the program use

excess.exe < input.dat

and enjoy the output!

Running the program for other systems

The program as it is provided here, can be used to calculate the excess amount adsorbed for methane in IRMOF1. It is easy to extent the Program to handle other fluids / gases and MOFs.

Changing the adsorbent

The subroutine adsorbent_properties_UFF.f90 contains a database for adsorbents. Three properties of the adsorbent need to be specified:

  • the mass of the unit cell in g / mol
  • the crystal density in g / cm3
  • the pore volume in A3

The first two properties are used to convert the units from molecules / uc to (currently) mol / g and cm3 / cm3. We normally calculate the pore volume from the second virial coefficient (for details see AL Myers and PA Monson "Adsorption in porous materials at high pressure: Theory and experiment", Langmuir 18, 10261 (2002)). This method is based on calculating the potential energy between a single helium molecule and the MOF framework. The value therefore depends on the force field used.


Adding more fluid molecules

The subroutine fluid_properties.f90 contains a database for fluid molecules which contains the parameters necessary for the Peng Robinson equation of state. You can find these properties in thermodynamic books such as Reid, Prausnitz, Poling "The properties of gases and liquids".

  • the accentric factor
  • the critcial temperature in K
  • the critical pressure in Pa

Don't forget to recompile the program if you added something new!

Department of Chemical Engineering, University of Bath
Copyright (c) 2015 Tina Düren. All rights reserved. Design by FCT.