# Reference example: extended CO oxidation mechanism.
#
# Compared with `co-ox-simple`, this file shows a more detailed surface network.

# Shared site area for adsorption models.
let asite = 1e-20

# Gas and surface species.
components {
  CO   {phase=gas, init=2.0, role=reactant},
  O2   {phase=gas, init=1.0, role=reactant},
  CO2  {phase=gas, init=0.0, role=product, tags=[key]},
  CO*OL    {phase=surface, init=0.0},
  CO2*Ov   {phase=surface, init=0.0},
  Ov*      {phase=surface, init=0.0},
  O2*Ov    {phase=surface, init=0.0},
  O*OL     {phase=surface, init=0.0},
  CO3*     {phase=surface, init=0.0},
  O*Ov     {phase=surface, init=0.0},
  CO*Ov    {phase=surface, init=0.0},
  O2*CO*Ov {phase=surface, init=0.0},
  CO2*     {phase=surface, init=0.0},
  *        {phase=surface, init=1.0}
}

# Detailed oxidation reaction network.
reactions {
  {CO}+{*}=>{CO*OL} @ HertzKnudsenDefault(Asite=asite, m=28, theta=2.8, sigma=1, S=1, Edes=215.67e3) {tags=[drc]},
  {CO*OL}=>{CO2*Ov} @ ArrheniusDefault(Vf=1.69e13, Vb=3.50e12, Eaf=36.02e3, Eab=133.95e3) {tags=[drc]},
  {CO2}+{Ov*}=>{CO2*Ov} @ HertzKnudsenDefault(Asite=asite, m=44, theta=0.561, sigma=1, S=1, Edes=95.84e3) {tags=[drc]},
  {O2}+{Ov*}=>{O2*Ov} @ HertzKnudsenDefault(Asite=asite, m=32, theta=2.08, sigma=2, S=1, Edes=194.90e3) {tags=[drc]},
  {O2*Ov}=>{O*OL} @ ArrheniusDefault(Vf=2.68e12, Vb=2.33e13, Eaf=112.3e3, Eab=39.10e3) {tags=[drc]},
  {CO}+{O*OL}=>{CO3*} @ HertzKnudsenDefault(Asite=asite, m=28, theta=2.8, sigma=1, S=1, Edes=474.80e3) {tags=[drc]},
  {CO2}+{*}=>{CO3*} @ HertzKnudsenDefault(Asite=asite, m=44, theta=0.561, sigma=1, S=1, Edes=204.98e3) {tags=[drc]},
  {CO}+{Ov*}=>{CO*Ov} @ HertzKnudsenDefault(Asite=asite, m=28, theta=2.8, sigma=1, S=1, Edes=234.98e3) {tags=[drc]},
  {O2}+{CO*Ov}=>{O2*CO*Ov} @ HertzKnudsenDefault(Asite=asite, m=32, theta=2, sigma=1, S=1, Edes=114.18e3) {tags=[drc]},
  {O2*CO*Ov}=>{CO2*} @ ArrheniusDefault(Vf=2.79e12, Vb=1.64e13, Eaf=63.02e3, Eab=195.67e3) {tags=[drc]},
  {CO2}+{*}=>{CO2*} @ HertzKnudsenDefault(Asite=asite, m=44, theta=0.561, sigma=1, S=1, Edes=89.64e3) {tags=[drc]}
}

# Broad transient temperature sweep.
simulation {
  baseline @ transient_solve(
    model=thermal,
    solver={method=cvode_bdf, atol=1e-10, rtol=1e-10, t_end=1e8},
    analyses=[
      {type=orders, enabled=true},
      {type=drc, enabled=true},
      {type=eapp, enabled=true}
    ],
    conditions=[
      {T=350, t_end=1e8}, {T=375, t_end=1e6}, {T=400, t_end=1e6}, {T=425, t_end=1e6},
      {T=450, t_end=1e5}, {T=475, t_end=1e5}, {T=500, t_end=1e5}, {T=525, t_end=1e5},
      {T=550, t_end=1e5}, {T=575, t_end=1e6}, {T=600, t_end=1e6}, {T=625, t_end=1e6},
      {T=650, t_end=1e6}, {T=675, t_end=1e6}, {T=700, t_end=1e6}, {T=725, t_end=1e5},
      {T=750, t_end=1e5}, {T=775, t_end=1e5}, {T=800, t_end=1e5}, {T=825, t_end=1e5},
      {T=850, t_end=1e5}, {T=875, t_end=1e5}, {T=900, t_end=1e5}, {T=925, t_end=1e5},
      {T=950, t_end=1e5}, {T=975, t_end=1e5}, {T=1000, t_end=1e5}, {T=1025, t_end=1e5},
      {T=1050, t_end=1e5}, {T=1075, t_end=1e5}, {T=1100, t_end=1e5}, {T=1125, t_end=1e5},
      {T=1150, t_end=1e5}, {T=1175, t_end=1e5}, {T=1200, t_end=1e5}
    ]
  )
}

# Compact tabular output.
output {
  formats=[tabdelim],
  folder="results_co_ox"
}
