{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# OpenMKM Input and Output\n",
"This notebook describes pmutt's functionality to write OpenMKM CTI and YAML files. We will use the NH3 formation mechanism as a case study.\n",
"\n",
"## Topics Covered\n",
"- Read species *ab-initio* data, reactions, lateral interactions, phases, reactor operating conditions, and desired units from a spreadsheet\n",
"- Write the CTI file that can be read by OpenMKM\n",
"- Write a YAML file that can be read by OpenMKM"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Input Spreadsheet\n",
"All the data will be imported from the [`./inputs/NH3_Input_data.xlsx`](https://github.com/VlachosGroup/pMuTT/blob/master/docs/source/examples_jupyter/omkm_io/inputs/NH3_Input_Data.xlsx) file. There are several sheets:\n",
"\n",
"1. `units` contains the units that types of quantities should be written\n",
"2. `refs` contains *ab-initio* and experimental data for a handful of gas species to calculate references (optional)\n",
"3. `species` contains *ab-initio* data for each specie\n",
"4. `beps` contains Bronsted-Evans-Polanyi relationships for reactions (optional)\n",
"5. `reactions` contains elementary steps \n",
"6. `lateral_interactions` contains lateral interactions between species (optional)\n",
"7. `phases` contains phases for the species\n",
"8. `reactor` contains reactor operating conditions and solver tolerances\n",
"\n",
"The ``refs``, ``beps`` and ``lateral_interactions`` sheets can be deleted and the code written below should still work."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First, we change the working directory to the location of the Jupyter notebook."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"from pathlib import Path\n",
"\n",
"# Find the location of Jupyter notebook\n",
"# Note that normally Python scripts have a __file__ variable but Jupyter notebook doesn't.\n",
"# Using pathlib can overcome this limiation\n",
"try:\n",
" notebook_path = os.path.dirname(__file__)\n",
"except NameError:\n",
" notebook_path = Path().resolve()\n",
" \n",
"os.chdir(notebook_path)\n",
"input_path = './inputs/NH3_Input_Data.xlsx'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And we define a helper function to print data from the Excel spreadsheet easily."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"from IPython.display import display\n",
"\n",
"def disp_data(io, sheet_name):\n",
" try:\n",
" data = pd.read_excel(io=io, sheet_name=sheet_name, skiprows=[1])\n",
" except:\n",
" print('The {} sheet could not be found in {}.'.format(sheet_name, io))\n",
" else:\n",
" data = data.fillna(' ')\n",
" display(data)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Below, we show the contents of the Excel sheets."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Units**"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" length | \n",
" quantity | \n",
" act_energy | \n",
" mass | \n",
" energy | \n",
" pressure | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" cm | \n",
" mol | \n",
" kcal/mol | \n",
" g | \n",
" kcal | \n",
" atm | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" length quantity act_energy mass energy pressure\n",
"0 cm mol kcal/mol g kcal atm"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='units')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**References**"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" name | \n",
" elements.N | \n",
" elements.H | \n",
" elements.Ru | \n",
" T_ref | \n",
" HoRT_ref | \n",
" potentialenergy | \n",
" symmetrynumber | \n",
" statmech_model | \n",
" atoms | \n",
" vib_wavenumber | \n",
" vib_wavenumber.1 | \n",
" vib_wavenumber.2 | \n",
" vib_wavenumber.3 | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" N2 | \n",
" 2 | \n",
" 0 | \n",
" 0 | \n",
" 298.15 | \n",
" 0.000000 | \n",
" -16.63 | \n",
" 2 | \n",
" IdealGas | \n",
" ./N2/CONTCAR | \n",
" 2744 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" NH3 | \n",
" 1 | \n",
" 3 | \n",
" 0 | \n",
" 298.15 | \n",
" -18.380253 | \n",
" -19.54 | \n",
" 3 | \n",
" IdealGas | \n",
" ./NH3/CONTCAR | \n",
" 3534 | \n",
" 3464 | \n",
" 1765 | \n",
" 1139 | \n",
"
\n",
" \n",
" 2 | \n",
" H2 | \n",
" 0 | \n",
" 2 | \n",
" 0 | \n",
" 298.15 | \n",
" 0.000000 | \n",
" -6.77 | \n",
" 2 | \n",
" IdealGas | \n",
" ./H2/CONTCAR | \n",
" 4342 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" Ru | \n",
" 0 | \n",
" 0 | \n",
" 1 | \n",
" 298.15 | \n",
" 0.000000 | \n",
" | \n",
" | \n",
" Placeholder | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" name elements.N elements.H elements.Ru T_ref HoRT_ref \\\n",
"0 N2 2 0 0 298.15 0.000000 \n",
"1 NH3 1 3 0 298.15 -18.380253 \n",
"2 H2 0 2 0 298.15 0.000000 \n",
"3 Ru 0 0 1 298.15 0.000000 \n",
"\n",
" potentialenergy symmetrynumber statmech_model atoms vib_wavenumber \\\n",
"0 -16.63 2 IdealGas ./N2/CONTCAR 2744 \n",
"1 -19.54 3 IdealGas ./NH3/CONTCAR 3534 \n",
"2 -6.77 2 IdealGas ./H2/CONTCAR 4342 \n",
"3 Placeholder \n",
"\n",
" vib_wavenumber.1 vib_wavenumber.2 vib_wavenumber.3 \n",
"0 \n",
"1 3464 1765 1139 \n",
"2 \n",
"3 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='refs')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Species**\n",
"\n",
"In this mechanism, we have species existing on terraces and steps. We also define the transition states of species. \n",
"\n",
"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."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" name | \n",
" elements.N | \n",
" elements.H | \n",
" elements.Ru | \n",
" phase | \n",
" n_sites | \n",
" T_low | \n",
" T_high | \n",
" statmech_model | \n",
" symmetrynumber | \n",
" ... | \n",
" vib_wavenumber.2 | \n",
" vib_wavenumber.3 | \n",
" vib_wavenumber.4 | \n",
" vib_wavenumber.5 | \n",
" vib_wavenumber.6 | \n",
" vib_wavenumber.7 | \n",
" vib_wavenumber.8 | \n",
" vib_wavenumber.9 | \n",
" vib_wavenumber.10 | \n",
" vib_wavenumber.11 | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" N2 | \n",
" 2 | \n",
" | \n",
" | \n",
" gas | \n",
" | \n",
" 300 | \n",
" 1000 | \n",
" IdealGas | \n",
" 2 | \n",
" ... | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" NH3 | \n",
" 1 | \n",
" 3 | \n",
" | \n",
" gas | \n",
" | \n",
" 300 | \n",
" 1000 | \n",
" IdealGas | \n",
" 3 | \n",
" ... | \n",
" 1765 | \n",
" 1139 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" H2 | \n",
" | \n",
" 2 | \n",
" | \n",
" gas | \n",
" | \n",
" 300 | \n",
" 1000 | \n",
" IdealGas | \n",
" 2 | \n",
" ... | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" N2(T) | \n",
" 2 | \n",
" | \n",
" | \n",
" terrace | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 347.343 | \n",
" 335.674 | \n",
" 62.076 | \n",
" 32.1794 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" N(T) | \n",
" 1 | \n",
" | \n",
" | \n",
" terrace | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 504.323 | \n",
" 475.805 | \n",
" 459.081 | \n",
" 410.018 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 5 | \n",
" H(T) | \n",
" | \n",
" 1 | \n",
" | \n",
" terrace | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 616.29 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 6 | \n",
" NH3(T) | \n",
" 1 | \n",
" 3 | \n",
" | \n",
" terrace | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 3364.52 | \n",
" 1583.52 | \n",
" 1582.07 | \n",
" 1124.22 | \n",
" 570.212 | \n",
" 567.221 | \n",
" 333.09 | \n",
" 122.859 | \n",
" 83.8286 | \n",
" 70.6251 | \n",
"
\n",
" \n",
" 7 | \n",
" NH2(T) | \n",
" 1 | \n",
" 2 | \n",
" | \n",
" terrace | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 1503.02 | \n",
" 698.869 | \n",
" 625.596 | \n",
" 615.94 | \n",
" 475.13 | \n",
" 298.12 | \n",
" 153.25 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 8 | \n",
" NH(T) | \n",
" 1 | \n",
" 1 | \n",
" | \n",
" terrace | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 710.581 | \n",
" 528.526 | \n",
" 415.196 | \n",
" 410.131 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 9 | \n",
" TS1_NH3(T) | \n",
" 1 | \n",
" 3 | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 1723.85 | \n",
" 1487.95 | \n",
" 959.151 | \n",
" 888.946 | \n",
" 594.089 | \n",
" 428.431 | \n",
" 227.032 | \n",
" 206.047 | \n",
" 142.136 | \n",
" | \n",
"
\n",
" \n",
" 10 | \n",
" TS2_NH2(T) | \n",
" 1 | \n",
" 2 | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 922.831 | \n",
" 660.967 | \n",
" 525.595 | \n",
" 496.837 | \n",
" 330.674 | \n",
" 290.278 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 11 | \n",
" TS3_NH(T) | \n",
" 1 | \n",
" 1 | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 462.016 | \n",
" 402.159 | \n",
" 242.139 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 12 | \n",
" TS4_N2(T) | \n",
" 2 | \n",
" | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 386.186 | \n",
" 280.943 | \n",
" 168.431 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 13 | \n",
" RU(T) | \n",
" | \n",
" | \n",
" 1 | \n",
" terrace | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Placeholder | \n",
" | \n",
" ... | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 14 | \n",
" N2(S) | \n",
" 2 | \n",
" | \n",
" | \n",
" step | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 408.127 | \n",
" 378.517 | \n",
" 344.871 | \n",
" 334.622 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 15 | \n",
" N(S) | \n",
" 1 | \n",
" | \n",
" | \n",
" step | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 471.098 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 16 | \n",
" H(S) | \n",
" | \n",
" 1 | \n",
" | \n",
" step | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 616.29 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 17 | \n",
" NH3(S) | \n",
" 1 | \n",
" 3 | \n",
" | \n",
" step | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 3362.81 | \n",
" 1590.91 | \n",
" 1579.27 | \n",
" 1140.76 | \n",
" 564.975 | \n",
" 555.5 | \n",
" 336.1 | \n",
" 117.162 | \n",
" 86.7744 | \n",
" 78.1001 | \n",
"
\n",
" \n",
" 18 | \n",
" NH2(S) | \n",
" 1 | \n",
" 2 | \n",
" | \n",
" step | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 1477.16 | \n",
" 720.076 | \n",
" 615.666 | \n",
" 581.967 | \n",
" 468.853 | \n",
" 286.37 | \n",
" 105.957 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 19 | \n",
" NH(S) | \n",
" 1 | \n",
" 1 | \n",
" | \n",
" step | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 669.429 | \n",
" 506.278 | \n",
" 409.502 | \n",
" 387.808 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 20 | \n",
" TS1_NH3(S) | \n",
" 1 | \n",
" 3 | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 1685.83 | \n",
" 1481 | \n",
" 1002.07 | \n",
" 916.147 | \n",
" 575.405 | \n",
" 431.307 | \n",
" 345.149 | \n",
" 221.65 | \n",
" 70.3397 | \n",
" | \n",
"
\n",
" \n",
" 21 | \n",
" TS2_NH2(S) | \n",
" 1 | \n",
" 2 | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 1032.19 | \n",
" 583.479 | \n",
" 392.837 | \n",
" 384.834 | \n",
" 311.601 | \n",
" 110.969 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 22 | \n",
" TS3_NH(S) | \n",
" 1 | \n",
" 1 | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 489.065 | \n",
" 443.451 | \n",
" 396.193 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 23 | \n",
" TS4_N2(S) | \n",
" 2 | \n",
" | \n",
" | \n",
" | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Harmonic | \n",
" | \n",
" ... | \n",
" 436.166 | \n",
" 418.367 | \n",
" 391.943 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 24 | \n",
" RU(S) | \n",
" | \n",
" | \n",
" 1 | \n",
" step | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Placeholder | \n",
" | \n",
" ... | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 25 | \n",
" RU(B) | \n",
" | \n",
" | \n",
" 1 | \n",
" bulk | \n",
" 1 | \n",
" 300 | \n",
" 1000 | \n",
" Placeholder | \n",
" | \n",
" ... | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
26 rows × 24 columns
\n",
"
"
],
"text/plain": [
" name elements.N elements.H elements.Ru phase n_sites T_low \\\n",
"0 N2 2 gas 300 \n",
"1 NH3 1 3 gas 300 \n",
"2 H2 2 gas 300 \n",
"3 N2(T) 2 terrace 1 300 \n",
"4 N(T) 1 terrace 1 300 \n",
"5 H(T) 1 terrace 1 300 \n",
"6 NH3(T) 1 3 terrace 1 300 \n",
"7 NH2(T) 1 2 terrace 1 300 \n",
"8 NH(T) 1 1 terrace 1 300 \n",
"9 TS1_NH3(T) 1 3 1 300 \n",
"10 TS2_NH2(T) 1 2 1 300 \n",
"11 TS3_NH(T) 1 1 1 300 \n",
"12 TS4_N2(T) 2 1 300 \n",
"13 RU(T) 1 terrace 1 300 \n",
"14 N2(S) 2 step 1 300 \n",
"15 N(S) 1 step 1 300 \n",
"16 H(S) 1 step 1 300 \n",
"17 NH3(S) 1 3 step 1 300 \n",
"18 NH2(S) 1 2 step 1 300 \n",
"19 NH(S) 1 1 step 1 300 \n",
"20 TS1_NH3(S) 1 3 1 300 \n",
"21 TS2_NH2(S) 1 2 1 300 \n",
"22 TS3_NH(S) 1 1 1 300 \n",
"23 TS4_N2(S) 2 1 300 \n",
"24 RU(S) 1 step 1 300 \n",
"25 RU(B) 1 bulk 1 300 \n",
"\n",
" T_high statmech_model symmetrynumber ... vib_wavenumber.2 \\\n",
"0 1000 IdealGas 2 ... \n",
"1 1000 IdealGas 3 ... 1765 \n",
"2 1000 IdealGas 2 ... \n",
"3 1000 Harmonic ... 347.343 \n",
"4 1000 Harmonic ... 504.323 \n",
"5 1000 Harmonic ... 616.29 \n",
"6 1000 Harmonic ... 3364.52 \n",
"7 1000 Harmonic ... 1503.02 \n",
"8 1000 Harmonic ... 710.581 \n",
"9 1000 Harmonic ... 1723.85 \n",
"10 1000 Harmonic ... 922.831 \n",
"11 1000 Harmonic ... 462.016 \n",
"12 1000 Harmonic ... 386.186 \n",
"13 1000 Placeholder ... \n",
"14 1000 Harmonic ... 408.127 \n",
"15 1000 Harmonic ... 471.098 \n",
"16 1000 Harmonic ... 616.29 \n",
"17 1000 Harmonic ... 3362.81 \n",
"18 1000 Harmonic ... 1477.16 \n",
"19 1000 Harmonic ... 669.429 \n",
"20 1000 Harmonic ... 1685.83 \n",
"21 1000 Harmonic ... 1032.19 \n",
"22 1000 Harmonic ... 489.065 \n",
"23 1000 Harmonic ... 436.166 \n",
"24 1000 Placeholder ... \n",
"25 1000 Placeholder ... \n",
"\n",
" vib_wavenumber.3 vib_wavenumber.4 vib_wavenumber.5 vib_wavenumber.6 \\\n",
"0 \n",
"1 1139 \n",
"2 \n",
"3 335.674 62.076 32.1794 \n",
"4 475.805 459.081 410.018 \n",
"5 \n",
"6 1583.52 1582.07 1124.22 570.212 \n",
"7 698.869 625.596 615.94 475.13 \n",
"8 528.526 415.196 410.131 \n",
"9 1487.95 959.151 888.946 594.089 \n",
"10 660.967 525.595 496.837 330.674 \n",
"11 402.159 242.139 \n",
"12 280.943 168.431 \n",
"13 \n",
"14 378.517 344.871 334.622 \n",
"15 \n",
"16 \n",
"17 1590.91 1579.27 1140.76 564.975 \n",
"18 720.076 615.666 581.967 468.853 \n",
"19 506.278 409.502 387.808 \n",
"20 1481 1002.07 916.147 575.405 \n",
"21 583.479 392.837 384.834 311.601 \n",
"22 443.451 396.193 \n",
"23 418.367 391.943 \n",
"24 \n",
"25 \n",
"\n",
" vib_wavenumber.7 vib_wavenumber.8 vib_wavenumber.9 vib_wavenumber.10 \\\n",
"0 \n",
"1 \n",
"2 \n",
"3 \n",
"4 \n",
"5 \n",
"6 567.221 333.09 122.859 83.8286 \n",
"7 298.12 153.25 \n",
"8 \n",
"9 428.431 227.032 206.047 142.136 \n",
"10 290.278 \n",
"11 \n",
"12 \n",
"13 \n",
"14 \n",
"15 \n",
"16 \n",
"17 555.5 336.1 117.162 86.7744 \n",
"18 286.37 105.957 \n",
"19 \n",
"20 431.307 345.149 221.65 70.3397 \n",
"21 110.969 \n",
"22 \n",
"23 \n",
"24 \n",
"25 \n",
"\n",
" vib_wavenumber.11 \n",
"0 \n",
"1 \n",
"2 \n",
"3 \n",
"4 \n",
"5 \n",
"6 70.6251 \n",
"7 \n",
"8 \n",
"9 \n",
"10 \n",
"11 \n",
"12 \n",
"13 \n",
"14 \n",
"15 \n",
"16 \n",
"17 78.1001 \n",
"18 \n",
"19 \n",
"20 \n",
"21 \n",
"22 \n",
"23 \n",
"24 \n",
"25 \n",
"\n",
"[26 rows x 24 columns]"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='species')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**BEPs**"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" name | \n",
" slope | \n",
" intercept | \n",
" direction | \n",
" notes | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" N-H | \n",
" 0.29 | \n",
" 23.23 | \n",
" cleavage | \n",
" Values taken from https://github.com/VlachosGr... | \n",
"
\n",
" \n",
" 1 | \n",
" NH-H | \n",
" 0.52 | \n",
" 19.78 | \n",
" cleavage | \n",
" Values taken from https://github.com/VlachosGr... | \n",
"
\n",
" \n",
" 2 | \n",
" NH2-H | \n",
" 0.71 | \n",
" 23.69 | \n",
" cleavage | \n",
" Values taken from https://github.com/VlachosGr... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" name slope intercept direction \\\n",
"0 N-H 0.29 23.23 cleavage \n",
"1 NH-H 0.52 19.78 cleavage \n",
"2 NH2-H 0.71 23.69 cleavage \n",
"\n",
" notes \n",
"0 Values taken from https://github.com/VlachosGr... \n",
"1 Values taken from https://github.com/VlachosGr... \n",
"2 Values taken from https://github.com/VlachosGr... "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='beps')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Reactions**\n",
"\n",
"Note that reactions with two '=' signs indicate it has a transition state or BEP relationship."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" reaction_str | \n",
" is_adsorption | \n",
" direction | \n",
" beta | \n",
" A | \n",
" Ea | \n",
" notes | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" H2 + 2RU(T) = 2H(T) + 2RU(B) | \n",
" True | \n",
" | \n",
" 0 | \n",
" | \n",
" | \n",
" Adsorption reactions typically use beta = 0 | \n",
"
\n",
" \n",
" 1 | \n",
" N2 + RU(T) = N2(T) + RU(B) | \n",
" True | \n",
" | \n",
" 0 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" NH3 + RU(T) = NH3(T) + RU(B) | \n",
" True | \n",
" | \n",
" 0 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" NH3(T) + RU(T) = NH2(T) + H(T) + RU(B) | \n",
" False | \n",
" | \n",
" 1 | \n",
" 9.6e+17 | \n",
" 14.2 | \n",
" Pre-exponential and activation energy set manu... | \n",
"
\n",
" \n",
" 4 | \n",
" NH2(T) + RU(T) = NH-H = NH(T) + H(T) + RU(B) | \n",
" False | \n",
" cleavage | \n",
" 1 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 5 | \n",
" NH(T) + RU(T) = N-H = N(T) + H(T) + RU(B) | \n",
" False | \n",
" cleavage | \n",
" 1 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 6 | \n",
" 2N(T) + RU(B) = TS4_N2(T) = N2(T) + RU(T) | \n",
" False | \n",
" | \n",
" 1 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 7 | \n",
" H2 + 2RU(S) = 2H(S) + 2RU(B) | \n",
" True | \n",
" | \n",
" 0 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 8 | \n",
" N2 + RU(S) = N2(S) + RU(B) | \n",
" True | \n",
" | \n",
" 0 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 9 | \n",
" NH3 + RU(S) = NH3(S) + RU(B) | \n",
" True | \n",
" | \n",
" 0 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 10 | \n",
" NH3(S) + RU(S)= NH2-H = NH2(S) + H(S) + RU(B) | \n",
" False | \n",
" cleavage | \n",
" 1 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 11 | \n",
" NH2(S) + RU(S) = NH-H = NH(S) + H(S) + RU(B) | \n",
" False | \n",
" cleavage | \n",
" 1 | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" 12 | \n",
" N(S) + H(S) + RU(B) = N-H = NH(S) + RU(S) | \n",
" False | \n",
" synthesis | \n",
" 1 | \n",
" | \n",
" | \n",
" Written in the synthesis direction (bonds are ... | \n",
"
\n",
" \n",
" 13 | \n",
" 2N(S) + RU(B) = TS4_N2(S) = N2(S) + RU(S) | \n",
" False | \n",
" | \n",
" 1 | \n",
" | \n",
" | \n",
" Transition state used instead of BEP | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" reaction_str is_adsorption direction \\\n",
"0 H2 + 2RU(T) = 2H(T) + 2RU(B) True \n",
"1 N2 + RU(T) = N2(T) + RU(B) True \n",
"2 NH3 + RU(T) = NH3(T) + RU(B) True \n",
"3 NH3(T) + RU(T) = NH2(T) + H(T) + RU(B) False \n",
"4 NH2(T) + RU(T) = NH-H = NH(T) + H(T) + RU(B) False cleavage \n",
"5 NH(T) + RU(T) = N-H = N(T) + H(T) + RU(B) False cleavage \n",
"6 2N(T) + RU(B) = TS4_N2(T) = N2(T) + RU(T) False \n",
"7 H2 + 2RU(S) = 2H(S) + 2RU(B) True \n",
"8 N2 + RU(S) = N2(S) + RU(B) True \n",
"9 NH3 + RU(S) = NH3(S) + RU(B) True \n",
"10 NH3(S) + RU(S)= NH2-H = NH2(S) + H(S) + RU(B) False cleavage \n",
"11 NH2(S) + RU(S) = NH-H = NH(S) + H(S) + RU(B) False cleavage \n",
"12 N(S) + H(S) + RU(B) = N-H = NH(S) + RU(S) False synthesis \n",
"13 2N(S) + RU(B) = TS4_N2(S) = N2(S) + RU(S) False \n",
"\n",
" beta A Ea notes \n",
"0 0 Adsorption reactions typically use beta = 0 \n",
"1 0 \n",
"2 0 \n",
"3 1 9.6e+17 14.2 Pre-exponential and activation energy set manu... \n",
"4 1 \n",
"5 1 \n",
"6 1 \n",
"7 0 \n",
"8 0 \n",
"9 0 \n",
"10 1 \n",
"11 1 \n",
"12 1 Written in the synthesis direction (bonds are ... \n",
"13 1 Transition state used instead of BEP "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='reactions')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Lateral Interactions**\n",
"\n",
"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."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" name_i | \n",
" name_j | \n",
" list.intervals | \n",
" list.slopes | \n",
" list.intervals.1 | \n",
" notes | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" N(T) | \n",
" N(T) | \n",
" 0 | \n",
" -52.6 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" N(T) | \n",
" H(T) | \n",
" 0 | \n",
" -17.7 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 2 | \n",
" H(T) | \n",
" N(T) | \n",
" 0 | \n",
" -17.7 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 3 | \n",
" H(T) | \n",
" H(T) | \n",
" 0 | \n",
" -3.0 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 4 | \n",
" NH2(T) | \n",
" N(T) | \n",
" 0 | \n",
" -20.7 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 5 | \n",
" N(S) | \n",
" N(S) | \n",
" 0 | \n",
" -52.6 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 6 | \n",
" N(S) | \n",
" H(S) | \n",
" 0 | \n",
" -17.7 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 7 | \n",
" H(S) | \n",
" N(S) | \n",
" 0 | \n",
" -17.7 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 8 | \n",
" H(S) | \n",
" H(S) | \n",
" 0 | \n",
" -3.0 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 9 | \n",
" NH2(S) | \n",
" N(S) | \n",
" 0 | \n",
" -20.7 | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" name_i name_j list.intervals list.slopes list.intervals.1 notes\n",
"0 N(T) N(T) 0 -52.6 1 \n",
"1 N(T) H(T) 0 -17.7 1 \n",
"2 H(T) N(T) 0 -17.7 1 \n",
"3 H(T) H(T) 0 -3.0 1 \n",
"4 NH2(T) N(T) 0 -20.7 1 \n",
"5 N(S) N(S) 0 -52.6 1 \n",
"6 N(S) H(S) 0 -17.7 1 \n",
"7 H(S) N(S) 0 -17.7 1 \n",
"8 H(S) H(S) 0 -3.0 1 \n",
"9 NH2(S) N(S) 0 -20.7 1 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='lateral_interactions')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Phases**\n",
"\n",
"As previously stated, there are two surface sites: terrace and step. There are also the gas and bulk phases defined."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" name | \n",
" phase_type | \n",
" density | \n",
" site_density | \n",
" list.phases | \n",
" list.phases.1 | \n",
" dict.initial_state.RU(T) | \n",
" dict.initial_state.RU(S) | \n",
" dict.initial_state.NH3 | \n",
" note | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" gas | \n",
" IdealGas | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" 1 | \n",
" | \n",
"
\n",
" \n",
" 1 | \n",
" bulk | \n",
" StoichSolid | \n",
" 12.4 | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" Ru Metal | \n",
"
\n",
" \n",
" 2 | \n",
" terrace | \n",
" InteractingInterface | \n",
" | \n",
" 2.1671e-09 | \n",
" gas | \n",
" bulk | \n",
" 1 | \n",
" | \n",
" | \n",
" Ru(0001) | \n",
"
\n",
" \n",
" 3 | \n",
" step | \n",
" InteractingInterface | \n",
" | \n",
" 4.4385e-10 | \n",
" gas | \n",
" bulk | \n",
" | \n",
" 1 | \n",
" | \n",
" Ru(0001) with atoms deleted | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" name phase_type density site_density list.phases \\\n",
"0 gas IdealGas \n",
"1 bulk StoichSolid 12.4 \n",
"2 terrace InteractingInterface 2.1671e-09 gas \n",
"3 step InteractingInterface 4.4385e-10 gas \n",
"\n",
" list.phases.1 dict.initial_state.RU(T) dict.initial_state.RU(S) \\\n",
"0 \n",
"1 \n",
"2 bulk 1 \n",
"3 bulk 1 \n",
"\n",
" dict.initial_state.NH3 note \n",
"0 1 \n",
"1 Ru Metal \n",
"2 Ru(0001) \n",
"3 Ru(0001) with atoms deleted "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='phases')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Reactor**\n",
"\n",
"The reactor sheet contains options for the YAML file."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" reactor_type | \n",
" mode | \n",
" V | \n",
" T | \n",
" P | \n",
" cat_abyv | \n",
" end_time | \n",
" flow_rate | \n",
" transient | \n",
" stepping | \n",
" init_step | \n",
" atol | \n",
" rtol | \n",
" output_format | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" cstr | \n",
" isothermal | \n",
" 1 | \n",
" 900 | \n",
" 1 | \n",
" 1500 | \n",
" 50 | \n",
" 1 | \n",
" True | \n",
" logarithmic | \n",
" 1.000000e-15 | \n",
" 1.000000e-15 | \n",
" 1.000000e-10 | \n",
" csv | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" reactor_type mode V T P cat_abyv end_time flow_rate \\\n",
"0 cstr isothermal 1 900 1 1500 50 1 \n",
"\n",
" transient stepping init_step atol rtol \\\n",
"0 True logarithmic 1.000000e-15 1.000000e-15 1.000000e-10 \n",
"\n",
" output_format \n",
"0 csv "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"disp_data(io=input_path, sheet_name='reactor')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reading data\n",
"\n",
"Throughout this exercise, we will use [``pmutt.io.read_excel``](https://vlachosgroup.github.io/pMuTT/api/io/excel/pmutt.io.excel.read_excel.html#pmutt-io-excel-read-excel) to extract the data from the Excel spreadsheet."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Designate Units\n",
"First, we will designate the units to write the CTI and YAML file."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.io.excel import read_excel\n",
"from pmutt.omkm.units import Units\n",
"\n",
"units_data = read_excel(io=input_path, sheet_name='units')[0]\n",
"units = Units(**units_data)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Reading References (optional)\n",
"Second, we will open the input spreadsheet and read the `refs` sheet."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.empirical.references import Reference, References\n",
"\n",
"try:\n",
" refs_data = read_excel(io=input_path, sheet_name='refs')\n",
"except:\n",
" # If references are not used, skip this section\n",
" print('The \"refs\" sheet could not be found in {}. Skiping references'.format(input_path))\n",
" refs = None\n",
"else:\n",
" refs = [Reference(**ref_data) for ref_data in refs_data]\n",
" refs = References(references=refs)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Reading Species\n",
"\n",
"Third, we will use the ``refs`` defined before and the ``species`` sheet to convert statistical mechanical data to [``NASA``](https://vlachosgroup.github.io/pMuTT/api/empirical/nasa/pmutt.empirical.nasa.Nasa.html#pmutt.empirical.nasa.Nasa) objects."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.empirical.nasa import Nasa\n",
"\n",
"# Read the species' data\n",
"species_data = read_excel(io=input_path, sheet_name='species')\n",
"\n",
"# Create NASA polynomials from the species\n",
"species = [Nasa.from_model(references=refs, **ind_species_data) \\\n",
" for ind_species_data in species_data]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Adding species from other empirical sources (optional)\n",
"\n",
"Note that OpenMKM also supports [``Shomate``](https://vlachosgroup.github.io/pMuTT/api/empirical/shomate/pmutt.empirical.shomate.Shomate.html#pmutt.empirical.shomate.Shomate) and [``NASA9``](https://vlachosgroup.github.io/pMuTT/api/empirical/nasa/pmutt.empirical.nasa.Nasa9.html) objects. Below, we define a single ``Shomate`` species."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"from pmutt.empirical.shomate import Shomate\n",
"\n",
"Ar = Shomate(name='Ar', elements={'Ar': 1}, phase='gas', T_low=298., T_high=6000.,\n",
" a=np.array([20.78600, 2.825911e-7, -1.464191e-7, 1.092131e-8, -3.661371e-8, -6.19735, 179.999, 0.]))\n",
"\n",
"species.append(Ar)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Reading BEP (optional)\n",
"\n",
"Next, we read the BEP relationships to include."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.omkm.reaction import BEP\n",
"\n",
"try:\n",
" beps_data = read_excel(io=input_path, sheet_name='beps')\n",
"except:\n",
" print('The \"beps\" sheet could not be found in {}. Skiping BEPs'.format(input_path))\n",
" beps = None\n",
" species_with_beps = species.copy()\n",
"else:\n",
" beps = [BEP(**bep_data) for bep_data in beps_data]\n",
" species_with_beps = species + beps"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Read reactions\n",
"\n",
"Then, we read the reactions to include."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"from pmutt import pmutt_list_to_dict\n",
"from pmutt.omkm.reaction import SurfaceReaction\n",
"\n",
"# Convert species to dictionary for easier reaction assignment\n",
"species_with_beps_dict = pmutt_list_to_dict(species_with_beps)\n",
"\n",
"reactions_data = read_excel(io=input_path, sheet_name='reactions')\n",
"reactions = [SurfaceReaction.from_string(species=species_with_beps_dict, **reaction_data) \\\n",
" for reaction_data in reactions_data]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Read lateral interactions (optional)\n",
"\n",
"After, we read lateral interactions to include."
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.mixture.cov import PiecewiseCovEffect\n",
"\n",
"try:\n",
" interactions_data = read_excel(io=input_path, sheet_name='lateral_interactions')\n",
"except:\n",
" # If no lateral interactions exist, skip this section\n",
" print('The \"lateral_interactions\" sheet could not be found in {}. Skiping lateral interactions'.format(input_path))\n",
" interactions = None\n",
"else:\n",
" interactions = [PiecewiseCovEffect(**interaction_data) for interaction_data in interactions_data]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Reading Phases\n",
"\n",
"Finally, we read the phases data from Excel and organize it for use in OpenMKM."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.io.omkm import organize_phases\n",
"\n",
"# Read data from Excel sheet about phases\n",
"phases_data = read_excel(io=input_path, sheet_name='phases')\n",
"phases = organize_phases(phases_data, species=species, reactions=reactions, interactions=interactions)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Write Reactor YAML File\n",
"\n",
"The YAML file specifying the reactor configuration can be written using the [``write_yaml``](https://vlachosgroup.github.io/pMuTT/api/kinetic_models/omkm/pmutt.io.omkm.write_yaml.html) function. Note that if:\n",
"- ``units`` is not specified, float values are assumed to be in SI units\n",
"- ``units`` is specified, float values are consistent with ``unit``'s attributes\n",
"- you would like a quantity to have particular units, pass the value as a string with the units (e.g. \"10 cm3/s\")."
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.io.omkm import write_yaml\n",
"\n",
"Path('./outputs').mkdir(exist_ok=True)\n",
"yaml_path = './outputs/reactor.yaml'\n",
"reactor_data = read_excel(io=input_path, sheet_name='reactor')[0]\n",
"write_yaml(filename=yaml_path, phases=phases, units=units, **reactor_data)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If you would prefer to return the file as a string instead of writing it, omit the ``filename``."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"# File generated by pMuTT (v 1.2.21dev) on 2020-05-26 13:36:40.983379\n",
"# See documentation for OpenMKM YAML file here:\n",
"# https://vlachosgroup.github.io/openmkm/input\n",
"inlet_gas:\n",
" flow_rate: \"1 cm3/s\"\n",
"phases:\n",
" bulk:\n",
" name: bulk\n",
" gas:\n",
" initial_state: \"NH3:1.0\"\n",
" name: gas\n",
" surfaces:\n",
" - initial_state: \"RU(T):1.0\"\n",
" name: terrace\n",
" - initial_state: \"RU(S):1.0\"\n",
" name: step\n",
"reactor:\n",
" cat_abyv: \"1500 /cm\"\n",
" mode: \"isothermal\"\n",
" pressure: \"1 atm\"\n",
" temperature: 900\n",
" type: \"cstr\"\n",
" volume: \"1 cm3\"\n",
"simulation:\n",
" end_time: \"50 s\"\n",
" init_step: 1.0e-15\n",
" output_format: \"csv\"\n",
" solver:\n",
" atol: 1.0e-15\n",
" rtol: 1.0e-10\n",
" stepping: \"logarithmic\"\n",
" transient: true\n",
"\n"
]
}
],
"source": [
"print(write_yaml(phases=phases, units=units, **reactor_data))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Write Thermo/Kinetic YAML File\n",
"\n",
"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``](https://vlachosgroup.github.io/pMuTT/api/kinetic_models/omkm/pmutt.io.omkm.write_thermo_yaml.html) function"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.io.omkm import write_thermo_yaml\n",
"\n",
"write_thermo_yaml(phases=phases,\n",
" species=species,\n",
" reactions=reactions,\n",
" lateral_interactions=interactions,\n",
" units=units,\n",
" filename='./outputs/thermo.yaml')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Like before, omitting the ``filename`` parameter returns a string"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"# File generated by pMuTT (v 1.2.21dev) on 2020-05-26 13:36:41.107378\n",
"# See documentation for OpenMKM YAML file here:\n",
"# https://vlachosgroup.github.io/openmkm/input\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# UNITS\n",
"#-------------------------------------------------------------------------------\n",
"units: {mass: g, length: cm, time: s, quantity: mol, energy: kcal, activation-energy: kcal/mol,\n",
" pressure: atm}\n",
"\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# PHASES\n",
"#-------------------------------------------------------------------------------\n",
"phases:\n",
"\n",
"- name: gas\n",
" elements: [H, N, Ar]\n",
" species: [N2, NH3, H2, Ar]\n",
" thermo: ideal-gas\n",
" kinetics: gas\n",
" reactions: none\n",
"\n",
"- name: bulk\n",
" elements: [Ru]\n",
" species: [RU(B)]\n",
" thermo: fixed-stoichiometry\n",
"\n",
"- name: terrace\n",
" elements: [H, Ru, N]\n",
" species: [N2(T), N(T), H(T), NH3(T), NH2(T), NH(T), RU(T)]\n",
" kinetics: surface\n",
" site-density: \"2.1671e-09 mol/cm^2\"\n",
" thermo: surface-lateral-interaction\n",
" interactions: declared-species\n",
" reactions: declared-species\n",
" beps: all\n",
"\n",
"- name: step\n",
" elements: [H, Ru, N]\n",
" species: [N2(S), N(S), H(S), NH3(S), NH2(S), NH(S), RU(S)]\n",
" kinetics: surface\n",
" site-density: \"4.4385e-10 mol/cm^2\"\n",
" thermo: surface-lateral-interaction\n",
" interactions: declared-species\n",
" reactions: declared-species\n",
" beps: all\n",
"\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# SPECIES\n",
"#-------------------------------------------------------------------------------\n",
"species:\n",
"\n",
"- name: N2\n",
" composition: {N: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 642.8571428571429, 1000.0]\n",
" data:\n",
" - [3.3956319945669633, 0.001115707689025668, -4.301993779374381e-06, 6.8071424019295535e-09,\n",
" -3.2903312791047058e-12, -125.46629834547932, 3.5561107385882806]\n",
" - [4.050329990684662, -0.0029677854067980108, 5.323485005316287e-06, -3.3518122405333548e-09,\n",
" 7.58446718337381e-13, -210.11026414819972, 0.6858228492521796]\n",
"\n",
"- name: NH3\n",
" composition: {N: 1.0, H: 3.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 542.8571428571429, 1000.0]\n",
" data:\n",
" - [4.564972417951128, -0.006832837835873698, 2.685237031047407e-05, -3.40241692936106e-08,\n",
" 1.6003749874693446e-11, -8535.999717545712, -1.7583318962760188]\n",
" - [3.1609684331689687, 0.003362370389171136, -1.2142369921834615e-06, 6.829575286260319e-10,\n",
" -2.54434965826972e-13, -8379.626286586808, 4.185658791424039]\n",
"\n",
"- name: H2\n",
" composition: {H: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 614.2857142857142, 1000.0]\n",
" data:\n",
" - [3.5059704188335177, -7.325197849360956e-05, 3.371722587049024e-07, -6.912640387891159e-10,\n",
" 5.337189015741048e-13, 1687.3519365761772, -4.298852729497387]\n",
" - [3.3937013396919027, 0.0007194112421430606, -1.7531971899407386e-06, 1.7534933554342533e-09,\n",
" -5.375683345945896e-13, 1699.9908830788797, -3.821319983179503]\n",
"\n",
"- name: N2(T)\n",
" composition: {N: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 514.2857142857143, 1000.0]\n",
" data:\n",
" - [0.6394780241851414, 0.027666673612151815, -7.645720305897118e-05, 1.0176487948083283e-07,\n",
" -5.19823386998956e-11, -6830.2293384845825, -2.4373983302173254]\n",
" - [3.8547865818886304, 0.002451553391280693, -1.1229041254091556e-06, 2.836620170114086e-10,\n",
" -6.814515451765802e-14, -7163.7513951542915, -15.811301160783382]\n",
" sites: 1.0\n",
"\n",
"- name: N(T)\n",
" composition: {N: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 557.1428571428571, 1000.0]\n",
" data:\n",
" - [-4.894442791188698, 0.05767676205626723, -0.00013447158207005976, 1.5228759500727411e-07,\n",
" -6.828213240453864e-11, -10575.315555452235, 17.560620354866614]\n",
" - [0.6598464899392497, 0.017822907875229405, -2.524998562064707e-05, 1.6958113771951197e-08,\n",
" -4.435079126394282e-12, -11206.325808617066, -6.042105374266001]\n",
" sites: 1.0\n",
"\n",
"- name: H(T)\n",
" composition: {H: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 557.1428571428571, 1000.0]\n",
" data:\n",
" - [-1.8007958982617518, 0.014160885760779236, -1.4954871236615527e-05, 2.2220499972019704e-09,\n",
" 3.926688603133256e-12, -6100.896586017127, 7.139128866846124]\n",
" - [-1.4537007356856155, 0.01342293260935598, -1.768619079260206e-05, 1.1258775063528586e-08,\n",
" -2.826810620829653e-12, -6167.46227369115, 5.421303508464117]\n",
" sites: 1.0\n",
"\n",
"- name: NH3(T)\n",
" composition: {N: 1.0, H: 3.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 428.57142857142856, 1000.0]\n",
" data:\n",
" - [1.0185579992488374, 0.022246747959228638, -4.370286768090834e-05, 5.8576346934492585e-08,\n",
" -3.390825287953804e-11, -14214.003842753298, -4.229509556183071]\n",
" - [1.6390458061230475, 0.015436700793334042, -1.6405558855182064e-05, 1.0812691723221286e-08,\n",
" -2.9608944658451726e-12, -14257.421618513974, -6.585989385183915]\n",
" sites: 1.0\n",
"\n",
"- name: NH2(T)\n",
" composition: {N: 1.0, H: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 585.7142857142858, 1000.0]\n",
" data:\n",
" - [-2.4350528056129472, 0.03718137542886255, -7.252850561422588e-05, 7.309049530582159e-08,\n",
" -2.956669163752849e-11, -11755.772200257523, 8.409950246927902]\n",
" - [0.5916317349519948, 0.017127978582404026, -2.171396792761983e-05, 1.4726348155896754e-08,\n",
" -3.9534369576339804e-12, -12128.14822629148, -4.693752289444842]\n",
" sites: 1.0\n",
"\n",
"- name: NH(T)\n",
" composition: {N: 1.0, H: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 600.0, 1000.0]\n",
" data:\n",
" - [-3.6668879702880055, 0.03982782412521621, -8.187333299912497e-05, 8.249622398493288e-08,\n",
" -3.286921120308004e-11, -14625.719115846838, 13.504746495617308]\n",
" - [0.1063545642473668, 0.015271251197937114, -2.097761902407342e-05, 1.4305894047220088e-08,\n",
" -3.795820539846915e-12, -15096.755597474243, -2.891979430990201]\n",
" sites: 1.0\n",
"\n",
"- name: TS1_NH3(T)\n",
" composition: {N: 1.0, H: 3.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 671.4285714285714, 1000.0]\n",
" data:\n",
" - [0.16718331336897327, 0.020329980402827984, -2.2715789281313686e-05, 1.396055194227525e-08,\n",
" -3.4213689130260705e-12, -2513.6254986662357, -1.9177576265691592]\n",
" - [0.8082560769434938, 0.017161423429626208, -1.702221083696219e-05, 9.632653817050899e-09,\n",
" -2.291120234312056e-12, -2615.2571907445895, -4.867435690136908]\n",
" sites: 1.0\n",
"\n",
"- name: TS2_NH2(T)\n",
" composition: {N: 1.0, H: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 628.5714285714287, 1000.0]\n",
" data:\n",
" - [-2.546261486549267, 0.03396218372795058, -5.7241256896206506e-05, 4.946324722557642e-08,\n",
" -1.7352754696747937e-11, -5761.707019993226, 8.789590109046689]\n",
" - [-0.22939751786703408, 0.01988249700954183, -2.4697033965083446e-05, 1.5524372835872282e-08,\n",
" -3.874910992202475e-12, -6070.669161900978, -1.4344822148231904]\n",
" sites: 1.0\n",
"\n",
"- name: TS3_NH(T)\n",
" composition: {N: 1.0, H: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 542.8571428571429, 1000.0]\n",
" data:\n",
" - [-1.550325786832137, 0.02805684817769237, -5.9204464743939565e-05, 6.504664203240556e-08,\n",
" -2.9386333379569044e-11, -2390.0965456230283, 4.70877083989161]\n",
" - [0.4367750071098204, 0.013299204888604829, -1.7193813868789944e-05, 1.0835991303856117e-08,\n",
" -2.708299561097233e-12, -2609.1249431827414, -3.67094272865846]\n",
" sites: 1.0\n",
"\n",
"- name: TS4_N2(T)\n",
" composition: {N: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 528.5714285714286, 1000.0]\n",
" data:\n",
" - [-1.426183002268343, 0.03779383005618639, -9.641467810794512e-05, 1.1818753814714894e-07,\n",
" -5.691779297044529e-11, 21872.62618453775, 3.575019075410285]\n",
" - [2.3243108861892066, 0.009282795711236863, -1.3583554649130437e-05, 9.380823346458842e-09,\n",
" -2.514205017827287e-12, 21470.007200863885, -12.147719162849816]\n",
" sites: 1.0\n",
"\n",
"- name: RU(T)\n",
" composition: {Ru: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 657.1428571428571, 1000.0]\n",
" data:\n",
" - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n",
" - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n",
" sites: 1.0\n",
"\n",
"- name: N2(S)\n",
" composition: {N: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 542.8571428571429, 1000.0]\n",
" data:\n",
" - [-2.336635474195216, 0.04016613994195943, -8.992000355655354e-05, 1.0092848132559232e-07,\n",
" -4.5662308327121564e-11, -8756.455534491419, 7.186675872937272]\n",
" - [1.0040300585138415, 0.015732755750113465, -2.1500687407393788e-05, 1.4112695947173559e-08,\n",
" -3.636536147416892e-12, -9129.659453153845, -6.949447166751186]\n",
" sites: 1.0\n",
"\n",
"- name: N(S)\n",
" composition: {N: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 557.1428571428571, 1000.0]\n",
" data:\n",
" - [-2.5849874550678793, 0.029310942630531245, -6.782768990938232e-05, 7.632524955387304e-08,\n",
" -3.4036812652150437e-11, -12299.815547573347, 9.385302365886137]\n",
" - [0.21812681852373034, 0.009273511067135979, -1.312694685067916e-05, 8.810761240318494e-09,\n",
" -2.303213566137411e-12, -12619.403961000628, -2.536741481084843]\n",
" sites: 1.0\n",
"\n",
"- name: H(S)\n",
" composition: {H: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 557.1428571428571, 1000.0]\n",
" data:\n",
" - [-1.8007958982617518, 0.014160885760779236, -1.4954871236615527e-05, 2.2220499972019704e-09,\n",
" 3.926688603133256e-12, -6100.896586017127, 7.139128866846124]\n",
" - [-1.4537007356856155, 0.01342293260935598, -1.768619079260206e-05, 1.1258775063528586e-08,\n",
" -2.826810620829653e-12, -6167.46227369115, 5.421303508464117]\n",
" sites: 1.0\n",
"\n",
"- name: NH3(S)\n",
" composition: {N: 1.0, H: 3.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 428.57142857142856, 1000.0]\n",
" data:\n",
" - [0.9760733268553489, 0.022999709118353844, -4.7144112328422e-05, 6.472018916855692e-08,\n",
" -3.782202572778842e-11, -17118.32767533135, -4.184145930004325]\n",
" - [1.7092437442450366, 0.015087729719952463, -1.5806512580778123e-05, 1.0365926782894892e-08,\n",
" -2.836019677839079e-12, -17170.94688188792, -6.983454889647479]\n",
" sites: 1.0\n",
"\n",
"- name: NH2(S)\n",
" composition: {N: 1.0, H: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 585.7142857142858, 1000.0]\n",
" data:\n",
" - [-2.134846314598767, 0.0356104434442669, -6.865945297445601e-05, 6.851219024341386e-08,\n",
" -2.7484251930293086e-11, -18304.90031293902, 7.45851008596866]\n",
" - [0.6884294740228686, 0.016982660476984567, -2.1646009999282705e-05, 1.4711831653840717e-08,\n",
" -3.949644232635474e-12, -18653.702884329432, -4.7764176851404985]\n",
" sites: 1.0\n",
"\n",
"- name: NH(S)\n",
" composition: {N: 1.0, H: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 585.7142857142858, 1000.0]\n",
" data:\n",
" - [-3.5857677200628846, 0.04041824721931891, -8.509525219329148e-05, 8.779477895906484e-08,\n",
" -3.583003048080367e-11, -13551.74351821945, 13.067654186793725]\n",
" - [0.23250847831381585, 0.015084052551408086, -2.0991627837752818e-05, 1.4486313872448512e-08,\n",
" -3.883624257502453e-12, -14019.642354896643, -3.4525644759344543]\n",
" sites: 1.0\n",
"\n",
"- name: TS1_NH3(S)\n",
" composition: {N: 1.0, H: 3.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 671.4285714285714, 1000.0]\n",
" data:\n",
" - [-0.03735258850223981, 0.020505391121308416, -2.185776716209172e-05, 1.2280357404965904e-08,\n",
" -2.5657560572043993e-12, -8998.774514615734, -0.570339124004084]\n",
" - [0.4553691668625345, 0.018313094306811304, -1.857144398084139e-05, 1.058848387303736e-08,\n",
" -2.5170427368793067e-12, -9082.387822169567, -2.878229360902699]\n",
" sites: 1.0\n",
"\n",
"- name: TS2_NH2(S)\n",
" composition: {N: 1.0, H: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 542.8571428571429, 1000.0]\n",
" data:\n",
" - [-1.036866383972045, 0.030592277521829653, -6.425523050987311e-05, 7.269128834796514e-08,\n",
" -3.348352008358944e-11, -5225.80553219122, 2.680487289862805]\n",
" - [1.2611609333482254, 0.013462908222612677, -1.538915061763511e-05, 9.593374111601978e-09,\n",
" -2.4515771294165935e-12, -5477.825448566679, -7.0003108016223585]\n",
" sites: 1.0\n",
"\n",
"- name: TS3_NH(S)\n",
" composition: {N: 1.0, H: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 514.2857142857143, 1000.0]\n",
" data:\n",
" - [-2.970965179922778, 0.03842249321850175, -9.527920060365471e-05, 1.1969265561516276e-07,\n",
" -5.970204310561188e-11, -3974.1786968486535, 10.33999247498289]\n",
" - [0.46394757698187555, 0.01118458452963758, -1.3006822073078597e-05, 7.709667616269628e-09,\n",
" -1.8671669511641015e-12, -4326.655786033964, -3.9094684579463275]\n",
" sites: 1.0\n",
"\n",
"- name: TS4_N2(S)\n",
" composition: {N: 2.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 542.8571428571429, 1000.0]\n",
" data:\n",
" - [-3.7174509392891895, 0.04782817681469442, -0.000115188567018151, 1.3442901586870685e-07,\n",
" -6.200443837365281e-11, -2254.8256799453657, 12.960400788703833]\n",
" - [0.9062880021971168, 0.013876458238608324, -1.9927317752312164e-05, 1.354580842449189e-08,\n",
" -3.5812956409457856e-12, -2768.384920969638, -6.582359999458994]\n",
" sites: 1.0\n",
"\n",
"- name: RU(S)\n",
" composition: {Ru: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 657.1428571428571, 1000.0]\n",
" data:\n",
" - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n",
" - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n",
" sites: 1.0\n",
"\n",
"- name: RU(B)\n",
" composition: {Ru: 1.0}\n",
" thermo:\n",
" model: NASA7\n",
" temperature-ranges: [300.0, 657.1428571428571, 1000.0]\n",
" data:\n",
" - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n",
" - [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]\n",
" sites: 1.0\n",
"\n",
"- name: Ar\n",
" composition: {Ar: 1}\n",
" thermo:\n",
" model: Shomate\n",
" temperature-ranges: [298.0, 6000.0]\n",
" data:\n",
" - [20.786, 2.825911e-07, -1.464191e-07, 1.092131e-08, -3.661371e-08, -6.19735,\n",
" 179.999]\n",
"\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# REACTIONS\n",
"#-------------------------------------------------------------------------------\n",
"reactions:\n",
"\n",
"- equation: H2 + 2 RU(T) <=> 2 H(T) + 2 RU(B)\n",
" sticking-species: H2\n",
" Motz-Wise: false\n",
" sticking-coefficient: {A: 0.5, b: 0, Ea: \"0.0 kcal/mol\"}\n",
" id: r_0000\n",
"\n",
"- equation: N2 + RU(T) <=> N2(T) + RU(B)\n",
" sticking-species: N2\n",
" Motz-Wise: false\n",
" sticking-coefficient: {A: 0.5, b: 0, Ea: \"0.0 kcal/mol\"}\n",
" id: r_0001\n",
"\n",
"- equation: NH3 + RU(T) <=> NH3(T) + RU(B)\n",
" sticking-species: NH3\n",
" Motz-Wise: false\n",
" sticking-coefficient: {A: 0.5, b: 0, Ea: \"0.0 kcal/mol\"}\n",
" id: r_0002\n",
"\n",
"- equation: NH3(T) + RU(T) <=> NH2(T) + H(T) + RU(B)\n",
" rate-constant: {A: 9.6e+17, b: 1, Ea: \"0.0 kcal/mol\"}\n",
" id: r_0003\n",
"\n",
"- equation: NH2(T) + RU(T) <=> NH(T) + H(T) + RU(B)\n",
" rate-constant: {A: 4.807487477533391e+18, b: 1, Ea: \"10.15009434208916 kcal/mol\"}\n",
" id: r_0004\n",
"\n",
"- equation: NH(T) + RU(T) <=> N(T) + H(T) + RU(B)\n",
" rate-constant: {A: 4.807487477533391e+18, b: 1, Ea: \"22.079721657118633 kcal/mol\"}\n",
" id: r_0005\n",
"\n",
"- equation: 2 N(T) + RU(B) <=> N2(T) + RU(T)\n",
" rate-constant: {A: 4.807487477533391e+18, b: 1, Ea: \"86.47548232695213 kcal/mol\"}\n",
" id: r_0006\n",
"\n",
"- equation: H2 + 2 RU(S) <=> 2 H(S) + 2 RU(B)\n",
" sticking-species: H2\n",
" Motz-Wise: false\n",
" sticking-coefficient: {A: 0.5, b: 0, Ea: \"0.0 kcal/mol\"}\n",
" id: r_0007\n",
"\n",
"- equation: N2 + RU(S) <=> N2(S) + RU(B)\n",
" sticking-species: N2\n",
" Motz-Wise: false\n",
" sticking-coefficient: {A: 0.5, b: 0, Ea: \"0.0 kcal/mol\"}\n",
" id: r_0008\n",
"\n",
"- equation: NH3 + RU(S) <=> NH3(S) + RU(B)\n",
" sticking-species: NH3\n",
" Motz-Wise: false\n",
" sticking-coefficient: {A: 0.5, b: 0, Ea: \"0.0 kcal/mol\"}\n",
" id: r_0009\n",
"\n",
"- equation: NH3(S) + RU(S) <=> NH2(S) + H(S) + RU(B)\n",
" rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: \"12.592618179712357 kcal/mol\"}\n",
" id: r_0010\n",
"\n",
"- equation: NH2(S) + RU(S) <=> NH(S) + H(S) + RU(B)\n",
" rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: \"18.012171751643198 kcal/mol\"}\n",
" id: r_0011\n",
"\n",
"- equation: N(S) + H(S) + RU(B) <=> NH(S) + RU(S)\n",
" rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: \"26.08072567404924 kcal/mol\"}\n",
" id: r_0012\n",
"\n",
"- equation: 2 N(S) + RU(B) <=> N2(S) + RU(S)\n",
" rate-constant: {A: 2.34725833334744e+19, b: 1, Ea: \"44.5994818235098 kcal/mol\"}\n",
" id: r_0013\n",
"\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# BEPS\n",
"#-------------------------------------------------------------------------------\n",
"beps:\n",
"\n",
"- id: NH-H\n",
" slope: 0.52\n",
" intercept: \"19.78 kcal/mol\"\n",
" direction: cleavage\n",
" cleavage-reactions: [\"r_0004\", \"r_0011\"]\n",
"\n",
"- id: N-H\n",
" slope: 0.29\n",
" intercept: \"23.23 kcal/mol\"\n",
" direction: cleavage\n",
" synthesis-reactions: [\"r_0012\"]\n",
" cleavage-reactions: [\"r_0005\"]\n",
"\n",
"- id: NH2-H\n",
" slope: 0.71\n",
" intercept: \"23.69 kcal/mol\"\n",
" direction: cleavage\n",
" cleavage-reactions: [\"r_0010\"]\n",
"\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# INTERACTIONS\n",
"#-------------------------------------------------------------------------------\n",
"interactions:\n",
"\n",
"- species: [N(T), N(T)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-52.6 kcal\"]\n",
" id: i_0000\n",
"\n",
"- species: [N(T), H(T)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-17.7 kcal\"]\n",
" id: i_0001\n",
"\n",
"- species: [H(T), N(T)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-17.7 kcal\"]\n",
" id: i_0002\n",
"\n",
"- species: [H(T), H(T)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-3.0 kcal\"]\n",
" id: i_0003\n",
"\n",
"- species: [NH2(T), N(T)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-20.7 kcal\"]\n",
" id: i_0004\n",
"\n",
"- species: [N(S), N(S)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-52.6 kcal\"]\n",
" id: i_0005\n",
"\n",
"- species: [N(S), H(S)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-17.7 kcal\"]\n",
" id: i_0006\n",
"\n",
"- species: [H(S), N(S)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-17.7 kcal\"]\n",
" id: i_0007\n",
"\n",
"- species: [H(S), H(S)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-3.0 kcal\"]\n",
" id: i_0008\n",
"\n",
"- species: [NH2(S), N(S)]\n",
" coverage-threshold: [0, 1]\n",
" strength: [\"-20.7 kcal\"]\n",
" id: i_0009\n",
"\n"
]
}
],
"source": [
"print(write_thermo_yaml(phases=phases,\n",
" species=species,\n",
" reactions=reactions,\n",
" lateral_interactions=interactions,\n",
" units=units))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Write CTI File\n",
"\n",
"The CTI file species the thermodynamics and kinetics of the system. It can be written using [``write_cti``](https://vlachosgroup.github.io/pMuTT/api/kinetic_models/omkm/pmutt.io.omkm.write_cti.html#pmutt.io.omkm.write_cti). Note that we take the reactor operating conditions previously read for the YAML file to calculate thermodynamic and kinetic parameters."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"from pmutt.io.omkm import write_cti\n",
"\n",
"cti_path = './outputs/thermo.cti'\n",
"use_motz_wise = True\n",
"T = reactor_data['T']\n",
"\n",
"write_cti(reactions=reactions, species=species, phases=phases, units=units,\n",
" lateral_interactions=interactions, filename=cti_path,\n",
" use_motz_wise=use_motz_wise, T=T, P=1.)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Like before, omitting the ``filename`` parameter returns a string."
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"tags": [
"outputPrepend"
]
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"# File generated by pMuTT (v 1.2.21dev) on 2020-05-26 13:36:41.298380\n",
"# See documentation for OpenMKM CTI file here:\n",
"# https://vlachosgroup.github.io/openmkm/input\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# UNITS\n",
"#-------------------------------------------------------------------------------\n",
"units(length=\"cm\", time=\"s\", quantity=\"mol\", energy=\"kcal\",\n",
" act_energy=\"kcal/mol\", pressure=\"atm\", mass=\"g\")\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# PHASES\n",
"#-------------------------------------------------------------------------------\n",
"ideal_gas(name=\"gas\",\n",
" elements=\"H N Ar\",\n",
" species=\"N2 NH3 H2 Ar\",\n",
" reactions=[])\n",
"\n",
"stoichiometric_solid(name=\"bulk\",\n",
" elements=\"Ru\",\n",
" species=\"RU(B)\",\n",
" density=12.4,\n",
" note=\"Ru Metal\")\n",
"\n",
"interacting_interface(name=\"terrace\",\n",
" elements=\"H Ru N\",\n",
" species=\"N2(T) N(T) H(T) NH3(T) NH2(T) NH(T) RU(T)\",\n",
" phases=\"gas bulk\",\n",
" site_density=2.1671e-09,\n",
" interactions=[\"i_0000 to i_0004\"],\n",
" reactions=[\"r_0000 to r_0006\"],\n",
" beps=\"NH-H N-H\",\n",
" note=\"Ru(0001)\")\n",
"\n",
"interacting_interface(name=\"step\",\n",
" elements=\"H Ru N\",\n",
" species=\"N2(S) N(S) H(S) NH3(S) NH2(S) NH(S) RU(S)\",\n",
" phases=\"gas bulk\",\n",
" site_density=4.4385e-10,\n",
" interactions=[\"i_0005 to i_0009\"],\n",
" reactions=[\"r_0007 to r_0013\"],\n",
" beps=\"NH2-H NH-H N-H\",\n",
" note=\"Ru(0001) with atoms deleted\")\n",
"\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# SPECIES\n",
"#-------------------------------------------------------------------------------\n",
"species(name=\"N2\", atoms=\"N:2\",\n",
" thermo=(NASA([300.0, 642.8571428571429],\n",
" [ 3.39563199E+00, 1.11570769E-03, -4.30199378E-06,\n",
" 6.80714240E-09, -3.29033128E-12, -1.25466298E+02,\n",
" 3.55611074E+00]),\n",
" NASA([642.8571428571429, 1000.0], \n",
" [ 4.05032999E+00, -2.96778541E-03, 5.32348501E-06,\n",
" -3.35181224E-09, 7.58446718E-13, -2.10110264E+02,\n",
" 6.85822849E-01])))\n",
"\n",
"species(name=\"NH3\", atoms=\"N:1 H:3\",\n",
" thermo=(NASA([300.0, 542.8571428571429],\n",
" [ 4.56497242E+00, -6.83283784E-03, 2.68523703E-05,\n",
" -3.40241693E-08, 1.60037499E-11, -8.53599972E+03,\n",
" -1.75833190E+00]),\n",
" NASA([542.8571428571429, 1000.0], \n",
" [ 3.16096843E+00, 3.36237039E-03, -1.21423699E-06,\n",
" 6.82957529E-10, -2.54434966E-13, -8.37962629E+03,\n",
" 4.18565879E+00])))\n",
"\n",
"species(name=\"H2\", atoms=\"H:2\",\n",
" thermo=(NASA([300.0, 614.2857142857142],\n",
" [ 3.50597042E+00, -7.32519785E-05, 3.37172259E-07,\n",
" -6.91264039E-10, 5.33718902E-13, 1.68735194E+03,\n",
" -4.29885273E+00]),\n",
" NASA([614.2857142857142, 1000.0], \n",
" [ 3.39370134E+00, 7.19411242E-04, -1.75319719E-06,\n",
" 1.75349336E-09, -5.37568335E-13, 1.69999088E+03,\n",
" -3.82131998E+00])))\n",
"\n",
"species(name=\"N2(T)\", atoms=\"N:2\", size=1.0,\n",
" thermo=(NASA([300.0, 514.2857142857143],\n",
" [ 6.39478024E-01, 2.76666736E-02, -7.64572031E-05,\n",
" 1.01764879E-07, -5.19823387E-11, -6.83022934E+03,\n",
" -2.43739833E+00]),\n",
" NASA([514.2857142857143, 1000.0], \n",
" [ 3.85478658E+00, 2.45155339E-03, -1.12290413E-06,\n",
" 2.83662017E-10, -6.81451545E-14, -7.16375140E+03,\n",
" -1.58113012E+01])))\n",
"\n",
"species(name=\"N(T)\", atoms=\"N:1\", size=1.0,\n",
" thermo=(NASA([300.0, 557.1428571428571],\n",
" [-4.89444279E+00, 5.76767621E-02, -1.34471582E-04,\n",
" 1.52287595E-07, -6.82821324E-11, -1.05753156E+04,\n",
" 1.75606204E+01]),\n",
" NASA([557.1428571428571, 1000.0], \n",
" [ 6.59846490E-01, 1.78229079E-02, -2.52499856E-05,\n",
" 1.69581138E-08, -4.43507913E-12, -1.12063258E+04,\n",
" -6.04210537E+00])))\n",
"\n",
"species(name=\"H(T)\", atoms=\"H:1\", size=1.0,\n",
" thermo=(NASA([300.0, 557.1428571428571],\n",
" [-1.80079590E+00, 1.41608858E-02, -1.49548712E-05,\n",
" 2.22205000E-09, 3.92668860E-12, -6.10089659E+03,\n",
" 7.13912887E+00]),\n",
" NASA([557.1428571428571, 1000.0], \n",
" [-1.45370074E+00, 1.34229326E-02, -1.76861908E-05,\n",
" 1.12587751E-08, -2.82681062E-12, -6.16746227E+03,\n",
" 5.42130351E+00])))\n",
"\n",
"species(name=\"NH3(T)\", atoms=\"N:1 H:3\", size=1.0,\n",
" thermo=(NASA([300.0, 428.57142857142856],\n",
" [ 1.01855800E+00, 2.22467480E-02, -4.37028677E-05,\n",
" 5.85763469E-08, -3.39082529E-11, -1.42140038E+04,\n",
" -4.22950956E+00]),\n",
" NASA([428.57142857142856, 1000.0], \n",
" [ 1.63904581E+00, 1.54367008E-02, -1.64055589E-05,\n",
" 1.08126917E-08, -2.96089447E-12, -1.42574216E+04,\n",
" -6.58598939E+00])))\n",
"\n",
"species(name=\"NH2(T)\", atoms=\"N:1 H:2\", size=1.0,\n",
" thermo=(NASA([300.0, 585.7142857142858],\n",
" [-2.43505281E+00, 3.71813754E-02, -7.25285056E-05,\n",
" 7.30904953E-08, -2.95666916E-11, -1.17557722E+04,\n",
" 8.40995025E+00]),\n",
" NASA([585.7142857142858, 1000.0], \n",
" [ 5.91631735E-01, 1.71279786E-02, -2.17139679E-05,\n",
" 1.47263482E-08, -3.95343696E-12, -1.21281482E+04,\n",
" -4.69375229E+00])))\n",
"\n",
"species(name=\"NH(T)\", atoms=\"N:1 H:1\", size=1.0,\n",
" thermo=(NASA([300.0, 600.0],\n",
" [-3.66688797E+00, 3.98278241E-02, -8.18733330E-05,\n",
" 8.24962240E-08, -3.28692112E-11, -1.46257191E+04,\n",
" 1.35047465E+01]),\n",
" NASA([600.0, 1000.0], \n",
" [ 1.06354564E-01, 1.52712512E-02, -2.09776190E-05,\n",
" 1.43058940E-08, -3.79582054E-12, -1.50967556E+04,\n",
" -2.89197943E+00])))\n",
"\n",
"species(name=\"TS1_NH3(T)\", atoms=\"N:1 H:3\", size=1.0,\n",
" thermo=(NASA([300.0, 671.4285714285714],\n",
" [ 1.67183313E-01, 2.03299804E-02, -2.27157893E-05,\n",
" 1.39605519E-08, -3.42136891E-12, -2.51362550E+03,\n",
" -1.91775763E+00]),\n",
" NASA([671.4285714285714, 1000.0], \n",
" [ 8.08256077E-01, 1.71614234E-02, -1.70222108E-05,\n",
" 9.63265382E-09, -2.29112023E-12, -2.61525719E+03,\n",
" -4.86743569E+00])))\n",
"\n",
"species(name=\"TS2_NH2(T)\", atoms=\"N:1 H:2\", size=1.0,\n",
" thermo=(NASA([300.0, 628.5714285714287],\n",
" [-2.54626149E+00, 3.39621837E-02, -5.72412569E-05,\n",
" 4.94632472E-08, -1.73527547E-11, -5.76170702E+03,\n",
" 8.78959011E+00]),\n",
" NASA([628.5714285714287, 1000.0], \n",
" [-2.29397518E-01, 1.98824970E-02, -2.46970340E-05,\n",
" 1.55243728E-08, -3.87491099E-12, -6.07066916E+03,\n",
" -1.43448221E+00])))\n",
"\n",
"species(name=\"TS3_NH(T)\", atoms=\"N:1 H:1\", size=1.0,\n",
" thermo=(NASA([300.0, 542.8571428571429],\n",
" [-1.55032579E+00, 2.80568482E-02, -5.92044647E-05,\n",
" 6.50466420E-08, -2.93863334E-11, -2.39009655E+03,\n",
" 4.70877084E+00]),\n",
" NASA([542.8571428571429, 1000.0], \n",
" [ 4.36775007E-01, 1.32992049E-02, -1.71938139E-05,\n",
" 1.08359913E-08, -2.70829956E-12, -2.60912494E+03,\n",
" -3.67094273E+00])))\n",
"\n",
"species(name=\"TS4_N2(T)\", atoms=\"N:2\", size=1.0,\n",
" thermo=(NASA([300.0, 528.5714285714286],\n",
" [-1.42618300E+00, 3.77938301E-02, -9.64146781E-05,\n",
" 1.18187538E-07, -5.69177930E-11, 2.18726262E+04,\n",
" 3.57501908E+00]),\n",
" NASA([528.5714285714286, 1000.0], \n",
" [ 2.32431089E+00, 9.28279571E-03, -1.35835546E-05,\n",
" 9.38082335E-09, -2.51420502E-12, 2.14700072E+04,\n",
" -1.21477192E+01])))\n",
"\n",
"species(name=\"RU(T)\", atoms=\"Ru:1\", size=1.0,\n",
" thermo=(NASA([300.0, 657.1428571428571],\n",
" [ 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00]),\n",
" NASA([657.1428571428571, 1000.0], \n",
" [ 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00])))\n",
"\n",
"species(name=\"N2(S)\", atoms=\"N:2\", size=1.0,\n",
" thermo=(NASA([300.0, 542.8571428571429],\n",
" [-2.33663547E+00, 4.01661399E-02, -8.99200036E-05,\n",
" 1.00928481E-07, -4.56623083E-11, -8.75645553E+03,\n",
" 7.18667587E+00]),\n",
" NASA([542.8571428571429, 1000.0], \n",
" [ 1.00403006E+00, 1.57327558E-02, -2.15006874E-05,\n",
" 1.41126959E-08, -3.63653615E-12, -9.12965945E+03,\n",
" -6.94944717E+00])))\n",
"\n",
"species(name=\"N(S)\", atoms=\"N:1\", size=1.0,\n",
" thermo=(NASA([300.0, 557.1428571428571],\n",
" [-2.58498746E+00, 2.93109426E-02, -6.78276899E-05,\n",
" 7.63252496E-08, -3.40368127E-11, -1.22998155E+04,\n",
" 9.38530237E+00]),\n",
" NASA([557.1428571428571, 1000.0], \n",
" [ 2.18126819E-01, 9.27351107E-03, -1.31269469E-05,\n",
" 8.81076124E-09, -2.30321357E-12, -1.26194040E+04,\n",
" -2.53674148E+00])))\n",
"\n",
"species(name=\"H(S)\", atoms=\"H:1\", size=1.0,\n",
" thermo=(NASA([300.0, 557.1428571428571],\n",
" [-1.80079590E+00, 1.41608858E-02, -1.49548712E-05,\n",
" 2.22205000E-09, 3.92668860E-12, -6.10089659E+03,\n",
" 7.13912887E+00]),\n",
" NASA([557.1428571428571, 1000.0], \n",
" [-1.45370074E+00, 1.34229326E-02, -1.76861908E-05,\n",
" 1.12587751E-08, -2.82681062E-12, -6.16746227E+03,\n",
" 5.42130351E+00])))\n",
"\n",
"species(name=\"NH3(S)\", atoms=\"N:1 H:3\", size=1.0,\n",
" thermo=(NASA([300.0, 428.57142857142856],\n",
" [ 9.76073327E-01, 2.29997091E-02, -4.71441123E-05,\n",
" 6.47201892E-08, -3.78220257E-11, -1.71183277E+04,\n",
" -4.18414593E+00]),\n",
" NASA([428.57142857142856, 1000.0], \n",
" [ 1.70924374E+00, 1.50877297E-02, -1.58065126E-05,\n",
" 1.03659268E-08, -2.83601968E-12, -1.71709469E+04,\n",
" -6.98345489E+00])))\n",
"\n",
"species(name=\"NH2(S)\", atoms=\"N:1 H:2\", size=1.0,\n",
" thermo=(NASA([300.0, 585.7142857142858],\n",
" [-2.13484631E+00, 3.56104434E-02, -6.86594530E-05,\n",
" 6.85121902E-08, -2.74842519E-11, -1.83049003E+04,\n",
" 7.45851009E+00]),\n",
" NASA([585.7142857142858, 1000.0], \n",
" [ 6.88429474E-01, 1.69826605E-02, -2.16460100E-05,\n",
" 1.47118317E-08, -3.94964423E-12, -1.86537029E+04,\n",
" -4.77641769E+00])))\n",
"\n",
"species(name=\"NH(S)\", atoms=\"N:1 H:1\", size=1.0,\n",
" thermo=(NASA([300.0, 585.7142857142858],\n",
" [-3.58576772E+00, 4.04182472E-02, -8.50952522E-05,\n",
" 8.77947790E-08, -3.58300305E-11, -1.35517435E+04,\n",
" 1.30676542E+01]),\n",
" NASA([585.7142857142858, 1000.0], \n",
" [ 2.32508478E-01, 1.50840526E-02, -2.09916278E-05,\n",
" 1.44863139E-08, -3.88362426E-12, -1.40196424E+04,\n",
" -3.45256448E+00])))\n",
"\n",
"species(name=\"TS1_NH3(S)\", atoms=\"N:1 H:3\", size=1.0,\n",
" thermo=(NASA([300.0, 671.4285714285714],\n",
" [-3.73525885E-02, 2.05053911E-02, -2.18577672E-05,\n",
" 1.22803574E-08, -2.56575606E-12, -8.99877451E+03,\n",
" -5.70339124E-01]),\n",
" NASA([671.4285714285714, 1000.0], \n",
" [ 4.55369167E-01, 1.83130943E-02, -1.85714440E-05,\n",
" 1.05884839E-08, -2.51704274E-12, -9.08238782E+03,\n",
" -2.87822936E+00])))\n",
"\n",
"species(name=\"TS2_NH2(S)\", atoms=\"N:1 H:2\", size=1.0,\n",
" thermo=(NASA([300.0, 542.8571428571429],\n",
" [-1.03686638E+00, 3.05922775E-02, -6.42552305E-05,\n",
" 7.26912883E-08, -3.34835201E-11, -5.22580553E+03,\n",
" 2.68048729E+00]),\n",
" NASA([542.8571428571429, 1000.0], \n",
" [ 1.26116093E+00, 1.34629082E-02, -1.53891506E-05,\n",
" 9.59337411E-09, -2.45157713E-12, -5.47782545E+03,\n",
" -7.00031080E+00])))\n",
"\n",
"species(name=\"TS3_NH(S)\", atoms=\"N:1 H:1\", size=1.0,\n",
" thermo=(NASA([300.0, 514.2857142857143],\n",
" [-2.97096518E+00, 3.84224932E-02, -9.52792006E-05,\n",
" 1.19692656E-07, -5.97020431E-11, -3.97417870E+03,\n",
" 1.03399925E+01]),\n",
" NASA([514.2857142857143, 1000.0], \n",
" [ 4.63947577E-01, 1.11845845E-02, -1.30068221E-05,\n",
" 7.70966762E-09, -1.86716695E-12, -4.32665579E+03,\n",
" -3.90946846E+00])))\n",
"\n",
"species(name=\"TS4_N2(S)\", atoms=\"N:2\", size=1.0,\n",
" thermo=(NASA([300.0, 542.8571428571429],\n",
" [-3.71745094E+00, 4.78281768E-02, -1.15188567E-04,\n",
" 1.34429016E-07, -6.20044384E-11, -2.25482568E+03,\n",
" 1.29604008E+01]),\n",
" NASA([542.8571428571429, 1000.0], \n",
" [ 9.06288002E-01, 1.38764582E-02, -1.99273178E-05,\n",
" 1.35458084E-08, -3.58129564E-12, -2.76838492E+03,\n",
" -6.58236000E+00])))\n",
"\n",
"species(name=\"RU(S)\", atoms=\"Ru:1\", size=1.0,\n",
" thermo=(NASA([300.0, 657.1428571428571],\n",
" [ 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00]),\n",
" NASA([657.1428571428571, 1000.0], \n",
" [ 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00])))\n",
"\n",
"species(name=\"RU(B)\", atoms=\"Ru:1\", size=1.0,\n",
" thermo=(NASA([300.0, 657.1428571428571],\n",
" [ 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00]),\n",
" NASA([657.1428571428571, 1000.0], \n",
" [ 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00, 0.00000000E+00, 0.00000000E+00,\n",
" 0.00000000E+00])))\n",
"\n",
"species(name=\"Ar\", atoms=\"Ar:1\",\n",
" thermo=Shomate([298.0, 6000.0],\n",
" [ 2.07860000E+01, 2.82591100E-07, -1.46419100E-07,\n",
" 1.09213100E-08, -3.66137100E-08, -6.19735000E+00,\n",
" 1.79999000E+02]))\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# LATERAL INTERACTIONS\n",
"#-------------------------------------------------------------------------------\n",
"lateral_interaction(\"N(T) N(T)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-52.6],\n",
" id=\"i_0000\")\n",
"lateral_interaction(\"N(T) H(T)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-17.7],\n",
" id=\"i_0001\")\n",
"lateral_interaction(\"H(T) N(T)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-17.7],\n",
" id=\"i_0002\")\n",
"lateral_interaction(\"H(T) H(T)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-3.0000000000000004],\n",
" id=\"i_0003\")\n",
"lateral_interaction(\"NH2(T) N(T)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-20.7],\n",
" id=\"i_0004\")\n",
"lateral_interaction(\"N(S) N(S)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-52.6],\n",
" id=\"i_0005\")\n",
"lateral_interaction(\"N(S) H(S)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-17.7],\n",
" id=\"i_0006\")\n",
"lateral_interaction(\"H(S) N(S)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-17.7],\n",
" id=\"i_0007\")\n",
"lateral_interaction(\"H(S) H(S)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-3.0000000000000004],\n",
" id=\"i_0008\")\n",
"lateral_interaction(\"NH2(S) N(S)\",\n",
" coverage_thresholds=[0, 1],\n",
" strengths=[-20.7],\n",
" id=\"i_0009\")\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# REACTION OPTIONS\n",
"#-------------------------------------------------------------------------------\n",
"enable_motz_wise()\n",
"\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# REACTIONS\n",
"#-------------------------------------------------------------------------------\n",
"surface_reaction(\"H2 + 2 RU(T) <=> 2 H(T) + 2 RU(B)\",\n",
" stick( 5.00000e-01, 0, 1.00000e+00),\n",
" id=\"r_0000\")\n",
"surface_reaction(\"N2 + RU(T) <=> N2(T) + RU(B)\",\n",
" stick( 5.00000e-01, 0, 1.00000e+00),\n",
" id=\"r_0001\")\n",
"surface_reaction(\"NH3 + RU(T) <=> NH3(T) + RU(B)\",\n",
" stick( 5.00000e-01, 0, 1.00000e+00),\n",
" id=\"r_0002\")\n",
"surface_reaction(\"NH3(T) + RU(T) <=> NH2(T) + H(T) + RU(B)\",\n",
" [ 9.60000e+17, 1, 1.42000e+01],\n",
" id=\"r_0003\")\n",
"surface_reaction(\"NH2(T) + RU(T) <=> NH(T) + H(T) + RU(B)\",\n",
" [ 4.80749e+18, 1, 1.00000e+00],\n",
" id=\"r_0004\")\n",
"surface_reaction(\"NH(T) + RU(T) <=> N(T) + H(T) + RU(B)\",\n",
" [ 4.80749e+18, 1, 1.00000e+00],\n",
" id=\"r_0005\")\n",
"surface_reaction(\"2 N(T) + RU(B) <=> N2(T) + RU(T)\",\n",
" [ 4.80749e+18, 1, 1.00000e+00],\n",
" id=\"r_0006\")\n",
"surface_reaction(\"H2 + 2 RU(S) <=> 2 H(S) + 2 RU(B)\",\n",
" stick( 5.00000e-01, 0, 1.00000e+00),\n",
" id=\"r_0007\")\n",
"surface_reaction(\"N2 + RU(S) <=> N2(S) + RU(B)\",\n",
" stick( 5.00000e-01, 0, 1.00000e+00),\n",
" id=\"r_0008\")\n",
"surface_reaction(\"NH3 + RU(S) <=> NH3(S) + RU(B)\",\n",
" stick( 5.00000e-01, 0, 1.00000e+00),\n",
" id=\"r_0009\")\n",
"surface_reaction(\"NH3(S) + RU(S) <=> NH2(S) + H(S) + RU(B)\",\n",
" [ 2.34726e+19, 1, 1.00000e+00],\n",
" id=\"r_0010\")\n",
"surface_reaction(\"NH2(S) + RU(S) <=> NH(S) + H(S) + RU(B)\",\n",
" [ 2.34726e+19, 1, 1.00000e+00],\n",
" id=\"r_0011\")\n",
"surface_reaction(\"N(S) + H(S) + RU(B) <=> NH(S) + RU(S)\",\n",
" [ 2.34726e+19, 1, 1.00000e+00],\n",
" id=\"r_0012\")\n",
"surface_reaction(\"2 N(S) + RU(B) <=> N2(S) + RU(S)\",\n",
" [ 2.34726e+19, 1, 1.00000e+00],\n",
" id=\"r_0013\")\n",
"\n",
"#-------------------------------------------------------------------------------\n",
"# BEP Relationships\n",
"#-------------------------------------------------------------------------------\n",
"bep(id=\"NH-H\",\n",
" slope=0.52,\n",
" intercept=19.78,\n",
" direction=\"cleavage\",\n",
" cleavage_reactions=[\"r_0004\", \"r_0011\"],\n",
" synthesis_reactions=[])\n",
"\n",
"bep(id=\"N-H\",\n",
" slope=0.29,\n",
" intercept=23.23,\n",
" direction=\"cleavage\",\n",
" cleavage_reactions=[\"r_0005\"],\n",
" synthesis_reactions=[\"r_0012\"])\n",
"\n",
"bep(id=\"NH2-H\",\n",
" slope=0.71,\n",
" intercept=23.69,\n",
" direction=\"cleavage\",\n",
" cleavage_reactions=[\"r_0010\"],\n",
" synthesis_reactions=[])\n",
"\n"
]
}
],
"source": [
"print(write_cti(reactions=reactions, species=species, phases=phases, units=units,\n",
" lateral_interactions=interactions, use_motz_wise=use_motz_wise))"
]
}
],
"metadata": {
"file_extension": ".py",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
},
"mimetype": "text/x-python",
"name": "python",
"npconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": 3
},
"nbformat": 4,
"nbformat_minor": 2
}