SuperFast Gas-Phase Atmospheric Chemical Mechanism
The Super Fast Chemical Mechanism is one of the simplest representations of atmospheric chemistry. It can efficiently simulate background tropospheric ozone chemistry and perform well for those species included in the mechanism. The chemical equations used are included in the supporting table S2 of the paper, "Evaluating simplified chemical mechanisms within present-day simulations of the Community Earth System Model version 1.2 with CAM4 (CESM1.2 CAM-chem): MOZART-4 vs. Reduced Hydrocarbon vs. Super-Fast chemistry" (2018), Benjamin Brown-Steiner, Noelle E. Selin, Ronald G. Prinn, Simone Tilmes, Louisa Emmons, Jean-François Lamarque, and Philip Cameron-Smith.
Illustrative Example
Here is a simple example of initializing the SuperFast model and running a simulation. First, we can look at the reaction equations:
using GasChem, EarthSciMLBase, ModelingToolkit
using DynamicQuantities, DifferentialEquations
using Catalyst
using Plots
using ModelingToolkit:t
model = SuperFast()
\[ \begin{align} \frac{\mathrm{d} \mathtt{O3}\left( t \right)}{\mathrm{d}t} &= \mathtt{jNO2} \mathtt{NO2}\left( t \right) - \mathtt{jO32OH} \mathtt{O3}\left( t \right) - \mathtt{ISOP}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius21.k}\left( t \right) - \mathtt{NO}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius6.k}\left( t \right) - \mathtt{O3}\left( t \right) \mathtt{arrhenius2.k}\left( t \right) \mathtt{HO2}\left( t \right) - \mathtt{O3}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius1.k}\left( t \right) \\ \frac{\mathrm{d} \mathtt{OH}\left( t \right)}{\mathrm{d}t} &= \mathtt{jCH3OOH} \mathtt{CH3OOH}\left( t \right) + 2 \mathtt{jH2O2} \mathtt{H2O2}\left( t \right) + 2 \mathtt{jO32OH} \mathtt{O3}\left( t \right) - \mathtt{CH4} \mathtt{arrhenius9.k}\left( t \right) \mathtt{OH}\left( t \right) - \mathtt{ISOP}\left( t \right) \mathtt{arrhenius18.k}\left( t \right) \mathtt{OH}\left( t \right) - 0.5 \mathtt{ISOP}\left( t \right) \mathtt{arrhenius20.k}\left( t \right) \mathtt{OH}\left( t \right) - \mathtt{ISOP}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius19.k}\left( t \right) + \mathtt{arrhenius7.k}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{HO2}\left( t \right) - \mathtt{rate\_OHCO10.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{CO}\left( t \right) - \mathtt{H2O2}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius5.k}\left( t \right) - \mathtt{NO2}\left( t \right) \mathtt{arr\_3rdbody8.k}\left( t \right) \mathtt{OH}\left( t \right) - \mathtt{arrhenius11.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{CH2O}\left( t \right) - \mathtt{CH3OOH}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius13.k}\left( t \right) + \mathtt{O3}\left( t \right) \mathtt{arrhenius2.k}\left( t \right) \mathtt{HO2}\left( t \right) - \mathtt{O3}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius1.k}\left( t \right) - \mathtt{arrhenius3.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{HO2}\left( t \right) \\ \frac{\mathrm{d} \mathtt{HO2}\left( t \right)}{\mathrm{d}t} &= 2 \mathtt{jCH2Oa} \mathtt{CH2O}\left( t \right) + \mathtt{jCH3OOH} \mathtt{CH3OOH}\left( t \right) + 0.06 \mathtt{ISOP}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius21.k}\left( t \right) - \mathtt{arrhenius7.k}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{HO2}\left( t \right) + \mathtt{rate\_OHCO10.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{CO}\left( t \right) + 0.8 \left( \mathtt{CH3O2}\left( t \right) \right)^{2} \mathtt{arrhenius16.k}\left( t \right) + \mathtt{CH3O2}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{arrhenius15.k}\left( t \right) - \mathtt{CH3O2}\left( t \right) \mathtt{HO2}\left( t \right) \mathtt{arrhenius12.k}\left( t \right) + \mathtt{H2O2}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius5.k}\left( t \right) + \mathtt{arrhenius11.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{CH2O}\left( t \right) - \mathtt{O3}\left( t \right) \mathtt{arrhenius2.k}\left( t \right) \mathtt{HO2}\left( t \right) + \mathtt{O3}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius1.k}\left( t \right) - \mathtt{arrhenius3.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{HO2}\left( t \right) - 2 \left( \mathtt{HO2}\left( t \right) \right)^{2} \mathtt{rate\_HO2HO24.k}\left( t \right) \\ \frac{\mathrm{d} \mathtt{NO}\left( t \right)}{\mathrm{d}t} &= \mathtt{jNO2} \mathtt{NO2}\left( t \right) - \mathtt{arrhenius7.k}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{HO2}\left( t \right) - \mathtt{CH3O2}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{arrhenius15.k}\left( t \right) - \mathtt{NO}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius6.k}\left( t \right) \\ \frac{\mathrm{d} \mathtt{NO2}\left( t \right)}{\mathrm{d}t} &= - \mathtt{jNO2} \mathtt{NO2}\left( t \right) - \mathtt{H2O} \mathtt{NO2}\left( t \right) \mathtt{rateconvert17.k}\left( t \right) + \mathtt{arrhenius7.k}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{HO2}\left( t \right) + \mathtt{CH3O2}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{arrhenius15.k}\left( t \right) + \mathtt{NO}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius6.k}\left( t \right) - \mathtt{NO2}\left( t \right) \mathtt{arr\_3rdbody8.k}\left( t \right) \mathtt{OH}\left( t \right) \\ \frac{\mathrm{d} \mathtt{CH3O2}\left( t \right)}{\mathrm{d}t} &= \mathtt{CH4} \mathtt{arrhenius9.k}\left( t \right) \mathtt{OH}\left( t \right) + 2 \mathtt{ISOP}\left( t \right) \mathtt{arrhenius18.k}\left( t \right) \mathtt{OH}\left( t \right) + 1.86 \mathtt{ISOP}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius21.k}\left( t \right) - 2 \left( \mathtt{CH3O2}\left( t \right) \right)^{2} \mathtt{arrhenius16.k}\left( t \right) - \mathtt{CH3O2}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{arrhenius15.k}\left( t \right) - \mathtt{CH3O2}\left( t \right) \mathtt{HO2}\left( t \right) \mathtt{arrhenius12.k}\left( t \right) + \mathtt{CH3OOH}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius13.k}\left( t \right) \\ \frac{\mathrm{d} \mathtt{CH2O}\left( t \right)}{\mathrm{d}t} &= - \mathtt{jCH2Oa} \mathtt{CH2O}\left( t \right) - \mathtt{jCH2Ob} \mathtt{CH2O}\left( t \right) + \mathtt{jCH3OOH} \mathtt{CH3OOH}\left( t \right) + 0.87 \mathtt{ISOP}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius21.k}\left( t \right) + 2 \left( \mathtt{CH3O2}\left( t \right) \right)^{2} \mathtt{arrhenius16.k}\left( t \right) + \mathtt{CH3O2}\left( t \right) \mathtt{NO}\left( t \right) \mathtt{arrhenius15.k}\left( t \right) - \mathtt{arrhenius11.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{CH2O}\left( t \right) + \mathtt{arrhenius14.k}\left( t \right) \mathtt{CH3OOH}\left( t \right) \mathtt{OH}\left( t \right) \\ \frac{\mathrm{d} \mathtt{CO}\left( t \right)}{\mathrm{d}t} &= \mathtt{jCH2Oa} \mathtt{CH2O}\left( t \right) + \mathtt{jCH2Ob} \mathtt{CH2O}\left( t \right) + 0.05 \mathtt{ISOP}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius21.k}\left( t \right) - \mathtt{rate\_OHCO10.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{CO}\left( t \right) + \mathtt{arrhenius11.k}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{CH2O}\left( t \right) \\ \frac{\mathrm{d} \mathtt{CH3OOH}\left( t \right)}{\mathrm{d}t} &= - \mathtt{jCH3OOH} \mathtt{CH3OOH}\left( t \right) + \mathtt{CH3O2}\left( t \right) \mathtt{HO2}\left( t \right) \mathtt{arrhenius12.k}\left( t \right) - \mathtt{arrhenius14.k}\left( t \right) \mathtt{CH3OOH}\left( t \right) \mathtt{OH}\left( t \right) - \mathtt{CH3OOH}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius13.k}\left( t \right) \\ \frac{\mathrm{d} \mathtt{ISOP}\left( t \right)}{\mathrm{d}t} &= - \mathtt{ISOP}\left( t \right) \mathtt{arrhenius18.k}\left( t \right) \mathtt{OH}\left( t \right) - \mathtt{ISOP}\left( t \right) \mathtt{O3}\left( t \right) \mathtt{arrhenius21.k}\left( t \right) \\ \frac{\mathrm{d} \mathtt{H2O2}\left( t \right)}{\mathrm{d}t} &= - \mathtt{jH2O2} \mathtt{H2O2}\left( t \right) - \mathtt{H2O2}\left( t \right) \mathtt{OH}\left( t \right) \mathtt{arrhenius5.k}\left( t \right) + \left( \mathtt{HO2}\left( t \right) \right)^{2} \mathtt{rate\_HO2HO24.k}\left( t \right) \\ \frac{\mathrm{d} \mathtt{HNO3}\left( t \right)}{\mathrm{d}t} &= 0.5 \mathtt{H2O} \mathtt{NO2}\left( t \right) \mathtt{rateconvert17.k}\left( t \right) + \mathtt{NO2}\left( t \right) \mathtt{arr\_3rdbody8.k}\left( t \right) \mathtt{OH}\left( t \right) \\ \mathtt{arrhenius1.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius1.K\_300}}{T} \right)^{\mathtt{arrhenius1.b0}} P \mathtt{arrhenius1.A} \mathtt{arrhenius1.a0} \mathtt{arrhenius1.ppb\_unit} e^{\frac{\mathtt{arrhenius1.c0}}{T}}}{T \mathtt{arrhenius1.R}} \\ \mathtt{arrhenius2.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius2.K\_300}}{T} \right)^{\mathtt{arrhenius2.b0}} P \mathtt{arrhenius2.A} \mathtt{arrhenius2.a0} \mathtt{arrhenius2.ppb\_unit} e^{\frac{\mathtt{arrhenius2.c0}}{T}}}{T \mathtt{arrhenius2.R}} \\ \mathtt{arrhenius3.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius3.K\_300}}{T} \right)^{\mathtt{arrhenius3.b0}} P \mathtt{arrhenius3.A} \mathtt{arrhenius3.a0} \mathtt{arrhenius3.ppb\_unit} e^{\frac{\mathtt{arrhenius3.c0}}{T}}}{T \mathtt{arrhenius3.R}} \\ \mathtt{rate\_HO2HO24.k}\left( t \right) &= \left( 1 + \frac{1.4 \cdot 10^{-30} \mathtt{H2O}^{2} P \mathtt{rate\_HO2HO24.A} \mathtt{rate\_HO2HO24.num\_density\_unit\_inv} \mathtt{rate\_HO2HO24.ppb\_inv} e^{\frac{\mathtt{rate\_HO2HO24.T\_0}}{T}}}{T \mathtt{rate\_HO2HO24.R}} \right) \left( \frac{P \mathtt{rate\_HO2HO24.A} \mathtt{rate\_HO2HO24.num\_density\_unit\_inv} \mathtt{rate\_HO2HO24.k1.k}\left( t \right)}{T \mathtt{rate\_HO2HO24.R}} + \mathtt{rate\_HO2HO24.k0.k}\left( t \right) \right) \\ \mathtt{rate\_HO2HO24.k0.k}\left( t \right) &= \frac{\left( \frac{\mathtt{rate\_HO2HO24.k0.K\_300}}{T} \right)^{\mathtt{rate\_HO2HO24.k0.b0}} P \mathtt{rate\_HO2HO24.k0.A} \mathtt{rate\_HO2HO24.k0.a0} \mathtt{rate\_HO2HO24.k0.ppb\_unit} e^{\frac{\mathtt{rate\_HO2HO24.k0.c0}}{T}}}{T \mathtt{rate\_HO2HO24.k0.R}} \\ \mathtt{rate\_HO2HO24.k1.k}\left( t \right) &= \frac{\left( \frac{\mathtt{rate\_HO2HO24.k1.K\_300}}{T} \right)^{\mathtt{rate\_HO2HO24.k1.b0}} P \mathtt{rate\_HO2HO24.k1.A} \mathtt{rate\_HO2HO24.k1.a0} \mathtt{rate\_HO2HO24.k1.ppb\_unit} e^{\frac{\mathtt{rate\_HO2HO24.k1.c0}}{T}}}{T \mathtt{rate\_HO2HO24.k1.R}} \\ \mathtt{arrhenius5.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius5.K\_300}}{T} \right)^{\mathtt{arrhenius5.b0}} P \mathtt{arrhenius5.A} \mathtt{arrhenius5.a0} \mathtt{arrhenius5.ppb\_unit} e^{\frac{\mathtt{arrhenius5.c0}}{T}}}{T \mathtt{arrhenius5.R}} \\ \mathtt{arrhenius6.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius6.K\_300}}{T} \right)^{\mathtt{arrhenius6.b0}} P \mathtt{arrhenius6.A} \mathtt{arrhenius6.a0} \mathtt{arrhenius6.ppb\_unit} e^{\frac{\mathtt{arrhenius6.c0}}{T}}}{T \mathtt{arrhenius6.R}} \\ \mathtt{arrhenius7.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius7.K\_300}}{T} \right)^{\mathtt{arrhenius7.b0}} P \mathtt{arrhenius7.A} \mathtt{arrhenius7.a0} \mathtt{arrhenius7.ppb\_unit} e^{\frac{\mathtt{arrhenius7.c0}}{T}}}{T \mathtt{arrhenius7.R}} \\ \mathtt{arr\_3rdbody8.k}\left( t \right) &= \frac{0.6^{\frac{1}{1 + \left( \log_{10}\left( \frac{P \mathtt{arr\_3rdbody8.A} \mathtt{arr\_3rdbody8.num\_density\_unit\_inv} \mathtt{arr\_3rdbody8.alow.k}\left( t \right)}{T \mathtt{arr\_3rdbody8.R} \mathtt{arr\_3rdbody8.ahigh.k}\left( t \right)} \right) \right)^{2}}} P \mathtt{arr\_3rdbody8.A} \mathtt{arr\_3rdbody8.num\_density\_unit\_inv} \mathtt{arr\_3rdbody8.alow.k}\left( t \right)}{T \mathtt{arr\_3rdbody8.R} \left( 1 + \frac{P \mathtt{arr\_3rdbody8.A} \mathtt{arr\_3rdbody8.num\_density\_unit\_inv} \mathtt{arr\_3rdbody8.alow.k}\left( t \right)}{T \mathtt{arr\_3rdbody8.R} \mathtt{arr\_3rdbody8.ahigh.k}\left( t \right)} \right)} \\ \mathtt{arr\_3rdbody8.alow.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arr\_3rdbody8.alow.K\_300}}{T} \right)^{\mathtt{arr\_3rdbody8.alow.b0}} P \mathtt{arr\_3rdbody8.alow.A} \mathtt{arr\_3rdbody8.alow.a0} \mathtt{arr\_3rdbody8.alow.ppb\_unit} e^{\frac{\mathtt{arr\_3rdbody8.alow.c0}}{T}}}{T \mathtt{arr\_3rdbody8.alow.R}} \\ \mathtt{arr\_3rdbody8.ahigh.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arr\_3rdbody8.ahigh.K\_300}}{T} \right)^{\mathtt{arr\_3rdbody8.ahigh.b0}} P \mathtt{arr\_3rdbody8.ahigh.A} \mathtt{arr\_3rdbody8.ahigh.a0} \mathtt{arr\_3rdbody8.ahigh.ppb\_unit} e^{\frac{\mathtt{arr\_3rdbody8.ahigh.c0}}{T}}}{T \mathtt{arr\_3rdbody8.ahigh.R}} \\ \mathtt{arrhenius9.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius9.K\_300}}{T} \right)^{\mathtt{arrhenius9.b0}} P \mathtt{arrhenius9.A} \mathtt{arrhenius9.a0} \mathtt{arrhenius9.ppb\_unit} e^{\frac{\mathtt{arrhenius9.c0}}{T}}}{T \mathtt{arrhenius9.R}} \\ \mathtt{rate\_OHCO10.k}\left( t \right) &= \frac{0.6^{\frac{1}{1 + \left( \log_{10}\left( \frac{P \mathtt{rate\_OHCO10.A} \mathtt{rate\_OHCO10.num\_density\_unit\_inv} \mathtt{rate\_OHCO10.klo2.k}\left( t \right)}{T \mathtt{rate\_OHCO10.R} \mathtt{rate\_OHCO10.khi2.k}\left( t \right)} \right) \right)^{2}}} \mathtt{rate\_OHCO10.klo2.k}\left( t \right)}{1 + \frac{P \mathtt{rate\_OHCO10.A} \mathtt{rate\_OHCO10.num\_density\_unit\_inv} \mathtt{rate\_OHCO10.klo2.k}\left( t \right)}{T \mathtt{rate\_OHCO10.R} \mathtt{rate\_OHCO10.khi2.k}\left( t \right)}} + \frac{0.6^{\frac{1}{1 + \left( \log_{10}\left( \frac{P \mathtt{rate\_OHCO10.A} \mathtt{rate\_OHCO10.num\_density\_unit\_inv} \mathtt{rate\_OHCO10.klo1.k}\left( t \right)}{T \mathtt{rate\_OHCO10.R} \mathtt{rate\_OHCO10.khi1.k}\left( t \right)} \right) \right)^{2}}} P \mathtt{rate\_OHCO10.A} \mathtt{rate\_OHCO10.num\_density\_unit\_inv} \mathtt{rate\_OHCO10.klo1.k}\left( t \right)}{T \mathtt{rate\_OHCO10.R} \left( 1 + \frac{P \mathtt{rate\_OHCO10.A} \mathtt{rate\_OHCO10.num\_density\_unit\_inv} \mathtt{rate\_OHCO10.klo1.k}\left( t \right)}{T \mathtt{rate\_OHCO10.R} \mathtt{rate\_OHCO10.khi1.k}\left( t \right)} \right)} \\ \mathtt{rate\_OHCO10.klo1.k}\left( t \right) &= \frac{\left( \frac{\mathtt{rate\_OHCO10.klo1.K\_300}}{T} \right)^{\mathtt{rate\_OHCO10.klo1.b0}} P \mathtt{rate\_OHCO10.klo1.A} \mathtt{rate\_OHCO10.klo1.a0} \mathtt{rate\_OHCO10.klo1.ppb\_unit} e^{\frac{\mathtt{rate\_OHCO10.klo1.c0}}{T}}}{T \mathtt{rate\_OHCO10.klo1.R}} \\ \mathtt{rate\_OHCO10.khi1.k}\left( t \right) &= \frac{\left( \frac{\mathtt{rate\_OHCO10.khi1.K\_300}}{T} \right)^{\mathtt{rate\_OHCO10.khi1.b0}} P \mathtt{rate\_OHCO10.khi1.A} \mathtt{rate\_OHCO10.khi1.a0} \mathtt{rate\_OHCO10.khi1.ppb\_unit} e^{\frac{\mathtt{rate\_OHCO10.khi1.c0}}{T}}}{T \mathtt{rate\_OHCO10.khi1.R}} \\ \mathtt{rate\_OHCO10.klo2.k}\left( t \right) &= \frac{\left( \frac{\mathtt{rate\_OHCO10.klo2.K\_300}}{T} \right)^{\mathtt{rate\_OHCO10.klo2.b0}} P \mathtt{rate\_OHCO10.klo2.A} \mathtt{rate\_OHCO10.klo2.a0} \mathtt{rate\_OHCO10.klo2.ppb\_unit} e^{\frac{\mathtt{rate\_OHCO10.klo2.c0}}{T}}}{T \mathtt{rate\_OHCO10.klo2.R}} \\ \mathtt{rate\_OHCO10.khi2.k}\left( t \right) &= \frac{\left( \frac{\mathtt{rate\_OHCO10.khi2.K\_300}}{T} \right)^{\mathtt{rate\_OHCO10.khi2.b0}} P \mathtt{rate\_OHCO10.khi2.A} \mathtt{rate\_OHCO10.khi2.a0} \mathtt{rate\_OHCO10.khi2.ppb\_unit} e^{\frac{\mathtt{rate\_OHCO10.khi2.c0}}{T}}}{T \mathtt{rate\_OHCO10.khi2.R}} \\ \mathtt{arrhenius11.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius11.K\_300}}{T} \right)^{\mathtt{arrhenius11.b0}} P \mathtt{arrhenius11.A} \mathtt{arrhenius11.a0} \mathtt{arrhenius11.ppb\_unit} e^{\frac{\mathtt{arrhenius11.c0}}{T}}}{T \mathtt{arrhenius11.R}} \\ \mathtt{arrhenius12.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius12.K\_300}}{T} \right)^{\mathtt{arrhenius12.b0}} P \mathtt{arrhenius12.A} \mathtt{arrhenius12.a0} \mathtt{arrhenius12.ppb\_unit} e^{\frac{\mathtt{arrhenius12.c0}}{T}}}{T \mathtt{arrhenius12.R}} \\ \mathtt{arrhenius13.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius13.K\_300}}{T} \right)^{\mathtt{arrhenius13.b0}} P \mathtt{arrhenius13.A} \mathtt{arrhenius13.a0} \mathtt{arrhenius13.ppb\_unit} e^{\frac{\mathtt{arrhenius13.c0}}{T}}}{T \mathtt{arrhenius13.R}} \\ \mathtt{arrhenius14.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius14.K\_300}}{T} \right)^{\mathtt{arrhenius14.b0}} P \mathtt{arrhenius14.A} \mathtt{arrhenius14.a0} \mathtt{arrhenius14.ppb\_unit} e^{\frac{\mathtt{arrhenius14.c0}}{T}}}{T \mathtt{arrhenius14.R}} \\ \mathtt{arrhenius15.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius15.K\_300}}{T} \right)^{\mathtt{arrhenius15.b0}} P \mathtt{arrhenius15.A} \mathtt{arrhenius15.a0} \mathtt{arrhenius15.ppb\_unit} e^{\frac{\mathtt{arrhenius15.c0}}{T}}}{T \mathtt{arrhenius15.R}} \\ \mathtt{arrhenius16.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius16.K\_300}}{T} \right)^{\mathtt{arrhenius16.b0}} P \mathtt{arrhenius16.A} \mathtt{arrhenius16.a0} \mathtt{arrhenius16.ppb\_unit} e^{\frac{\mathtt{arrhenius16.c0}}{T}}}{T \mathtt{arrhenius16.R}} \\ \mathtt{rateconvert17.k}\left( t \right) &= \frac{P \mathtt{rateconvert17.A} \mathtt{rateconvert17.a0} \mathtt{rateconvert17.ppb\_unit}}{T \mathtt{rateconvert17.R}} \\ \mathtt{arrhenius18.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius18.K\_300}}{T} \right)^{\mathtt{arrhenius18.b0}} P \mathtt{arrhenius18.A} \mathtt{arrhenius18.a0} \mathtt{arrhenius18.ppb\_unit} e^{\frac{\mathtt{arrhenius18.c0}}{T}}}{T \mathtt{arrhenius18.R}} \\ \mathtt{arrhenius19.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius19.K\_300}}{T} \right)^{\mathtt{arrhenius19.b0}} P \mathtt{arrhenius19.A} \mathtt{arrhenius19.a0} \mathtt{arrhenius19.ppb\_unit} e^{\frac{\mathtt{arrhenius19.c0}}{T}}}{T \mathtt{arrhenius19.R}} \\ \mathtt{arrhenius20.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius20.K\_300}}{T} \right)^{\mathtt{arrhenius20.b0}} P \mathtt{arrhenius20.A} \mathtt{arrhenius20.a0} \mathtt{arrhenius20.ppb\_unit} e^{\frac{\mathtt{arrhenius20.c0}}{T}}}{T \mathtt{arrhenius20.R}} \\ \mathtt{arrhenius21.k}\left( t \right) &= \frac{\left( \frac{\mathtt{arrhenius21.K\_300}}{T} \right)^{\mathtt{arrhenius21.b0}} P \mathtt{arrhenius21.A} \mathtt{arrhenius21.a0} \mathtt{arrhenius21.ppb\_unit} e^{\frac{\mathtt{arrhenius21.c0}}{T}}}{T \mathtt{arrhenius21.R}} \end{align} \]
We can also look at them as a graph:
Graph(SuperFast(;name=:SuperFast, rxn_sys=true))
Variables and parameters
The chemical species included in the superfast model are:
vars = unknowns(model)[1:12]
using DataFrames
DataFrame(
:Name => [string(Symbolics.tosymbol(v, escape=false)) for v ∈ vars],
:Units => [ModelingToolkit.get_unit(v) for v ∈ vars],
:Description => [ModelingToolkit.getdescription(v) for v ∈ vars],
:Default => [ModelingToolkit.getdefault(v) for v ∈ vars])
Row | Name | Units | Description | Default |
---|---|---|---|---|
String | Quantity… | String | Float64 | |
1 | O3 | 1.0 | 20.0 | |
2 | OH | 1.0 | 0.01 | |
3 | HO2 | 1.0 | 0.01 | |
4 | NO | 1.0 | 10.0 | |
5 | NO2 | 1.0 | 10.0 | |
6 | CH3O2 | 1.0 | 0.01 | |
7 | CH2O | 1.0 | 0.15 | |
8 | CO | 1.0 | 275.0 | |
9 | CH3OOH | 1.0 | 1.6 | |
10 | ISOP | 1.0 | 0.15 | |
11 | H2O2 | 1.0 | 2.34 | |
12 | HNO3 | 1.0 | 10.0 |
And here are the parameters:
vars = parameters(model)
DataFrame(
:Name => [string(Symbolics.tosymbol(v, escape=false)) for v ∈ vars],
:Units => [ModelingToolkit.get_unit(v) for v ∈ vars],
:Description => [ModelingToolkit.getdescription(v) for v ∈ vars],
:Default => [ModelingToolkit.getdefault(v) for v ∈ vars])
Row | Name | Units | Description | Default |
---|---|---|---|---|
String | Quantity… | String | Real | |
1 | jO32OH | 1.0 s⁻¹ | 0.000227 | |
2 | jH2O2 | 1.0 s⁻¹ | 1.0097e-5 | |
3 | jNO2 | 1.0 s⁻¹ | 0.0149 | |
4 | jCH2Oa | 1.0 s⁻¹ | 0.00014 | |
5 | jCH2Ob | 1.0 s⁻¹ | 0.00014 | |
6 | jCH3OOH | 1.0 s⁻¹ | 8.9573e-6 | |
7 | T | 1.0 K | Temperature | 280.0 |
8 | P | 1.0 m⁻¹ kg s⁻² | Pressure | 101325 |
9 | O2 | 1.0 | 2.1e8 | |
10 | CH4 | 1.0 | 1700.0 | |
11 | H2O | 1.0 | 450.0 |
Running simulations
We can run simulations with the model, optionally changing the initial conditions and parameters. For example, we can change the initial concentration of O₃ to 15 ppb and the temperature to 293K:
sys = structural_simplify(model)
tspan = (0.0, 3600*24)
# Change the initial concentration of O₃ to 15 ppb and the temperature to 293K.
prob = ODEProblem(sys, [sys.O3 => 15], tspan, [sys.T => 293])
ODEProblem with uType Vector{Float64} and tType Float64. In-place: true
Initialization status: FULLY_DETERMINED
Non-trivial mass matrix: false
timespan: (0.0, 86400.0)
u0: 12-element Vector{Float64}:
15.0
0.01
0.01
10.0
10.0
0.01
0.15
275.0
1.6
0.15
2.34
10.0
Now we can solve the system and plot the result:
sol = solve(prob, AutoTsit5(Rosenbrock23()), saveat=10.0)
plot(sol, ylim = (0,50), xlabel = "Time", ylabel = "Concentration (ppb)", legend=:outerright)
Finally let's run some simulations with different values for parameter T
.
sol1 = solve(ODEProblem(sys, [], tspan, [sys.T => 273]),
AutoTsit5(Rosenbrock23()), saveat=10.0)
sol2 = solve(ODEProblem(sys, [], tspan, [sys.T => 298]),
AutoTsit5(Rosenbrock23()), saveat=10.0)
plot([sol1[sys.O3], sol2[sys.O3]], label = ["T=273K" "T=298K"],
title = "Change of O3 concentration at different temperatures",
xlabel="Time (second)", ylabel="concentration (ppb)")