Combustion simulation (ReaxFF)

This tutorial will show you how to:

  • create a simple mixture (methane and oxygen)

  • set up a quick combustion reaction (using ReaxFF)

  • burn it: perform the actual ReaxFF simulation

  • visualize what is happening during and after the simulation

Step 1: Start the GUI

Start AMSjobs
SCM → New input
Switch to ReaxFF: ADFPanel ReaxFFPanel
/scm-uploads/doc.trunk/Tutorials/_images/ReaxFF.png

Step 2: Create a methane / oxygen mixture

Next we will make the methane - oxygen mixture. For full combustion we need at least 2 oxygen molecules for each methane molecule. So we will use 50 methane molecules and 125 oxygen molecules.

Edit → Builder
/scm-uploads/doc.trunk/Tutorials/_images/packmolbuilder.png

The Builder allows you to build your system, and set some things like the cell vectors that define the computation cell.

You can use the Builder to add many molecules, randomly distributed. In the list of molecules to be added the current molecule is already present. If you have any molecules already, the new molecules will be added. Right now we have no molecules yet, so we can remove that entry.

Click on the - button in front of Current
Click the + button in front of Molecules once (so now we can specify two kinds of molecules to add)

Enter 19 on the diagonal to change the box to a cube of 19.0 Angstrom
/scm-uploads/doc.trunk/Tutorials/_images/building.png
Click in the entry field of the first line
Type met to search for methane
/scm-uploads/doc.trunk/Tutorials/_images/buildersearch.png

As you can see, a search box appears to find your molecule, very similar to the search box in the panel bar.

Select the Methane (ADF) match
Change the number of molecules to 50
Click in the entry field of the second line
Type o to search for O2
Select the O2 (ADF) match
Change the 100 copies of O2 into 125 copies

You now have specified how the builder should build your system: 50 methane molecules with 125 oxygen molecules added.

/scm-uploads/doc.trunk/Tutorials/_images/buildersetup.png

At the bottom of the Builder panel you can see that the current density is zero. The new density, after adding methane and oxygen, will be around 1 g/mL, which is obviously very high for this mixture. In this tutorial, we simply want things to happen fast, so this high density is acceptable.

Next we will actually generate the molecules:

Click the Generate Molecules button
/scm-uploads/doc.trunk/Tutorials/_images/mixture.png

The molecules are generated at random positions and orientations, with constraint that all atoms (between different molecules) are at least the specified distance (2.5 Angstrom) apart.

The system looks good, we can now close the Builder:

Click the Close button at the bottom of the Builder window

Step 3: Prepare for burning: set up the simulation

The next step is to set up the details of the simulation.

Note

For this tutorial we will perform an MD simulation at very high temperature and density in order to make reactions happen quickly. This is meant to be a quick demonstration of functionality rather than a realistic representation of this system.

Click the InfoBtn on the right side of the Force field line

A new window should appear describing what force fields are available, including a short description and references. For this particular example we will use the CHO force field for hydrocarbon oxidation.

Close the window describing the force fields
Click on the folder icon next to Force field
Select the CHO.ff force field
/scm-uploads/doc.trunk/Tutorials/_images/MD-settings.png

Change to the MD settings panel:

Click on MoreBtn next to Molecular Dynamics
Set the Number of steps to 30000
/scm-uploads/doc.trunk/Tutorials/_images/MD-settings-2.png

Note

We will be using the Nose-Hoover thermostat which yields better overall sampling results in general. The Nose-Hoover damping constant is dependent on the system size because ideally it should match the period of the internal oscillations of the system. In the present case we stick to the default value of 100 fs but one might want to test different values in a realistic setup.

To setup a Nose-Hoover thermostat with a damping constant of 100 fs, change to the Thermostat panel:

Click on MoreBtn next to Thermostat
Click on the AddButton
Select NHC from the menu Thermostat
Specify a Temperature of 3500 K and a Damping constant of 100 fs
/scm-uploads/doc.trunk/Tutorials/_images/setupdone.png

Step 4: Burn it: run the simulation

Now we will run your set-up:

Use the File → Run command
When asked to save your input, save it with the name Methane

Note

Running this calculation takes approximately 10 minutes. You can do the following steps while the job is running.

AMSjobs should come to the foreground, and your job should be visible at the top. On the right side you can see that the job is running (this is indicated by the gear-icon). When running, in the AMSjobs window the progress of your simulation is showing (from the logfile). When you click on the progress lines the logfile will open in its own window:

Click on the logfile lines in the AMSjobs window to open the logfile
/scm-uploads/doc.trunk/Tutorials/_images/logfile.png

As you can see in the logfile, the simulation is running.

To see more details, we now will use AMSmovie. Note that you can do this while the simulation is still running!

Start AMSmovie: SCM → Movie in the logfile window
Press the Play button (the triangle pointing right at the left bottom of the AMSmovie window)
/scm-uploads/doc.trunk/Tutorials/_images/amsmovie.png

AMSmovie will show you the trajectory of your system. Note that it will automatically read new data as soon as it becomes available.

It can also show graphs of the properties that ReaxFF calculates:

In the AMSmovie window:
Use the MD Properties → Temperature command
Use the MD Properties → Conserved Energy command
/scm-uploads/doc.trunk/Tutorials/_images/graphs.png

You can go to a particular point in the simulation using the slider below the window showing your system, or you can click somewhere on one of the curves plotted. You can also use the arrow keys (left and right) to move through the simulation.

Tip

Click on the temperature curve to move around in the movie. Jump to the end of the movie to follow the progress

As ReaxFF is a reactive force field, reactions may take place. In this particular example the methane should react with the oxygen, eventually producing H2O and CO2.

You can make graphs that show how many of the different molecule types are present. The following instructions often work, but it depends on what molecules are present in your simulation. You might try this step again after waiting some time. Remember that we only requested 30000 iterations, so you might consider rerunning the tutorial with an increased amount of steps. Especially the production of H2O and CO2 take some time.

After about 25000 iterations:
Use the MD Properties → Molecules… command
/scm-uploads/doc.trunk/Tutorials/_images/moleculefractions.png

In the dialog window that appears all molecules that occur in the calculation are shown (up to the moment the dialog is created). By clicking at the top in the dialog you can sort the molecules by name, occurrence in the last frame, or average occurrence.

Warning

The information shown in the molecules dialog does NOT automatically refresh for a running calculation.

To refresh: close the dialog, and use the MD Properties → Molecules… command again.

The first column of check boxes allow you to select for which molecules to show a graph of their occurrence (the number of molecules of the selected type, per time step).

The second column allows you to show or hide that particular molecule type. This can be convenient to hide the original molecules for example, so you can easily see what is happening.

The two text entry fields at the top are thresholds used to filter the number of species shown. In this particular tutorial they are not needed, all molecule types are visible. But if you are dealing with a system with many thousands of species the dialog would otherwise no longer be usable. Obviously you can adjust the filter values to your needs, and reapply them by clicking the Filter button.

In the molecules dialog:
Check the graph check box to show the curve for CH4.
Repeat for O2, H2O, and for CO2 if any present yet.
/scm-uploads/doc.trunk/Tutorials/_images/h2o.png

Tip

You can drag the legend in the plotting area around with the mouse

You can put one of the curves on a different axes if you wish:

Click once on the curve showing the number of CH4 molecules, this makes it the ‘active’ curve
Use the Graph → Curve On Right Axes command
/scm-uploads/doc.trunk/Tutorials/_images/ch4.png

Clicking on the curve also had two other effects (besides making it the active curve): you jumped to the iteration in the movie corresponding to the point where you clicked, and the molecules that belonged to that curve are selected.

Flying to the selection also makes it easier to spot them:

If you have no CO2 curve yet: close the Molecules window, and use the Properties → Molecules… command again to add a CO2 curve
If no CO2 yet, wait until the calculation has finished and try again (remember to close the Molecules window and open it again to refresh it)

To see the CO2 molecules clearly, we will switch everything but the CO2 molecules to wireframe.

Tip

The visualization style in the View → Molecule command applies to the selection only, if any

Click in empty space so nothing is selected
Use the View → Molecule → Wireframe command
Click on the curve showing the CO2 production
Use the View → Molecule → Balls And Sticks to view the CO2 molecules more easily
Use the View → Fly To Selection command a few times
/scm-uploads/doc.trunk/Tutorials/_images/co2.png

When you now go forward or backwards in time, it is easier to see how the reactions actually take place. Note that the atoms remain selected, even if they are no longer part of a CO2 molecule. In a similar way you can focus on H2O produced:

Switch the everything back to wireframe: View → Molecule → Wireframe
Click on the curve showing the H2O production
Use the View → Molecule → Balls And Sticks to view the H2O molecules more easily
Use the View → Fly To Selection command if needed
/scm-uploads/doc.trunk/Tutorials/_images/lotsofwater.png

Another tool to see what is going on is hiding molecule that are not of interest. In this example, let’s hide CH4 and O2:

Clear the selection by clicking in empty space
Switch off wireframe: View → Molecule → Balls and Sticks
In the molecules dialog, uncheck the second check box for CH4 (in the Show column)
In the molecules dialog, uncheck the second check box for O2 (in the Show column)
/scm-uploads/doc.trunk/Tutorials/_images/hidden-reactants.png

There is another tool to focus on a region of interest, by showing only some selected part:

Select an atom somewhere in the center
Use the Select → Within radius … command, and select all within 5 Angstrom
View → Show Selection Only
Click in empty space to clear the selection
/scm-uploads/doc.trunk/Tutorials/_images/selection-only.png
View → Show All to see everything again