{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Combustion kinetics I\n",
    "\n",
    "* Equilibrium is *approached* in combustion, but often kinetics are limiting and required for an accurate representation of temperature and composition.\n",
    "* Kinetics are important for soot and NOx\n",
    "* Flame extinction and ignition phenomena\n",
    "* **Combustion chemistry is complex:** hundreds (thousands) of species and reactions.\n",
    "\n",
    "## Elementary reactions\n",
    "* Bimolecular reaction\n",
    "$$A + B \\rightarrow C + D$$\n",
    "\n",
    "$$\\frac{d[A]}{dt} = -k[A][B]$$\n",
    "\n",
    "* In general:\n",
    "$$ aA + bB \\rightleftharpoons cC + dD$$\n",
    "$$\\frac{d[A]}{dt} = -ak_f[A]^a[B]^b + ak_r[C]^c[D]^d$$\n",
    "* For elementary reactions the powers on [A], [B], etc. are integers, and correspond to the coefficients in the reaction.\n",
    "\n",
    "<font color=\"blue\">\n",
    "$$k_f = \\alpha T^{\\beta}\\exp(-E_a/RT)$$\n",
    "</font>\n",
    "\n",
    "* $\\alpha$ is a pre-exponential rate factor.\n",
    "* $\\beta$ is a temperature coefficient.\n",
    "* $E_a$ is the activation energy.\n",
    "\n",
    "* Unimolecular reaction: $A\\rightarrow B$\n",
    "* Termolecular reaction: $A+B+M\\rightarrow \\text{products}$\n",
    "* In combustion, we often see species M, which is some generic species.\n",
    "    * Normally occurs in radical reactions."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Global reactions\n",
    "\n",
    "* Lump many elementary steps into one (or more) overall reaction.\n",
    "$$\\text{Fuel} + a\\text{Oxidizer} \\rightarrow b\\text{Products}$$\n",
    "* For methane\n",
    "$$\\frac{d[CH_4]}{dt} = -k[CH_4]^n[O_2]^m$$\n",
    "* Generally $n$, and $m$ are not integers.\n",
    "    * Can be greater than or less than 1.\n",
    "* The reaction rate is **empirical** and only valid within the range of conditions used to fit the data.\n",
    "* **Use with caution**\n",
    "* Can be very convenient.\n",
    "* See Turns Table 5.1\n",
    "* See also [Westbrook 1981 simplified reaction mechanisms](https://doi.org/10.1080/00102208108946970)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Compact notation\n",
    "* To do combustion kinetics requires computer codes.\n",
    "* Need a *framework* to express reactions and rates on a consistent basis.\n",
    "\n",
    "### Reactions\n",
    "* Consider reaction $i$, made up of **all** species $j$\n",
    "$$\\sum_{j=1}^{N_{sp}} \\nu_{i,j}^\\prime X_j\\rightleftharpoons \\sum_{j=1}^{N_{sp}} \\nu_{i,j}^{\\prime\\prime}X_j$$\n",
    "* $\\nu_{i,j}^{\\prime}$ is the **reactant** coefficient of species $j$ in reaction $i$.\n",
    "* $\\nu_{i,j}^{\\prime\\prime}$ is the **product** coefficient of species $j$ in reaction $i$.\n",
    "* $X_j$ simplly denotes species $j$ in the reaction.\n",
    "* Most of the $\\nu$ are zero, since most reactions only involve a very few species.\n",
    "\n",
    "#### Matrix form\n",
    "<font color=\"blue\">\n",
    "$$[V^{\\prime}]\\mathbf{X} \\rightleftharpoons [V^{\\prime\\prime}]\\mathbf{X}$$\n",
    "</font>\n",
    "\n",
    "* $[V^{\\prime}]$ has $N_{rxns}$ rows, and $N_{sp}$ columns. $[V^{\\prime\\prime}]$ also.\n",
    "* $\\mathbf{X}$ is the vector of all species.\n",
    "\n",
    "#### Example: Hydrogen:\n",
    "* Species: $O_2$, $H_2$, $H_2O$, $HO_2$, $O$, $H$, $OH$, $M$\n",
    "* Reactions:\n",
    "$$H_2 + O_2 \\rightleftharpoons HO_2 + H$$\n",
    "$$H + O_2 \\rightleftharpoons OH + O$$\n",
    "$$OH  + H_2 \\rightleftharpoons H_2O + H$$\n",
    "$$H  + O_2 + M \\rightleftharpoons HO_2 + M$$\n",
    "\n",
    "$[V^{\\prime}] = $\n",
    "\n",
    "\n",
    "| Rxn | $O_2$| $H_2$| $H_2O$| $HO_2$| $O$| $H$| $OH$| $M$ |\n",
    "|-----|------|------|-------|-------|----|----|-----|-----|\n",
    "| 1   |1     |1     |   0   | 0     | 0  |0   |0    |0    |\n",
    "| 2   |1     |  0   |   0   | 0     | 0  |1   |0    |0    |\n",
    "| 3   |    0 |1     |   0   | 0     | 0  |0   |1    |0    |\n",
    "| 4   |1     |  0   |   0   | 0     | 0  |1   |0    |1    |\n",
    "\n",
    "$[V^{\\prime\\prime}] = $\n",
    "\n",
    "| Rxn | $O_2$| $H_2$| $H_2O$| $HO_2$| $O$| $H$| $OH$| $M$ |\n",
    "|-----|------|------|-------|-------|----|----|-----|-----|\n",
    "| 1   |  0   |  0   |  0    |1      | 0  |1   | 0   | 0   |\n",
    "| 2   |  0   |  0   |  0    |  0    |1   | 0  |1    | 0   |\n",
    "| 3   |  0   |  0   |1      |  0    | 0  |1   | 0   | 0   |\n",
    "| 4   |  0   |  0   |  0    |1      | 0  | 0  | 0   |1    |"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Reaction rates\n",
    "\n",
    "* Reaction rates are (forward rate) - (reverse rate)\n",
    "\n",
    "<font color=\"blue\">\n",
    "$$R_{f,i} = k_{f,i}\\prod_{j=1}^{N_{sp}}[X_j]^{\\nu_{i,j}^{\\prime}}$$\n",
    "$$R_{r,i} = k_{r,i}\\prod_{j=1}^{N_{sp}}[X_j]^{\\nu_{i,j}^{\\prime\\prime}}$$\n",
    "</font>\n",
    "\n",
    "* For the reaction $$ aA + bB \\rightleftharpoons cC + dD,$$ we have\n",
    "$$R_f = k_f[A]^a[B]^b[C]^0[D]^0 = k_f[A]^a[B]^b,$$\n",
    "$$R_r = k_r[A]^0[B]^0[C]^c[D]^d = k_r[C]^c[D]^d.$$\n",
    "\n",
    "* The net rate for each reaction $i$ is called the **rate of progress variable**, and is given by\n",
    "<font color=\"blue\">\n",
    "$$q_i = R_{f,i} - R_{r,i}$$\n",
    "</font>\n",
    "\n",
    "* The net reaction rate for species $j$ is then \n",
    "$$\\dot{\\omega}_j = \\sum_{i=1}^{N_{rxns}}\\underbrace{(\\nu_{i,j}^{\\prime\\prime}-\\nu_{i,j}^{\\prime})}_{\\nu_{i,j}}q_i$$\n",
    "Or,\n",
    "\n",
    "<font color=\"blue\">\n",
    "$$\\boldsymbol{\\omega} = [V]^T\\mathbf{q},$$\n",
    "</font>\n",
    "\n",
    "where the elements of $[V]$ are $\\nu_{i,j}^{\\prime\\prime}-\\nu_{i,j}^{\\prime}$.\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Reverse reaction rate constants\n",
    "\n",
    "* Reaction rate constants are independent of composition.\n",
    "* Hence, for a reaction at equilibrium, $q_i=R_{f,i}-R_{r,i}=0$. \n",
    "* This gives $R_{f,i}=R_{r,i}$, or\n",
    "$$k_{f,i}\\prod_j[X_j]^{\\nu_{i,j}^\\prime} = k_{r,i}\\prod_j[X_j]^{\\nu_{i,j}^{\\prime\\prime}}$$\n",
    "$$\\frac{k_{f,i}}{k_{r,i}} = \\prod_j[X_j]^{\\nu_{i,j}} = \\prod_j\\left[\\frac{P_i}{RT}\\right]^{\\nu_{i,j}}\n",
    "= \\prod_j\\left[\\frac{P_i}{P_o}\\right]^{\\nu_{i,j}}\\left[\\frac{P_o}{RT}\\right]^{\\nu_{i,j}}\n",
    "= K_{eq}\\prod_j\\left[\\frac{P_o}{RT}\\right]^{\\nu_{i,j}} = K_c$$\n",
    "\n",
    "<font color=\"blue\">\n",
    "$$\\frac{k_{f,i}}{k_{r,i}} = K_c = K_{eq}\\prod_j\\left[\\frac{P_o}{RT}\\right]^{\\nu_{i,j}}$$\n",
    "</font>\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Quasi-steady-state approximation (QSSA)\n",
    "\n",
    "* Fast reacting species, like radical intermediates may be formed and destroyed very fast relative to other species.\n",
    "* Assume that the fast species are in steady state relative to the slower species.\n",
    "\n",
    "### Zeldovich Mechanism\n",
    "\n",
    "$$O + N_2 \\rightarrow NO + N\\phantom{xxxxx}\\text{slow}$$\n",
    "$$N + O_2 \\rightarrow NO + O\\phantom{xxxxx}\\text{fast}$$\n",
    "\n",
    "$$\\frac{d[N]}{dt} = k_1[O][N_2] - k_2[N][O_2] = 0$$\n",
    "Solve this for $[N]$\n",
    "\n",
    "<font color=\"blue\">\n",
    "$$[N]_{ss} = \\frac{k_1}{k_2}\\frac{[O][N_2]}{[O_2]}.$$\n",
    "</font>\n",
    "\n",
    "* We have replaced an ODE with an algebraic expression for $[N]$ in terms of other species.\n",
    "* $[N]_{ss}$ is a function of time though, through the time dependence of $[O]$, $[N_2]$, and $[O_2]$.\n",
    "\n",
    "## Partial equilibrium\n",
    "\n",
    "* We can also treat fast reactions as if they were in equilibrium (see Turns).\n",
    "* This again leads to algebraic expressions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "hide_input": false,
  "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"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
