# Minimal CO oxidation example.

# Reusable model constants.
let asite = 1e-20
let arr_surface = {Vf=1e13, Vb=1e13}

# Species definition.
# `CO2` is the key product used for reported rates and sensitivities.
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* {phase=surface, init=0.0},
  O*  {phase=surface, init=0.0},
  CO2* {phase=surface, init=0.0},
  *   {phase=surface, init=1.0}
}

# Elementary adsorption and surface conversion steps.
reactions {
  {CO}+{*}=>{CO*} @ HertzKnudsenDefault(Asite=asite, m=28, theta=2.8, sigma=1, S=1, Edes=71e3) {tags=[drc]},
  {O2}+2{*}=>2{O*} @ HertzKnudsenDefault(Asite=asite, m=32, theta=2.08, sigma=2, S=1, Edes=264e3) {tags=[drc]},
  {CO2}+{*}=>{CO2*} @ HertzKnudsenDefault(Asite=asite, m=44, theta=0.56, sigma=1, S=1, Edes=29e3) {tags=[drc]},
  {CO*}+{O*}=>{CO2*}+{*} @ ArrheniusDefault(*arr_surface, Eaf=133e3, Eab=213e3) {tags=[drc]}
}

# Transient solve over a small temperature range.
simulation {
  baseline @ transient_solve(
    model=thermal,
    solver={method=cvode_bdf, atol=1e-8, rtol=1e-8, t_end=1e8},
    analyses=[
      {type=orders, enabled=true},
      {type=drc, enabled=true},
      {type=eapp, enabled=true}
    ],
    conditions=[{T=550}, {T=600}, {T=650}, {T=700}, {T=750}, {T=800}]
  )
}

# Output formats for post-processing.
output {
  formats=[excel, tabdelim, hdf5],
  folder="results"
}
