MKX Structure
An MKX input file is built from a small number of top-level declarations and blocks:
letcomponentsreactionssimulationoutput
Overview
let arr = {Vf=1e13, Vb=1e13}
components {
A {phase=gas, init=1.0, role=reactant},
A* {phase=surface, init=0.0},
* {phase=surface, init=1.0, tags=[emptysite]}
}
reactions {
{A}+{*}=>{A*} @ ArrheniusDefault(*arr, Eaf=50e3, Eab=55e3)
}
simulation {
base @ transient_solve(
model=thermal,
solver={method=cvode_bdf, atol=1e-10, rtol=1e-10, t_end=1e6},
conditions=[{T=600}]
)
}
output {
formats=[tabdelim, hdf5],
folder="results"
}
Expressions inside these blocks can use the language features documented in
MKX Language, including where (...), spread syntax, and
block-style if (...) { ... } else { ... } conditionals in components and
reactions.
Top-Level Elements
letDefines reusable values.letis a top-level declaration, not a block.componentsDefines the species in the model.reactionsDefines the elementary reaction steps and kinetic models.simulationDefines how the model is solved.outputDefines how results are written.