Skip to content

Analyses

MKMCXX can compute several derived analyses in addition to the base simulation.

Overview

Analyses are configured inside the simulation block.

analyses=[
  {type=reaction_orders, enabled=true},
  {type=drc, enabled=true},
  {type=tdrc, enabled=true},
  {type=eapp, enabled=true}
]

For the sensitivity-style analyses, MKMCXX evaluates the desired quantity numerically by running a small set of perturbed calculations around the baseline state and fitting a straight line to the response.

In the expressions below, the observable rate is taken as the sum of the absolute production or consumption rates of the selected key compounds:

\[ r = \sum_{i \in \mathrm{key}} \left| \frac{dy_i}{dt} \right| \]

This definition makes the choice of key component physically important. MKMCXX does not evaluate sensitivities with respect to an abstract, built-in global rate. Instead, it evaluates sensitivities with respect to the observable rate constructed from the selected key component or components.

In other words, the quantity \(r\) depends on the key selection. If the key compound is changed, then the reported reaction order, DRC, TDRC, and apparent activation energy may also change, because the software is then differentiating a different observable.

For that reason, at least one meaningful key component should be defined. In most practical cases, the key component is chosen to be the main product whose formation rate is of interest.

Selecting a Key Component

A key component is selected in the components block by assigning the tag key:

components {
  A   {phase=gas, init=1.0, role=reactant},
  B2  {phase=gas, init=0.5, role=reactant},
  AB  {phase=gas, init=0.0, role=product, tags=[key]}
}

In this example, AB is the selected key component. The observable rate used in the sensitivity analyses is therefore based on the rate of formation or consumption of AB.

Reaction Orders

Reaction orders describe how the rate responds to a change in the concentration of a selected compound.

For a compound \(x\), the reaction order is defined as:

\[ n_x = \frac{\partial \ln r}{\partial \ln p_x} \]

Here, the meaning of \(r\) is determined by the selected key component set. This is why defining a key component is essential: without it, the software would not know which production or consumption rate should be treated as the response variable in the derivative above.

In the current implementation, MKMCXX perturbs the initial value of the chosen compound by a five-point multiplicative stencil:

\[ m \in \left\{1-f,\; 1-\frac{f}{2},\; 1,\; 1+\frac{f}{2},\; 1+f\right\} \]

with default f = 0.01.

Degree of Rate Control

Degree of Rate Control (DRC) measures the sensitivity of the overall rate to a perturbation of an elementary step.

In the current implementation, MKMCXX perturbs the rate constant of one reaction by the five-point multiplicative stencil:

\[ m \in \left\{1-2f,\; 1-f,\; 1,\; 1+f,\; 1+2f\right\} \]

with default f = 0.01.

The reported DRC value is the logarithmic derivative:

\[ \chi_{\mathrm{DRC},j} = \frac{\partial \ln r}{\partial \ln k_j} \]

Thermodynamic Degree of Rate Control

Thermodynamic Degree of Rate Control (TDRC) measures the sensitivity of the overall rate to a perturbation associated with a selected species.

In the current implementation, MKMCXX applies a five-point perturbation to the thermodynamic state of the chosen compound and then fits the response of the observable rate.

The reported value is treated numerically as:

\[ \chi_{\mathrm{TDRC},j} = \frac{\partial \ln r}{\partial \ln q_j} \]

where \(q_j\) denotes the perturbed state quantity used internally for that species perturbation.

Apparent Activation Energy

The apparent activation energy is extracted from the temperature dependence of the rate.

It is defined as:

\[ E_{\mathrm{app}} = RT^2 \frac{\partial \ln r}{\partial T} \]

In the current implementation, MKMCXX perturbs temperature by the five-point multiplicative stencil:

\[ m \in \left\{1-f,\; 1-\frac{f}{2},\; 1,\; 1+\frac{f}{2},\; 1+f\right\} \]

with default f = 0.001, so that:

\[ T' = mT \]

Selectivity

Selectivity analyses compare target-product formation relative to a selected key species.

For a target species \(p\) with stoichiometric coefficient \(\nu_p\), the current implementation reports:

\[ S_p = \left| \frac{\nu_p \, dy_p/dt}{dy_{\mathrm{key}}/dt} \right| \]

Degree of Selectivity Control

Degree of Selectivity Control (DSC) extends sensitivity analysis to selectivity metrics.

In the current implementation, DSC is constructed from DRC values and the selectivity factor:

\[ \mathrm{DSC}_{p,j} = S_p \left( \chi_{\mathrm{DRC},j}^{(p)} - \chi_{\mathrm{DRC},j}^{(\mathrm{key})} \right) \]

where:

  • \(S_p\) is the selectivity of product \(p\)
  • \(\chi_{\mathrm{DRC},j}^{(p)}\) is the DRC of reaction \(j\) with respect to the product rate
  • \(\chi_{\mathrm{DRC},j}^{(\mathrm{key})}\) is the DRC of reaction \(j\) with respect to the key-species rate

Numerical Evaluation

For reaction orders, DRC, TDRC, and Eapp, MKMCXX does not evaluate the differentials analytically. Instead, it:

  1. generates a small set of perturbed runs around the baseline case
  2. computes the observable rate for each perturbed run
  3. transforms the data to the appropriate linearized variables
  4. performs a linear fit
  5. uses the fitted slope as the reported differential quantity

The output also records an \(R^2\) value for the fit, which is useful as a numerical consistency check.

Output

Sensitivity-analysis results are written together with the normal simulation output.

In practice, the results are stored as temperature-indexed data series, with separate output objects for quantities such as reaction orders, DRC, TDRC, and apparent activation energy. When applicable, the output also includes the corresponding fit-quality information such as \(R^2\).

On standard output, MKMCXX reports these analyses only at a high level. The execution plan lists which analyses are enabled, and the computation-time report shows the corresponding job families such as ORDER, DRC, and EACT. The numerical analysis values themselves are written to the output files.

For the bundled examples/basic/input.mkx example, the enabled analyses are:

  • reaction orders
  • DRC
  • Eapp

With tab-delimited output enabled, representative files are written under:

  • results/aggregated/sensitivity/orders.tsv
  • results/aggregated/sensitivity/orders_r2.tsv
  • results/aggregated/sensitivity/drc.tsv
  • results/aggregated/sensitivity/drc_r2.tsv
  • results/aggregated/sensitivity/eapp.tsv
  • results/aggregated/sensitivity/eapp_r2.tsv

A representative orders.tsv file has the form:

temperature A   B2  AB
350 ... ... ...
375 ... ... ...
400 ... ... ...

Here, the first column is temperature, and the remaining columns are the reaction orders with respect to the gas-phase compounds appearing in the example.

The corresponding fit-quality file orders_r2.tsv has the same layout:

temperature A   B2  AB
350 ... ... ...
375 ... ... ...
400 ... ... ...

Each entry is the \(R^2\) value of the local fit used to compute the corresponding reaction order.

A representative drc.tsv file has the form:

temperature A + * => A* B2 + 2* => 2B*  AB + * => AB*   A* + B* => AB* + *
350 ... ... ... ...
375 ... ... ... ...
400 ... ... ... ...

Here, each reaction column corresponds to one elementary step marked for DRC analysis.

A representative eapp.tsv file has the form:

temperature Eapp
350 ...
375 ...
400 ...

The corresponding fit-quality file eapp_r2.tsv has the form:

temperature R2
350 ...
375 ...
400 ...

The same data are also written to HDF5 under corresponding paths such as:

  • aggregated/sensitivity/orders
  • aggregated/sensitivity/orders_r2
  • aggregated/sensitivity/drc
  • aggregated/sensitivity/drc_r2
  • aggregated/sensitivity/eapp
  • aggregated/sensitivity/eapp_r2

The exact file layout depends on the selected output format and is described in more detail in the Output chapter.