Reactive Canonical Monte Carlo

For questions concerning the RCMC code, please feel free to contact: Heath Turner

 Industrial Ammonia Production : background of industrial ammonia production

RCMC Simulation Background : basis for the RCMC technique

RCMC Simulation Algorithm : break-down of the algorithm

RCMC Simulation Assignment : details of the simulation assignment

Reporting the Results : necessary values that need to be reported

Industrial Ammonia Production

The industrial production of ammonia is traditionally carried out with an iron catalyst in order to enhance the rate of ammonia formation. Additionally, the reaction temperatures for ammonia production are typically 500-700K in order to further increase the reaction rate. However, there is a major drawback to using these elevated temperatures. Ammonia synthesis is an exothermic reaction, and so the equilibrium yield is decreased as the temperature is increased.

To compensate for the decreased yield at these elevated temperatures, the ammonia synthesis processes is conducted at high pressures. Since the production of NH3 from N2 and H2 is a reaction that decreases in mole number (4 moles -> 2 moles), increasing the density or pressure on the reaction shifts the equilibrium towards the NH3, which counters the effect of the increased temperature. The pressures employed for this process in industry are around 100 bar, so needless to say, this is a very non-ideal environment.

Computer simulations are an ideal tool for dealing with such complex, non-ideal systems. Furthermore, the RCMC simulation technique can be easily applied to the ammonia system in order to calculate the yield of this reaction as a function of temperature and pressure (while holding constant the overall N:H ratio in the system).

RCMC Simulation Background

The reactive canonical Monte Carlo (RCMC) algorithm is essentially a modified version of grand canonical Monte Carlo, which has been adapted to simulate chemical reaction equilibria. The main difference is that in addition to particle diplacements and reorientation, there are now FORWARD and REVERSE reaction steps (which are simply combinations of particle creation and destruction moves in the simulation box). The forward and reverse reaction steps are implemented to insure that the chemical reaction equilibria between the reactants and the products is maintained, i.e.:

 

The above equation states that the stoichiometric coefficient of each component (i) times the chemical potential of each component (i) is equal to zero. This will be true for a chemical reaction at equilibrium in a single-phase or a two-phase system.

RCMC Simulation Algorithm

The main steps of the RCMC method are listed below, as applied specifically to the ammonia synthesis reaction:

Attempt a random particle displacement or reorientation

Perform a random change in the volume (if a constant pressure simulation is desired)

Perform a FORWARD reaction step (N2 + 3H2 => 2NH3)

    + Randomly choose one N2 and three H2 molecules in the simulation box
    + Randomly delete two of the four chosen molecules from the simulation box
    + Change the remaining two molecules into two ammonia molecules, with a random orientation
    + Evaluate the acceptance of this move with the appropriate transition probability
    + If the move is rejected, revert to the previous configuration, otherwise accept the move

Perform a REVERSE reaction step (2NH3 => N2 + 3H2)

    + Randomly choose two NH3 molecules in the simulation box
    + Replace each ammonia molecule with either an N2 or H2
    + Insert two additional molecules randomly into the fluid, so that a total of one N2 and three H2 have been added
    + Evaluate the acceptance of this move with the appropriate transition probability
    + If the move is rejected, revert to the previous configuration, otherwise accept the move

The forward and reverse reaction steps must be chosen with equal probability in order to maintain microscopic reversability in the system.

RCMC Simulation Assignment

Your assignment is to calculate the yield (mole fraction of NH3) of the ammonia synthesis reaction at a specified temperature and pressure. Your individual assignment is listed below.

User

Temperature/K

Pressure/bar

 

User

Temperature/K

Pressure/bar

sm_795_2

573.15

100

 

sm_795_11

623.15

160

sm_795_3

573.15

120

 

sm_795_12

623.15

180

sm_795_4

573.15

140

 

sm_795_13

623.15

200

sm_795_5

573.15

160

 

sm_795_14

673.15

100

sm_795_6

573.15

180

 

sm_795_15

673.15

120

sm_795_7

573.15

200

 

sm_795_16

673.15

140

sm_795_8

623.15

100

 

sm_795_17

673.15

160

sm_795_9

623.15

120

 

sm_795_18

673.15

180

sm_795_10

623.15

140

 

sm_795_19

673.15

200



Obtain the Necessary Files

You will need the file: ammonia.inc (this is a file which includes the global variables)

You will need the file: tp_input.dat (this file contains the input paramaters: temp, press, etc.)

The fortran code that you will use for this assignment is: ammonia.f90
To run this program in the batch queue you will want to download run_ammonia. You can activate the script using

> chmod +x run_ammonia

and you will then use the script to create a job file as follows

> run_ammonia file

Then submit the job file to the batch queue using

> qsub file.job


Set Up Your Individual Assignment

Changes will need to be made to the file "tp_input.dat".

Line #1: Specifies the simulation temperature in reduced units (with respect to the LJ parameters of nitrogen), with epsilon/kb = 36.4 K and sigma = 0.332 nm. This will need to be modified to reflect your assigned temperature.

Line #2: Specifies the simulation pressure in reduced units (again with respect to the LJ parameters of nitrogen). This will need to be modified to reflect your assigned pressure.

Line #3: Specifies the initial density (again in reduced units). This will NOT need to be modified.

Line #4: Specifies the number of Monte Carlo steps for equilibration. It should not be necessary to modify this value (100000). You can check this by examining your output files after performing the simulation.

Line #5: Specifies the total number of Monte Carlo moves during the simulation. It should not be necessary to modify this value (500000). Again, you can check this by examining your output fules after performing the simulation.

Running the Simulation

You can compile the fortran code with the the command "f90 ammonia.f90 -o ammonia"

This will create an executable file named "ammonia" in your current directory.

You can run the code with the command "ammonia"

Simulations typically require less than 30 minutes on sonoma.

Examining the Output

The following files will be created during the RCMC simulation:

"am_output001.dat" - this files contains the pressure and energy in the simulation at intervals of 500 Monte Carlo steps. The first column is the number of MC steps, the second column corresponds to the pressure/bars and the last column is the reduced energy per molecule. This file can be looked at in Excel to see if the system was well-equilibrated.

"am_xa0000001.dat" - this files contains the mole fraction of ammonia in the simulation at intervals of 500 Monte Carlo steps. This file can be looked at in Excel to see if the system was well-equilibrated.

"am_status001.dat" - this file contains the final averages from the simulation. This is where the average conversion, pressure, energy, and average density can be collected.

Reporting the Results

Please report the following results:

The average pressure (bars)

Average mole fraction of NH3

Average energy (J/mol)

Average density (moles/L)

For questions concerning the RCMC code, please feel free to contact: Heath Turner