OpenMKM Input and Output

This notebook describes pmutt's functionality to write OpenMKM CTI and YAML files. We will use the NH3 formation mechanism as a case study.

Topics Covered

  • Read species ab-initio data, reactions, lateral interactions, phases, reactor operating conditions, and desired units from a spreadsheet
  • Write the CTI file that can be read by OpenMKM
  • Write a YAML file that can be read by OpenMKM

Input Spreadsheet

All the data will be imported from the ./inputs/NH3_Input_data.xlsx file. There are several sheets:

  1. units contains the units that types of quantities should be written
  2. refs contains ab-initio and experimental data for a handful of gas species to calculate references (optional)
  3. species contains ab-initio data for each specie
  4. beps contains Bronsted-Evans-Polanyi relationships for reactions (optional)
  5. reactions contains elementary steps
  6. lateral_interactions contains lateral interactions between species (optional)
  7. phases contains phases for the species
  8. reactor contains reactor operating conditions and solver tolerances

The refs, beps and lateral_interactions sheets can be deleted and the code written below should still work.

First, we change the working directory to the location of the Jupyter notebook.

In [1]:
import os
from pathlib import Path

# Find the location of Jupyter notebook
# Note that normally Python scripts have a __file__ variable but Jupyter notebook doesn't.
# Using pathlib can overcome this limiation
try:
    notebook_path = os.path.dirname(__file__)
except NameError:
    notebook_path = Path().resolve()
    
os.chdir(notebook_path)
input_path = './inputs/NH3_Input_Data.xlsx'

And we define a helper function to print data from the Excel spreadsheet easily.

In [2]:
import pandas as pd
from IPython.display import display

def disp_data(io, sheet_name):
    try:
        data = pd.read_excel(io=io, sheet_name=sheet_name, skiprows=[1])
    except:
        print('The {} sheet could not be found in {}.'.format(sheet_name, io))
    else:
        data = data.fillna(' ')
        display(data)

Below, we show the contents of the Excel sheets.

Units

In [3]:
disp_data(io=input_path, sheet_name='units')
length quantity act_energy mass energy pressure
0 cm mol kcal/mol g kcal atm

References

In [4]:
disp_data(io=input_path, sheet_name='refs')
name elements.N elements.H elements.Ru T_ref HoRT_ref potentialenergy symmetrynumber statmech_model atoms vib_wavenumber vib_wavenumber.1 vib_wavenumber.2 vib_wavenumber.3
0 N2 2 0 0 298.15 0.000000 -16.63 2 IdealGas ./N2/CONTCAR 2744
1 NH3 1 3 0 298.15 -18.380253 -19.54 3 IdealGas ./NH3/CONTCAR 3534 3464 1765 1139
2 H2 0 2 0 298.15 0.000000 -6.77 2 IdealGas ./H2/CONTCAR 4342
3 Ru 0 0 1 298.15 0.000000 Placeholder

Species

In this mechanism, we have species existing on terraces and steps. We also define the transition states of species.

Note that later we will use BEPs to calculate barriers for most steps. Hence, these transition state species will actually be ignored. You should use either transition state species or BEP relationships to calculate barriers.

In [5]:
disp_data(io=input_path, sheet_name='species')
name elements.N elements.H elements.Ru phase n_sites T_low T_high statmech_model symmetrynumber ... vib_wavenumber.2 vib_wavenumber.3 vib_wavenumber.4 vib_wavenumber.5 vib_wavenumber.6 vib_wavenumber.7 vib_wavenumber.8 vib_wavenumber.9 vib_wavenumber.10 vib_wavenumber.11
0 N2 2 gas 300 1000 IdealGas 2 ...
1 NH3 1 3 gas 300 1000 IdealGas 3 ... 1765 1139
2 H2 2 gas 300 1000 IdealGas 2 ...
3 N2(T) 2 terrace 1 300 1000 Harmonic ... 347.343 335.674 62.076 32.1794
4 N(T) 1 terrace 1 300 1000 Harmonic ... 504.323 475.805 459.081 410.018
5 H(T) 1 terrace 1 300 1000 Harmonic ... 616.29
6 NH3(T) 1 3 terrace 1 300 1000 Harmonic ... 3364.52 1583.52 1582.07 1124.22 570.212 567.221 333.09 122.859 83.8286 70.6251
7 NH2(T) 1 2 terrace 1 300 1000 Harmonic ... 1503.02 698.869 625.596 615.94 475.13 298.12 153.25
8 NH(T) 1 1 terrace 1 300 1000 Harmonic ... 710.581 528.526 415.196 410.131
9 TS1_NH3(T) 1 3 1 300 1000 Harmonic ... 1723.85 1487.95 959.151 888.946 594.089 428.431 227.032 206.047 142.136
10 TS2_NH2(T) 1 2 1 300 1000 Harmonic ... 922.831 660.967 525.595 496.837 330.674 290.278
11 TS3_NH(T) 1 1 1 300 1000 Harmonic ... 462.016 402.159 242.139
12 TS4_N2(T) 2 1 300 1000 Harmonic ... 386.186 280.943 168.431
13 RU(T) 1 terrace 1 300 1000 Placeholder ...
14 N2(S) 2 step 1 300 1000 Harmonic ... 408.127 378.517 344.871 334.622
15 N(S) 1 step 1 300 1000 Harmonic ... 471.098
16 H(S) 1 step 1 300 1000 Harmonic ... 616.29
17 NH3(S) 1 3 step 1 300 1000 Harmonic ... 3362.81 1590.91 1579.27 1140.76 564.975 555.5 336.1 117.162 86.7744 78.1001
18 NH2(S) 1 2 step 1 300 1000 Harmonic ... 1477.16 720.076 615.666 581.967 468.853 286.37 105.957
19 NH(S) 1 1 step 1 300 1000 Harmonic ... 669.429 506.278 409.502 387.808
20 TS1_NH3(S) 1 3 1 300 1000 Harmonic ... 1685.83 1481 1002.07 916.147 575.405 431.307 345.149 221.65 70.3397
21 TS2_NH2(S) 1 2 1 300 1000 Harmonic ... 1032.19 583.479 392.837 384.834 311.601 110.969
22 TS3_NH(S) 1 1 1 300 1000 Harmonic ... 489.065 443.451 396.193
23 TS4_N2(S) 2 1 300 1000 Harmonic ... 436.166 418.367 391.943
24 RU(S) 1 step 1 300 1000 Placeholder ...
25 RU(B) 1 bulk 1 300 1000 Placeholder ...

26 rows × 24 columns

BEPs

In [6]:
disp_data(io=input_path, sheet_name='beps')
name slope intercept direction notes
0 N-H 0.29 23.23 cleavage Values taken from https://github.com/VlachosGr...
1 NH-H 0.52 19.78 cleavage Values taken from https://github.com/VlachosGr...
2 NH2-H 0.71 23.69 cleavage Values taken from https://github.com/VlachosGr...

Reactions

Note that reactions with two '=' signs indicate it has a transition state or BEP relationship.

In [7]:
disp_data(io=input_path, sheet_name='reactions')
reaction_str is_adsorption direction beta A Ea notes
0 H2 + 2RU(T) = 2H(T) + 2RU(B) True 0 Adsorption reactions typically use beta = 0
1 N2 + RU(T) = N2(T) + RU(B) True 0
2 NH3 + RU(T) = NH3(T) + RU(B) True 0
3 NH3(T) + RU(T) = NH2(T) + H(T) + RU(B) False 1 9.6e+17 14.2 Pre-exponential and activation energy set manu...
4 NH2(T) + RU(T) = NH-H = NH(T) + H(T) + RU(B) False cleavage 1
5 NH(T) + RU(T) = N-H = N(T) + H(T) + RU(B) False cleavage 1
6 2N(T) + RU(B) = TS4_N2(T) = N2(T) + RU(T) False 1
7 H2 + 2RU(S) = 2H(S) + 2RU(B) True 0
8 N2 + RU(S) = N2(S) + RU(B) True 0
9 NH3 + RU(S) = NH3(S) + RU(B) True 0
10 NH3(S) + RU(S)= NH2-H = NH2(S) + H(S) + RU(B) False cleavage 1
11 NH2(S) + RU(S) = NH-H = NH(S) + H(S) + RU(B) False cleavage 1
12 N(S) + H(S) + RU(B) = N-H = NH(S) + RU(S) False synthesis 1 Written in the synthesis direction (bonds are ...
13 2N(S) + RU(B) = TS4_N2(S) = N2(S) + RU(S) False 1 Transition state used instead of BEP

Lateral Interactions

Currently we use piece-wise linear equations for lateral interactions. Here, we only define one interval between 0 - 1 ML but additional list.intervals and list.slopes columns can be added for more complicated behavior.

In [8]:
disp_data(io=input_path, sheet_name='lateral_interactions')
name_i name_j list.intervals list.slopes list.intervals.1 notes
0 N(T) N(T) 0 -52.6 1
1 N(T) H(T) 0 -17.7 1
2 H(T) N(T) 0 -17.7 1
3 H(T) H(T) 0 -3.0 1
4 NH2(T) N(T) 0 -20.7 1
5 N(S) N(S) 0 -52.6 1
6 N(S) H(S) 0 -17.7 1
7 H(S) N(S) 0 -17.7 1
8 H(S) H(S) 0 -3.0 1
9 NH2(S) N(S) 0 -20.7 1

Phases

As previously stated, there are two surface sites: terrace and step. There are also the gas and bulk phases defined.

In [9]:
disp_data(io=input_path, sheet_name='phases')
name phase_type density site_density list.phases list.phases.1 dict.initial_state.RU(T) dict.initial_state.RU(S) dict.initial_state.NH3 note
0 gas IdealGas 1
1 bulk StoichSolid 12.4 Ru Metal
2 terrace InteractingInterface 2.1671e-09 gas bulk 1 Ru(0001)
3 step InteractingInterface 4.4385e-10 gas bulk 1 Ru(0001) with atoms deleted

Reactor

The reactor sheet contains options for the YAML file.

In [10]:
disp_data(io=input_path, sheet_name='reactor')
reactor_type mode V T P cat_abyv end_time flow_rate transient stepping init_step atol rtol output_format
0 cstr isothermal 1 900 1 1500 50 1 True logarithmic 1.000000e-15 1.000000e-15 1.000000e-10 csv

Reading data

Throughout this exercise, we will use pmutt.io.read_excel to extract the data from the Excel spreadsheet.

Designate Units

First, we will designate the units to write the CTI and YAML file.

In [11]:
from pmutt.io.excel import read_excel
from pmutt.omkm.units import Units

units_data = read_excel(io=input_path, sheet_name='units')[0]
units = Units(**units_data)

Reading References (optional)

Second, we will open the input spreadsheet and read the refs sheet.

In [12]:
from pmutt.empirical.references import Reference, References

try:
    refs_data = read_excel(io=input_path, sheet_name='refs')
except:
    # If references are not used, skip this section
    print('The "refs" sheet could not be found in {}. Skiping references'.format(input_path))
    refs = None
else:
    refs = [Reference(**ref_data) for ref_data in refs_data]
    refs = References(references=refs)

Reading Species

Third, we will use the refs defined before and the species sheet to convert statistical mechanical data to NASA objects.

In [13]:
from pmutt.empirical.nasa import Nasa

# Read the species' data
species_data = read_excel(io=input_path, sheet_name='species')

# Create NASA polynomials from the species
species = [Nasa.from_model(references=refs, **ind_species_data) \
           for ind_species_data in species_data]

Adding species from other empirical sources (optional)

Note that OpenMKM also supports Shomate and NASA9 objects. Below, we define a single Shomate species.

In [14]:
import numpy as np
from pmutt.empirical.shomate import Shomate

Ar = Shomate(name='Ar', elements={'Ar': 1}, phase='gas', T_low=298., T_high=6000.,
             a=np.array([20.78600, 2.825911e-7, -1.464191e-7, 1.092131e-8, -3.661371e-8, -6.19735, 179.999, 0.]))

species.append(Ar)

Reading BEP (optional)

Next, we read the BEP relationships to include.

In [15]:
from pmutt.omkm.reaction import BEP

try:
    beps_data = read_excel(io=input_path, sheet_name='beps')
except:
    print('The "beps" sheet could not be found in {}. Skiping BEPs'.format(input_path))
    beps = None
    species_with_beps = species.copy()
else:
    beps = [BEP(**bep_data) for bep_data in beps_data]
    species_with_beps = species + beps

Read reactions

Then, we read the reactions to include.

In [16]:
from pmutt import pmutt_list_to_dict
from pmutt.omkm.reaction import SurfaceReaction

# Convert species to dictionary for easier reaction assignment
species_with_beps_dict = pmutt_list_to_dict(species_with_beps)

reactions_data = read_excel(io=input_path, sheet_name='reactions')
reactions = [SurfaceReaction.from_string(species=species_with_beps_dict, **reaction_data) \
             for reaction_data in reactions_data]

Read lateral interactions (optional)

After, we read lateral interactions to include.

In [17]:
from pmutt.mixture.cov import PiecewiseCovEffect

try:
    interactions_data = read_excel(io=input_path, sheet_name='lateral_interactions')
except:
    # If no lateral interactions exist, skip this section
    print('The "lateral_interactions" sheet could not be found in {}. Skiping lateral interactions'.format(input_path))
    interactions = None
else:
    interactions = [PiecewiseCovEffect(**interaction_data) for interaction_data in interactions_data]

Reading Phases

Finally, we read the phases data from Excel and organize it for use in OpenMKM.

In [18]:
from pmutt.io.omkm import organize_phases

# Read data from Excel sheet about phases
phases_data = read_excel(io=input_path, sheet_name='phases')
phases = organize_phases(phases_data, species=species, reactions=reactions, interactions=interactions)

Write Reactor YAML File

The YAML file specifying the reactor configuration can be written using the write_yaml function. Note that if:

  • units is not specified, float values are assumed to be in SI units
  • units is specified, float values are consistent with unit's attributes
  • you would like a quantity to have particular units, pass the value as a string with the units (e.g. "10 cm3/s").
In [19]:
from pmutt.io.omkm import write_yaml

Path('./outputs').mkdir(exist_ok=True)
yaml_path = './outputs/reactor.yaml'
reactor_data = read_excel(io=input_path, sheet_name='reactor')[0]
write_yaml(filename=yaml_path, phases=phases, units=units, **reactor_data)

If you would prefer to return the file as a string instead of writing it, omit the filename.

In [20]:
print(write_yaml(phases=phases, units=units, **reactor_data))
# File generated by pMuTT (v 1.2.21dev) on 2020-05-26 13:36:40.983379
# See documentation for OpenMKM YAML file here:
# https://vlachosgroup.github.io/openmkm/input
inlet_gas:
    flow_rate: "1 cm3/s"
phases:
    bulk:
        name: bulk
    gas:
        initial_state: "NH3:1.0"
        name: gas
    surfaces:
    -   initial_state: "RU(T):1.0"
        name: terrace
    -   initial_state: "RU(S):1.0"
        name: step
reactor:
    cat_abyv: "1500 /cm"
    mode: "isothermal"
    pressure: "1 atm"
    temperature: 900
    type: "cstr"
    volume: "1 cm3"
simulation:
    end_time: "50 s"
    init_step: 1.0e-15
    output_format: "csv"
    solver:
        atol: 1.0e-15
        rtol: 1.0e-10
    stepping: "logarithmic"
    transient: true

Write Thermo/Kinetic YAML File

As of OpenMKM version 0.6.0 onwards, the thermodynamic and kinetic parameters can be written as a YAML file. We recommend using this format over the older CTI format. To generate the Thermo/Kinetic YAML file using pMuTT, use the write_thermo_yaml function

In [21]:
from pmutt.io.omkm import write_thermo_yaml

write_thermo_yaml(phases=phases,
                  species=species,
                  reactions=reactions,
                  lateral_interactions=interactions,
                  units=units,
                  filename='./outputs/thermo.yaml')

Like before, omitting the filename parameter returns a string

In [22]:
print(write_thermo_yaml(phases=phases,
                        species=species,
                        reactions=reactions,
                        lateral_interactions=interactions,
                        units=units))
# File generated by pMuTT (v 1.2.21dev) on 2020-05-26 13:36:41.107378
# See documentation for OpenMKM YAML file here:
# https://vlachosgroup.github.io/openmkm/input

#-------------------------------------------------------------------------------
# UNITS
#-------------------------------------------------------------------------------
units: {mass: g, length: cm, time: s, quantity: mol, energy: kcal, activation-energy: kcal/mol,
  pressure: atm}


#-------------------------------------------------------------------------------
# PHASES
#-------------------------------------------------------------------------------
phases:

- name: gas
  elements: [H, N, Ar]
  species: [N2, NH3, H2, Ar]
  thermo: ideal-gas
  kinetics: gas
  reactions: none

- name: bulk
  elements: [Ru]
  species: [RU(B)]
  thermo: fixed-stoichiometry

- name: terrace
  elements: [H, Ru, N]
  species: [N2(T), N(T), H(T), NH3(T), NH2(T), NH(T), RU(T)]
  kinetics: surface
  site-density: "2.1671e-09 mol/cm^2"
  thermo: surface-lateral-interaction
  interactions: declared-species
  reactions: declared-species
  beps: all

- name: step
  elements: [H, Ru, N]
  species: [N2(S), N(S), H(S), NH3(S), NH2(S), NH(S), RU(S)]
  kinetics: surface
  site-density: "4.4385e-10 mol/cm^2"
  thermo: surface-lateral-interaction
  interactions: declared-species
  reactions: declared-species
  beps: all


#-------------------------------------------------------------------------------
# SPECIES
#-------------------------------------------------------------------------------
species:

- name: N2
  composition: {N: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 642.8571428571429, 1000.0]
    data:
    - [3.3956319945669633, 0.001115707689025668, -4.301993779374381e-06, 6.8071424019295535e-09,
      -3.2903312791047058e-12, -125.46629834547932, 3.5561107385882806]
    - [4.050329990684662, -0.0029677854067980108, 5.323485005316287e-06, -3.3518122405333548e-09,
      7.58446718337381e-13, -210.11026414819972, 0.6858228492521796]

- name: NH3
  composition: {N: 1.0, H: 3.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 542.8571428571429, 1000.0]
    data:
    - [4.564972417951128, -0.006832837835873698, 2.685237031047407e-05, -3.40241692936106e-08,
      1.6003749874693446e-11, -8535.999717545712, -1.7583318962760188]
    - [3.1609684331689687, 0.003362370389171136, -1.2142369921834615e-06, 6.829575286260319e-10,
      -2.54434965826972e-13, -8379.626286586808, 4.185658791424039]

- name: H2
  composition: {H: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 614.2857142857142, 1000.0]
    data:
    - [3.5059704188335177, -7.325197849360956e-05, 3.371722587049024e-07, -6.912640387891159e-10,
      5.337189015741048e-13, 1687.3519365761772, -4.298852729497387]
    - [3.3937013396919027, 0.0007194112421430606, -1.7531971899407386e-06, 1.7534933554342533e-09,
      -5.375683345945896e-13, 1699.9908830788797, -3.821319983179503]

- name: N2(T)
  composition: {N: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 514.2857142857143, 1000.0]
    data:
    - [0.6394780241851414, 0.027666673612151815, -7.645720305897118e-05, 1.0176487948083283e-07,
      -5.19823386998956e-11, -6830.2293384845825, -2.4373983302173254]
    - [3.8547865818886304, 0.002451553391280693, -1.1229041254091556e-06, 2.836620170114086e-10,
      -6.814515451765802e-14, -7163.7513951542915, -15.811301160783382]
  sites: 1.0

- name: N(T)
  composition: {N: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 557.1428571428571, 1000.0]
    data:
    - [-4.894442791188698, 0.05767676205626723, -0.00013447158207005976, 1.5228759500727411e-07,
      -6.828213240453864e-11, -10575.315555452235, 17.560620354866614]
    - [0.6598464899392497, 0.017822907875229405, -2.524998562064707e-05, 1.6958113771951197e-08,
      -4.435079126394282e-12, -11206.325808617066, -6.042105374266001]
  sites: 1.0

- name: H(T)
  composition: {H: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 557.1428571428571, 1000.0]
    data:
    - [-1.8007958982617518, 0.014160885760779236, -1.4954871236615527e-05, 2.2220499972019704e-09,
      3.926688603133256e-12, -6100.896586017127, 7.139128866846124]
    - [-1.4537007356856155, 0.01342293260935598, -1.768619079260206e-05, 1.1258775063528586e-08,
      -2.826810620829653e-12, -6167.46227369115, 5.421303508464117]
  sites: 1.0

- name: NH3(T)
  composition: {N: 1.0, H: 3.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 428.57142857142856, 1000.0]
    data:
    - [1.0185579992488374, 0.022246747959228638, -4.370286768090834e-05, 5.8576346934492585e-08,
      -3.390825287953804e-11, -14214.003842753298, -4.229509556183071]
    - [1.6390458061230475, 0.015436700793334042, -1.6405558855182064e-05, 1.0812691723221286e-08,
      -2.9608944658451726e-12, -14257.421618513974, -6.585989385183915]
  sites: 1.0

- name: NH2(T)
  composition: {N: 1.0, H: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 585.7142857142858, 1000.0]
    data:
    - [-2.4350528056129472, 0.03718137542886255, -7.252850561422588e-05, 7.309049530582159e-08,
      -2.956669163752849e-11, -11755.772200257523, 8.409950246927902]
    - [0.5916317349519948, 0.017127978582404026, -2.171396792761983e-05, 1.4726348155896754e-08,
      -3.9534369576339804e-12, -12128.14822629148, -4.693752289444842]
  sites: 1.0

- name: NH(T)
  composition: {N: 1.0, H: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 600.0, 1000.0]
    data:
    - [-3.6668879702880055, 0.03982782412521621, -8.187333299912497e-05, 8.249622398493288e-08,
      -3.286921120308004e-11, -14625.719115846838, 13.504746495617308]
    - [0.1063545642473668, 0.015271251197937114, -2.097761902407342e-05, 1.4305894047220088e-08,
      -3.795820539846915e-12, -15096.755597474243, -2.891979430990201]
  sites: 1.0

- name: TS1_NH3(T)
  composition: {N: 1.0, H: 3.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 671.4285714285714, 1000.0]
    data:
    - [0.16718331336897327, 0.020329980402827984, -2.2715789281313686e-05, 1.396055194227525e-08,
      -3.4213689130260705e-12, -2513.6254986662357, -1.9177576265691592]
    - [0.8082560769434938, 0.017161423429626208, -1.702221083696219e-05, 9.632653817050899e-09,
      -2.291120234312056e-12, -2615.2571907445895, -4.867435690136908]
  sites: 1.0

- name: TS2_NH2(T)
  composition: {N: 1.0, H: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 628.5714285714287, 1000.0]
    data:
    - [-2.546261486549267, 0.03396218372795058, -5.7241256896206506e-05, 4.946324722557642e-08,
      -1.7352754696747937e-11, -5761.707019993226, 8.789590109046689]
    - [-0.22939751786703408, 0.01988249700954183, -2.4697033965083446e-05, 1.5524372835872282e-08,
      -3.874910992202475e-12, -6070.669161900978, -1.4344822148231904]
  sites: 1.0

- name: TS3_NH(T)
  composition: {N: 1.0, H: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 542.8571428571429, 1000.0]
    data:
    - [-1.550325786832137, 0.02805684817769237, -5.9204464743939565e-05, 6.504664203240556e-08,
      -2.9386333379569044e-11, -2390.0965456230283, 4.70877083989161]
    - [0.4367750071098204, 0.013299204888604829, -1.7193813868789944e-05, 1.0835991303856117e-08,
      -2.708299561097233e-12, -2609.1249431827414, -3.67094272865846]
  sites: 1.0

- name: TS4_N2(T)
  composition: {N: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 528.5714285714286, 1000.0]
    data:
    - [-1.426183002268343, 0.03779383005618639, -9.641467810794512e-05, 1.1818753814714894e-07,
      -5.691779297044529e-11, 21872.62618453775, 3.575019075410285]
    - [2.3243108861892066, 0.009282795711236863, -1.3583554649130437e-05, 9.380823346458842e-09,
      -2.514205017827287e-12, 21470.007200863885, -12.147719162849816]
  sites: 1.0

- name: RU(T)
  composition: {Ru: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 657.1428571428571, 1000.0]
    data:
    - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
    - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
  sites: 1.0

- name: N2(S)
  composition: {N: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 542.8571428571429, 1000.0]
    data:
    - [-2.336635474195216, 0.04016613994195943, -8.992000355655354e-05, 1.0092848132559232e-07,
      -4.5662308327121564e-11, -8756.455534491419, 7.186675872937272]
    - [1.0040300585138415, 0.015732755750113465, -2.1500687407393788e-05, 1.4112695947173559e-08,
      -3.636536147416892e-12, -9129.659453153845, -6.949447166751186]
  sites: 1.0

- name: N(S)
  composition: {N: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 557.1428571428571, 1000.0]
    data:
    - [-2.5849874550678793, 0.029310942630531245, -6.782768990938232e-05, 7.632524955387304e-08,
      -3.4036812652150437e-11, -12299.815547573347, 9.385302365886137]
    - [0.21812681852373034, 0.009273511067135979, -1.312694685067916e-05, 8.810761240318494e-09,
      -2.303213566137411e-12, -12619.403961000628, -2.536741481084843]
  sites: 1.0

- name: H(S)
  composition: {H: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 557.1428571428571, 1000.0]
    data:
    - [-1.8007958982617518, 0.014160885760779236, -1.4954871236615527e-05, 2.2220499972019704e-09,
      3.926688603133256e-12, -6100.896586017127, 7.139128866846124]
    - [-1.4537007356856155, 0.01342293260935598, -1.768619079260206e-05, 1.1258775063528586e-08,
      -2.826810620829653e-12, -6167.46227369115, 5.421303508464117]
  sites: 1.0

- name: NH3(S)
  composition: {N: 1.0, H: 3.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 428.57142857142856, 1000.0]
    data:
    - [0.9760733268553489, 0.022999709118353844, -4.7144112328422e-05, 6.472018916855692e-08,
      -3.782202572778842e-11, -17118.32767533135, -4.184145930004325]
    - [1.7092437442450366, 0.015087729719952463, -1.5806512580778123e-05, 1.0365926782894892e-08,
      -2.836019677839079e-12, -17170.94688188792, -6.983454889647479]
  sites: 1.0

- name: NH2(S)
  composition: {N: 1.0, H: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 585.7142857142858, 1000.0]
    data:
    - [-2.134846314598767, 0.0356104434442669, -6.865945297445601e-05, 6.851219024341386e-08,
      -2.7484251930293086e-11, -18304.90031293902, 7.45851008596866]
    - [0.6884294740228686, 0.016982660476984567, -2.1646009999282705e-05, 1.4711831653840717e-08,
      -3.949644232635474e-12, -18653.702884329432, -4.7764176851404985]
  sites: 1.0

- name: NH(S)
  composition: {N: 1.0, H: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 585.7142857142858, 1000.0]
    data:
    - [-3.5857677200628846, 0.04041824721931891, -8.509525219329148e-05, 8.779477895906484e-08,
      -3.583003048080367e-11, -13551.74351821945, 13.067654186793725]
    - [0.23250847831381585, 0.015084052551408086, -2.0991627837752818e-05, 1.4486313872448512e-08,
      -3.883624257502453e-12, -14019.642354896643, -3.4525644759344543]
  sites: 1.0

- name: TS1_NH3(S)
  composition: {N: 1.0, H: 3.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 671.4285714285714, 1000.0]
    data:
    - [-0.03735258850223981, 0.020505391121308416, -2.185776716209172e-05, 1.2280357404965904e-08,
      -2.5657560572043993e-12, -8998.774514615734, -0.570339124004084]
    - [0.4553691668625345, 0.018313094306811304, -1.857144398084139e-05, 1.058848387303736e-08,
      -2.5170427368793067e-12, -9082.387822169567, -2.878229360902699]
  sites: 1.0

- name: TS2_NH2(S)
  composition: {N: 1.0, H: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 542.8571428571429, 1000.0]
    data:
    - [-1.036866383972045, 0.030592277521829653, -6.425523050987311e-05, 7.269128834796514e-08,
      -3.348352008358944e-11, -5225.80553219122, 2.680487289862805]
    - [1.2611609333482254, 0.013462908222612677, -1.538915061763511e-05, 9.593374111601978e-09,
      -2.4515771294165935e-12, -5477.825448566679, -7.0003108016223585]
  sites: 1.0

- name: TS3_NH(S)
  composition: {N: 1.0, H: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 514.2857142857143, 1000.0]
    data:
    - [-2.970965179922778, 0.03842249321850175, -9.527920060365471e-05, 1.1969265561516276e-07,
      -5.970204310561188e-11, -3974.1786968486535, 10.33999247498289]
    - [0.46394757698187555, 0.01118458452963758, -1.3006822073078597e-05, 7.709667616269628e-09,
      -1.8671669511641015e-12, -4326.655786033964, -3.9094684579463275]
  sites: 1.0

- name: TS4_N2(S)
  composition: {N: 2.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 542.8571428571429, 1000.0]
    data:
    - [-3.7174509392891895, 0.04782817681469442, -0.000115188567018151, 1.3442901586870685e-07,
      -6.200443837365281e-11, -2254.8256799453657, 12.960400788703833]
    - [0.9062880021971168, 0.013876458238608324, -1.9927317752312164e-05, 1.354580842449189e-08,
      -3.5812956409457856e-12, -2768.384920969638, -6.582359999458994]
  sites: 1.0

- name: RU(S)
  composition: {Ru: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 657.1428571428571, 1000.0]
    data:
    - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
    - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
  sites: 1.0

- name: RU(B)
  composition: {Ru: 1.0}
  thermo:
    model: NASA7
    temperature-ranges: [300.0, 657.1428571428571, 1000.0]
    data:
    - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
    - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
  sites: 1.0

- name: Ar
  composition: {Ar: 1}
  thermo:
    model: Shomate
    temperature-ranges: [298.0, 6000.0]
    data:
    - [20.786, 2.825911e-07, -1.464191e-07, 1.092131e-08, -3.661371e-08, -6.19735,
      179.999]


#-------------------------------------------------------------------------------
# REACTIONS
#-------------------------------------------------------------------------------
reactions:

- equation: H2 + 2 RU(T) <=> 2 H(T) + 2 RU(B)
  sticking-species: H2
  Motz-Wise: false
  sticking-coefficient: {A: 0.5, b: 0, Ea: "0.0 kcal/mol"}
  id: r_0000

- equation: N2 + RU(T) <=> N2(T) + RU(B)
  sticking-species: N2
  Motz-Wise: false
  sticking-coefficient: {A: 0.5, b: 0, Ea: "0.0 kcal/mol"}
  id: r_0001

- equation: NH3 + RU(T) <=> NH3(T) + RU(B)
  sticking-species: NH3
  Motz-Wise: false
  sticking-coefficient: {A: 0.5, b: 0, Ea: "0.0 kcal/mol"}
  id: r_0002

- equation: NH3(T) + RU(T) <=> NH2(T) + H(T) + RU(B)
  rate-constant: {A: 9.6e+17, b: 1, Ea: "0.0 kcal/mol"}
  id: r_0003

- equation: NH2(T) + RU(T) <=> NH(T) + H(T) + RU(B)
  rate-constant: {A: 4.807487477533391e+18, b: 1, Ea: "10.15009434208916 kcal/mol"}
  id: r_0004

- equation: NH(T) + RU(T) <=> N(T) + H(T) + RU(B)
  rate-constant: {A: 4.807487477533391e+18, b: 1, Ea: "22.079721657118633 kcal/mol"}
  id: r_0005

- equation: 2 N(T) + RU(B) <=> N2(T) + RU(T)
  rate-constant: {A: 4.807487477533391e+18, b: 1, Ea: "86.47548232695213 kcal/mol"}
  id: r_0006

- equation: H2 + 2 RU(S) <=> 2 H(S) + 2 RU(B)
  sticking-species: H2
  Motz-Wise: false
  sticking-coefficient: {A: 0.5, b: 0, Ea: "0.0 kcal/mol"}
  id: r_0007

- equation: N2 + RU(S) <=> N2(S) + RU(B)
  sticking-species: N2
  Motz-Wise: false
  sticking-coefficient: {A: 0.5, b: 0, Ea: "0.0 kcal/mol"}
  id: r_0008

- equation: NH3 + RU(S) <=> NH3(S) + RU(B)
  sticking-species: NH3
  Motz-Wise: false
  sticking-coefficient: {A: 0.5, b: 0, Ea: "0.0 kcal/mol"}
  id: r_0009

- equation: NH3(S) + RU(S) <=> NH2(S) + H(S) + RU(B)
  rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: "12.592618179712357 kcal/mol"}
  id: r_0010

- equation: NH2(S) + RU(S) <=> NH(S) + H(S) + RU(B)
  rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: "18.012171751643198 kcal/mol"}
  id: r_0011

- equation: N(S) + H(S) + RU(B) <=> NH(S) + RU(S)
  rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: "26.08072567404924 kcal/mol"}
  id: r_0012

- equation: 2 N(S) + RU(B) <=> N2(S) + RU(S)
  rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: "44.5994818235098 kcal/mol"}
  id: r_0013


#-------------------------------------------------------------------------------
# BEPS
#-------------------------------------------------------------------------------
beps:

- id: NH-H
  slope: 0.52
  intercept: "19.78 kcal/mol"
  direction: cleavage
  cleavage-reactions: ["r_0004", "r_0011"]

- id: N-H
  slope: 0.29
  intercept: "23.23 kcal/mol"
  direction: cleavage
  synthesis-reactions: ["r_0012"]
  cleavage-reactions: ["r_0005"]

- id: NH2-H
  slope: 0.71
  intercept: "23.69 kcal/mol"
  direction: cleavage
  cleavage-reactions: ["r_0010"]


#-------------------------------------------------------------------------------
# INTERACTIONS
#-------------------------------------------------------------------------------
interactions:

- species: [N(T), N(T)]
  coverage-threshold: [0, 1]
  strength: ["-52.6 kcal"]
  id: i_0000

- species: [N(T), H(T)]
  coverage-threshold: [0, 1]
  strength: ["-17.7 kcal"]
  id: i_0001

- species: [H(T), N(T)]
  coverage-threshold: [0, 1]
  strength: ["-17.7 kcal"]
  id: i_0002

- species: [H(T), H(T)]
  coverage-threshold: [0, 1]
  strength: ["-3.0 kcal"]
  id: i_0003

- species: [NH2(T), N(T)]
  coverage-threshold: [0, 1]
  strength: ["-20.7 kcal"]
  id: i_0004

- species: [N(S), N(S)]
  coverage-threshold: [0, 1]
  strength: ["-52.6 kcal"]
  id: i_0005

- species: [N(S), H(S)]
  coverage-threshold: [0, 1]
  strength: ["-17.7 kcal"]
  id: i_0006

- species: [H(S), N(S)]
  coverage-threshold: [0, 1]
  strength: ["-17.7 kcal"]
  id: i_0007

- species: [H(S), H(S)]
  coverage-threshold: [0, 1]
  strength: ["-3.0 kcal"]
  id: i_0008

- species: [NH2(S), N(S)]
  coverage-threshold: [0, 1]
  strength: ["-20.7 kcal"]
  id: i_0009

Write CTI File

The CTI file species the thermodynamics and kinetics of the system. It can be written using write_cti. Note that we take the reactor operating conditions previously read for the YAML file to calculate thermodynamic and kinetic parameters.

In [23]:
from pmutt.io.omkm import write_cti

cti_path = './outputs/thermo.cti'
use_motz_wise = True
T = reactor_data['T']

write_cti(reactions=reactions, species=species, phases=phases, units=units,
         lateral_interactions=interactions, filename=cti_path,
         use_motz_wise=use_motz_wise, T=T, P=1.)

Like before, omitting the filename parameter returns a string.

In [24]:
print(write_cti(reactions=reactions, species=species, phases=phases, units=units,
               lateral_interactions=interactions, use_motz_wise=use_motz_wise))
# File generated by pMuTT (v 1.2.21dev) on 2020-05-26 13:36:41.298380
# See documentation for OpenMKM CTI file here:
# https://vlachosgroup.github.io/openmkm/input

#-------------------------------------------------------------------------------
# UNITS
#-------------------------------------------------------------------------------
units(length="cm", time="s", quantity="mol", energy="kcal",
      act_energy="kcal/mol", pressure="atm", mass="g")

#-------------------------------------------------------------------------------
# PHASES
#-------------------------------------------------------------------------------
ideal_gas(name="gas",
          elements="H N Ar",
          species="N2 NH3 H2 Ar",
          reactions=[])

stoichiometric_solid(name="bulk",
                     elements="Ru",
                     species="RU(B)",
                     density=12.4,
                     note="Ru Metal")

interacting_interface(name="terrace",
                      elements="H Ru N",
                      species="N2(T) N(T) H(T) NH3(T) NH2(T) NH(T) RU(T)",
                      phases="gas bulk",
                      site_density=2.1671e-09,
                      interactions=["i_0000 to i_0004"],
                      reactions=["r_0000 to r_0006"],
                      beps="NH-H N-H",
                      note="Ru(0001)")

interacting_interface(name="step",
                      elements="H Ru N",
                      species="N2(S) N(S) H(S) NH3(S) NH2(S) NH(S) RU(S)",
                      phases="gas bulk",
                      site_density=4.4385e-10,
                      interactions=["i_0005 to i_0009"],
                      reactions=["r_0007 to r_0013"],
                      beps="NH2-H NH-H N-H",
                      note="Ru(0001) with atoms deleted")


#-------------------------------------------------------------------------------
# SPECIES
#-------------------------------------------------------------------------------
species(name="N2", atoms="N:2",
        thermo=(NASA([300.0, 642.8571428571429],
                     [ 3.39563199E+00,  1.11570769E-03, -4.30199378E-06,
                       6.80714240E-09, -3.29033128E-12, -1.25466298E+02,
                       3.55611074E+00]),
                NASA([642.8571428571429, 1000.0], 
                     [ 4.05032999E+00, -2.96778541E-03,  5.32348501E-06,
                      -3.35181224E-09,  7.58446718E-13, -2.10110264E+02,
                       6.85822849E-01])))

species(name="NH3", atoms="N:1 H:3",
        thermo=(NASA([300.0, 542.8571428571429],
                     [ 4.56497242E+00, -6.83283784E-03,  2.68523703E-05,
                      -3.40241693E-08,  1.60037499E-11, -8.53599972E+03,
                      -1.75833190E+00]),
                NASA([542.8571428571429, 1000.0], 
                     [ 3.16096843E+00,  3.36237039E-03, -1.21423699E-06,
                       6.82957529E-10, -2.54434966E-13, -8.37962629E+03,
                       4.18565879E+00])))

species(name="H2", atoms="H:2",
        thermo=(NASA([300.0, 614.2857142857142],
                     [ 3.50597042E+00, -7.32519785E-05,  3.37172259E-07,
                      -6.91264039E-10,  5.33718902E-13,  1.68735194E+03,
                      -4.29885273E+00]),
                NASA([614.2857142857142, 1000.0], 
                     [ 3.39370134E+00,  7.19411242E-04, -1.75319719E-06,
                       1.75349336E-09, -5.37568335E-13,  1.69999088E+03,
                      -3.82131998E+00])))

species(name="N2(T)", atoms="N:2", size=1.0,
        thermo=(NASA([300.0, 514.2857142857143],
                     [ 6.39478024E-01,  2.76666736E-02, -7.64572031E-05,
                       1.01764879E-07, -5.19823387E-11, -6.83022934E+03,
                      -2.43739833E+00]),
                NASA([514.2857142857143, 1000.0], 
                     [ 3.85478658E+00,  2.45155339E-03, -1.12290413E-06,
                       2.83662017E-10, -6.81451545E-14, -7.16375140E+03,
                      -1.58113012E+01])))

species(name="N(T)", atoms="N:1", size=1.0,
        thermo=(NASA([300.0, 557.1428571428571],
                     [-4.89444279E+00,  5.76767621E-02, -1.34471582E-04,
                       1.52287595E-07, -6.82821324E-11, -1.05753156E+04,
                       1.75606204E+01]),
                NASA([557.1428571428571, 1000.0], 
                     [ 6.59846490E-01,  1.78229079E-02, -2.52499856E-05,
                       1.69581138E-08, -4.43507913E-12, -1.12063258E+04,
                      -6.04210537E+00])))

species(name="H(T)", atoms="H:1", size=1.0,
        thermo=(NASA([300.0, 557.1428571428571],
                     [-1.80079590E+00,  1.41608858E-02, -1.49548712E-05,
                       2.22205000E-09,  3.92668860E-12, -6.10089659E+03,
                       7.13912887E+00]),
                NASA([557.1428571428571, 1000.0], 
                     [-1.45370074E+00,  1.34229326E-02, -1.76861908E-05,
                       1.12587751E-08, -2.82681062E-12, -6.16746227E+03,
                       5.42130351E+00])))

species(name="NH3(T)", atoms="N:1 H:3", size=1.0,
        thermo=(NASA([300.0, 428.57142857142856],
                     [ 1.01855800E+00,  2.22467480E-02, -4.37028677E-05,
                       5.85763469E-08, -3.39082529E-11, -1.42140038E+04,
                      -4.22950956E+00]),
                NASA([428.57142857142856, 1000.0], 
                     [ 1.63904581E+00,  1.54367008E-02, -1.64055589E-05,
                       1.08126917E-08, -2.96089447E-12, -1.42574216E+04,
                      -6.58598939E+00])))

species(name="NH2(T)", atoms="N:1 H:2", size=1.0,
        thermo=(NASA([300.0, 585.7142857142858],
                     [-2.43505281E+00,  3.71813754E-02, -7.25285056E-05,
                       7.30904953E-08, -2.95666916E-11, -1.17557722E+04,
                       8.40995025E+00]),
                NASA([585.7142857142858, 1000.0], 
                     [ 5.91631735E-01,  1.71279786E-02, -2.17139679E-05,
                       1.47263482E-08, -3.95343696E-12, -1.21281482E+04,
                      -4.69375229E+00])))

species(name="NH(T)", atoms="N:1 H:1", size=1.0,
        thermo=(NASA([300.0, 600.0],
                     [-3.66688797E+00,  3.98278241E-02, -8.18733330E-05,
                       8.24962240E-08, -3.28692112E-11, -1.46257191E+04,
                       1.35047465E+01]),
                NASA([600.0, 1000.0], 
                     [ 1.06354564E-01,  1.52712512E-02, -2.09776190E-05,
                       1.43058940E-08, -3.79582054E-12, -1.50967556E+04,
                      -2.89197943E+00])))

species(name="TS1_NH3(T)", atoms="N:1 H:3", size=1.0,
        thermo=(NASA([300.0, 671.4285714285714],
                     [ 1.67183313E-01,  2.03299804E-02, -2.27157893E-05,
                       1.39605519E-08, -3.42136891E-12, -2.51362550E+03,
                      -1.91775763E+00]),
                NASA([671.4285714285714, 1000.0], 
                     [ 8.08256077E-01,  1.71614234E-02, -1.70222108E-05,
                       9.63265382E-09, -2.29112023E-12, -2.61525719E+03,
                      -4.86743569E+00])))

species(name="TS2_NH2(T)", atoms="N:1 H:2", size=1.0,
        thermo=(NASA([300.0, 628.5714285714287],
                     [-2.54626149E+00,  3.39621837E-02, -5.72412569E-05,
                       4.94632472E-08, -1.73527547E-11, -5.76170702E+03,
                       8.78959011E+00]),
                NASA([628.5714285714287, 1000.0], 
                     [-2.29397518E-01,  1.98824970E-02, -2.46970340E-05,
                       1.55243728E-08, -3.87491099E-12, -6.07066916E+03,
                      -1.43448221E+00])))

species(name="TS3_NH(T)", atoms="N:1 H:1", size=1.0,
        thermo=(NASA([300.0, 542.8571428571429],
                     [-1.55032579E+00,  2.80568482E-02, -5.92044647E-05,
                       6.50466420E-08, -2.93863334E-11, -2.39009655E+03,
                       4.70877084E+00]),
                NASA([542.8571428571429, 1000.0], 
                     [ 4.36775007E-01,  1.32992049E-02, -1.71938139E-05,
                       1.08359913E-08, -2.70829956E-12, -2.60912494E+03,
                      -3.67094273E+00])))

species(name="TS4_N2(T)", atoms="N:2", size=1.0,
        thermo=(NASA([300.0, 528.5714285714286],
                     [-1.42618300E+00,  3.77938301E-02, -9.64146781E-05,
                       1.18187538E-07, -5.69177930E-11,  2.18726262E+04,
                       3.57501908E+00]),
                NASA([528.5714285714286, 1000.0], 
                     [ 2.32431089E+00,  9.28279571E-03, -1.35835546E-05,
                       9.38082335E-09, -2.51420502E-12,  2.14700072E+04,
                      -1.21477192E+01])))

species(name="RU(T)", atoms="Ru:1", size=1.0,
        thermo=(NASA([300.0, 657.1428571428571],
                     [ 0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00]),
                NASA([657.1428571428571, 1000.0], 
                     [ 0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00])))

species(name="N2(S)", atoms="N:2", size=1.0,
        thermo=(NASA([300.0, 542.8571428571429],
                     [-2.33663547E+00,  4.01661399E-02, -8.99200036E-05,
                       1.00928481E-07, -4.56623083E-11, -8.75645553E+03,
                       7.18667587E+00]),
                NASA([542.8571428571429, 1000.0], 
                     [ 1.00403006E+00,  1.57327558E-02, -2.15006874E-05,
                       1.41126959E-08, -3.63653615E-12, -9.12965945E+03,
                      -6.94944717E+00])))

species(name="N(S)", atoms="N:1", size=1.0,
        thermo=(NASA([300.0, 557.1428571428571],
                     [-2.58498746E+00,  2.93109426E-02, -6.78276899E-05,
                       7.63252496E-08, -3.40368127E-11, -1.22998155E+04,
                       9.38530237E+00]),
                NASA([557.1428571428571, 1000.0], 
                     [ 2.18126819E-01,  9.27351107E-03, -1.31269469E-05,
                       8.81076124E-09, -2.30321357E-12, -1.26194040E+04,
                      -2.53674148E+00])))

species(name="H(S)", atoms="H:1", size=1.0,
        thermo=(NASA([300.0, 557.1428571428571],
                     [-1.80079590E+00,  1.41608858E-02, -1.49548712E-05,
                       2.22205000E-09,  3.92668860E-12, -6.10089659E+03,
                       7.13912887E+00]),
                NASA([557.1428571428571, 1000.0], 
                     [-1.45370074E+00,  1.34229326E-02, -1.76861908E-05,
                       1.12587751E-08, -2.82681062E-12, -6.16746227E+03,
                       5.42130351E+00])))

species(name="NH3(S)", atoms="N:1 H:3", size=1.0,
        thermo=(NASA([300.0, 428.57142857142856],
                     [ 9.76073327E-01,  2.29997091E-02, -4.71441123E-05,
                       6.47201892E-08, -3.78220257E-11, -1.71183277E+04,
                      -4.18414593E+00]),
                NASA([428.57142857142856, 1000.0], 
                     [ 1.70924374E+00,  1.50877297E-02, -1.58065126E-05,
                       1.03659268E-08, -2.83601968E-12, -1.71709469E+04,
                      -6.98345489E+00])))

species(name="NH2(S)", atoms="N:1 H:2", size=1.0,
        thermo=(NASA([300.0, 585.7142857142858],
                     [-2.13484631E+00,  3.56104434E-02, -6.86594530E-05,
                       6.85121902E-08, -2.74842519E-11, -1.83049003E+04,
                       7.45851009E+00]),
                NASA([585.7142857142858, 1000.0], 
                     [ 6.88429474E-01,  1.69826605E-02, -2.16460100E-05,
                       1.47118317E-08, -3.94964423E-12, -1.86537029E+04,
                      -4.77641769E+00])))

species(name="NH(S)", atoms="N:1 H:1", size=1.0,
        thermo=(NASA([300.0, 585.7142857142858],
                     [-3.58576772E+00,  4.04182472E-02, -8.50952522E-05,
                       8.77947790E-08, -3.58300305E-11, -1.35517435E+04,
                       1.30676542E+01]),
                NASA([585.7142857142858, 1000.0], 
                     [ 2.32508478E-01,  1.50840526E-02, -2.09916278E-05,
                       1.44863139E-08, -3.88362426E-12, -1.40196424E+04,
                      -3.45256448E+00])))

species(name="TS1_NH3(S)", atoms="N:1 H:3", size=1.0,
        thermo=(NASA([300.0, 671.4285714285714],
                     [-3.73525885E-02,  2.05053911E-02, -2.18577672E-05,
                       1.22803574E-08, -2.56575606E-12, -8.99877451E+03,
                      -5.70339124E-01]),
                NASA([671.4285714285714, 1000.0], 
                     [ 4.55369167E-01,  1.83130943E-02, -1.85714440E-05,
                       1.05884839E-08, -2.51704274E-12, -9.08238782E+03,
                      -2.87822936E+00])))

species(name="TS2_NH2(S)", atoms="N:1 H:2", size=1.0,
        thermo=(NASA([300.0, 542.8571428571429],
                     [-1.03686638E+00,  3.05922775E-02, -6.42552305E-05,
                       7.26912883E-08, -3.34835201E-11, -5.22580553E+03,
                       2.68048729E+00]),
                NASA([542.8571428571429, 1000.0], 
                     [ 1.26116093E+00,  1.34629082E-02, -1.53891506E-05,
                       9.59337411E-09, -2.45157713E-12, -5.47782545E+03,
                      -7.00031080E+00])))

species(name="TS3_NH(S)", atoms="N:1 H:1", size=1.0,
        thermo=(NASA([300.0, 514.2857142857143],
                     [-2.97096518E+00,  3.84224932E-02, -9.52792006E-05,
                       1.19692656E-07, -5.97020431E-11, -3.97417870E+03,
                       1.03399925E+01]),
                NASA([514.2857142857143, 1000.0], 
                     [ 4.63947577E-01,  1.11845845E-02, -1.30068221E-05,
                       7.70966762E-09, -1.86716695E-12, -4.32665579E+03,
                      -3.90946846E+00])))

species(name="TS4_N2(S)", atoms="N:2", size=1.0,
        thermo=(NASA([300.0, 542.8571428571429],
                     [-3.71745094E+00,  4.78281768E-02, -1.15188567E-04,
                       1.34429016E-07, -6.20044384E-11, -2.25482568E+03,
                       1.29604008E+01]),
                NASA([542.8571428571429, 1000.0], 
                     [ 9.06288002E-01,  1.38764582E-02, -1.99273178E-05,
                       1.35458084E-08, -3.58129564E-12, -2.76838492E+03,
                      -6.58236000E+00])))

species(name="RU(S)", atoms="Ru:1", size=1.0,
        thermo=(NASA([300.0, 657.1428571428571],
                     [ 0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00]),
                NASA([657.1428571428571, 1000.0], 
                     [ 0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00])))

species(name="RU(B)", atoms="Ru:1", size=1.0,
        thermo=(NASA([300.0, 657.1428571428571],
                     [ 0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00]),
                NASA([657.1428571428571, 1000.0], 
                     [ 0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00,  0.00000000E+00,  0.00000000E+00,
                       0.00000000E+00])))

species(name="Ar", atoms="Ar:1",
        thermo=Shomate([298.0, 6000.0],
                       [ 2.07860000E+01,  2.82591100E-07, -1.46419100E-07,
                         1.09213100E-08, -3.66137100E-08, -6.19735000E+00,
                         1.79999000E+02]))

#-------------------------------------------------------------------------------
# LATERAL INTERACTIONS
#-------------------------------------------------------------------------------
lateral_interaction("N(T) N(T)",
                    coverage_thresholds=[0, 1],
                    strengths=[-52.6],
                    id="i_0000")
lateral_interaction("N(T) H(T)",
                    coverage_thresholds=[0, 1],
                    strengths=[-17.7],
                    id="i_0001")
lateral_interaction("H(T) N(T)",
                    coverage_thresholds=[0, 1],
                    strengths=[-17.7],
                    id="i_0002")
lateral_interaction("H(T) H(T)",
                    coverage_thresholds=[0, 1],
                    strengths=[-3.0000000000000004],
                    id="i_0003")
lateral_interaction("NH2(T) N(T)",
                    coverage_thresholds=[0, 1],
                    strengths=[-20.7],
                    id="i_0004")
lateral_interaction("N(S) N(S)",
                    coverage_thresholds=[0, 1],
                    strengths=[-52.6],
                    id="i_0005")
lateral_interaction("N(S) H(S)",
                    coverage_thresholds=[0, 1],
                    strengths=[-17.7],
                    id="i_0006")
lateral_interaction("H(S) N(S)",
                    coverage_thresholds=[0, 1],
                    strengths=[-17.7],
                    id="i_0007")
lateral_interaction("H(S) H(S)",
                    coverage_thresholds=[0, 1],
                    strengths=[-3.0000000000000004],
                    id="i_0008")
lateral_interaction("NH2(S) N(S)",
                    coverage_thresholds=[0, 1],
                    strengths=[-20.7],
                    id="i_0009")

#-------------------------------------------------------------------------------
# REACTION OPTIONS
#-------------------------------------------------------------------------------
enable_motz_wise()


#-------------------------------------------------------------------------------
# REACTIONS
#-------------------------------------------------------------------------------
surface_reaction("H2 + 2 RU(T) <=> 2 H(T) + 2 RU(B)",
                 stick( 5.00000e-01, 0,  1.00000e+00),
                 id="r_0000")
surface_reaction("N2 + RU(T) <=> N2(T) + RU(B)",
                 stick( 5.00000e-01, 0,  1.00000e+00),
                 id="r_0001")
surface_reaction("NH3 + RU(T) <=> NH3(T) + RU(B)",
                 stick( 5.00000e-01, 0,  1.00000e+00),
                 id="r_0002")
surface_reaction("NH3(T) + RU(T) <=> NH2(T) + H(T) + RU(B)",
                 [ 9.60000e+17, 1,  1.42000e+01],
                 id="r_0003")
surface_reaction("NH2(T) + RU(T) <=> NH(T) + H(T) + RU(B)",
                 [ 4.80749e+18, 1,  1.00000e+00],
                 id="r_0004")
surface_reaction("NH(T) + RU(T) <=> N(T) + H(T) + RU(B)",
                 [ 4.80749e+18, 1,  1.00000e+00],
                 id="r_0005")
surface_reaction("2 N(T) + RU(B) <=> N2(T) + RU(T)",
                 [ 4.80749e+18, 1,  1.00000e+00],
                 id="r_0006")
surface_reaction("H2 + 2 RU(S) <=> 2 H(S) + 2 RU(B)",
                 stick( 5.00000e-01, 0,  1.00000e+00),
                 id="r_0007")
surface_reaction("N2 + RU(S) <=> N2(S) + RU(B)",
                 stick( 5.00000e-01, 0,  1.00000e+00),
                 id="r_0008")
surface_reaction("NH3 + RU(S) <=> NH3(S) + RU(B)",
                 stick( 5.00000e-01, 0,  1.00000e+00),
                 id="r_0009")
surface_reaction("NH3(S) + RU(S) <=> NH2(S) + H(S) + RU(B)",
                 [ 2.34726e+19, 1,  1.00000e+00],
                 id="r_0010")
surface_reaction("NH2(S) + RU(S) <=> NH(S) + H(S) + RU(B)",
                 [ 2.34726e+19, 1,  1.00000e+00],
                 id="r_0011")
surface_reaction("N(S) + H(S) + RU(B) <=> NH(S) + RU(S)",
                 [ 2.34726e+19, 1,  1.00000e+00],
                 id="r_0012")
surface_reaction("2 N(S) + RU(B) <=> N2(S) + RU(S)",
                 [ 2.34726e+19, 1,  1.00000e+00],
                 id="r_0013")

#-------------------------------------------------------------------------------
# BEP Relationships
#-------------------------------------------------------------------------------
bep(id="NH-H",
    slope=0.52,
    intercept=19.78,
    direction="cleavage",
    cleavage_reactions=["r_0004", "r_0011"],
    synthesis_reactions=[])

bep(id="N-H",
    slope=0.29,
    intercept=23.23,
    direction="cleavage",
    cleavage_reactions=["r_0005"],
    synthesis_reactions=["r_0012"])

bep(id="NH2-H",
    slope=0.71,
    intercept=23.69,
    direction="cleavage",
    cleavage_reactions=["r_0010"],
    synthesis_reactions=[])