From 297edce5481a4e115df45f1e9b85ae93e9f5116b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gijs=20Vermari=C3=ABn?= Date: Fri, 13 Oct 2023 11:37:43 +0200 Subject: [PATCH] Deploy website - based on 02ea09c6245b677ba989d1ba05ddddb7293afa34 --- 3dpdr/index.html | 10 +++++----- 404.html | 10 +++++----- assets/js/0769f0fc.27806b34.js | 1 - assets/js/0aba1dff.32532089.js | 1 - assets/js/0dad24eb.4b90514c.js | 1 + assets/js/1465a325.77293bb0.js | 1 - assets/js/178ac850.f03290f8.js | 1 - assets/js/1b622d29.8650c532.js | 1 - assets/js/1c8e445f.ddb57b80.js | 1 + assets/js/2a453c93.53ffbef8.js | 1 - assets/js/2ceb8a1b.3a254222.js | 1 + assets/js/2f9c4060.d086ebd7.js | 1 + assets/js/3516fda9.6357e12b.js | 1 + assets/js/3ac08d0d.4cf4faf9.js | 1 + assets/js/5b2a0f0d.66ee4ab1.js | 1 - assets/js/5fc4a2b8.79a89988.js | 1 + assets/js/611d6b88.f89bce51.js | 1 + assets/js/634b82b7.90e86b81.js | 1 - assets/js/668339d9.ac7ce8bd.js | 1 - assets/js/6aaec6ca.bcc2e4c8.js | 1 - assets/js/73d53c58.33bf9a8e.js | 1 + assets/js/7b477ff2.45895960.js | 1 + assets/js/83622784.40db2821.js | 1 - assets/js/875220c9.ab0d4fda.js | 1 - assets/js/8880c86b.d9d60a81.js | 1 - assets/js/9341d4f2.9ddc9faa.js | 1 + assets/js/9516cbb3.60b8f789.js | 1 - assets/js/95d19e51.21857b8e.js | 1 + assets/js/a487fab1.1b65769f.js | 1 - assets/js/ab4c3ea7.b6531bf1.js | 1 + assets/js/ade0c702.1d88833a.js | 1 + assets/js/af160429.8610352e.js | 1 - assets/js/b0746780.49d05f02.js | 1 + assets/js/b1fe966c.7e92a482.js | 1 + assets/js/b362315f.334402b1.js | 1 + assets/js/b67b3120.295d1dad.js | 1 + assets/js/b7364548.cd8f8324.js | 1 - assets/js/b7893f8f.667ce999.js | 1 + assets/js/bad762d9.569937ab.js | 1 - assets/js/bc72a998.96156dda.js | 1 - assets/js/c2e3305b.4ec555b7.js | 1 + assets/js/c610bb95.9496d178.js | 1 - assets/js/c8dbf7c8.86115ef1.js | 1 + assets/js/cf6a431d.aeb14cb1.js | 1 - ...d226c097.a7367494.js => d226c097.32badf8f.js} | 2 +- assets/js/d26b1119.a5a3956a.js | 1 - assets/js/d26b1119.e35bc5a5.js | 1 + assets/js/dbebe280.fa1439de.js | 1 + assets/js/e0f39a39.7edc58d5.js | 1 - assets/js/e306a572.ad6adffa.js | 1 + assets/js/e3e9e529.8eab08f6.js | 1 - assets/js/f0775422.ce1d5da4.js | 1 - assets/js/f1ff4237.662444ea.js | 1 + assets/js/f364ae83.b6cb26a7.js | 1 - assets/js/f8942e5e.de93e01f.js | 1 + assets/js/f928d592.45b5fe16.js | 1 + assets/js/fe21a616.8e43114f.js | 1 - assets/js/main.33219f7a.js | 2 -- assets/js/main.3b378d82.js | 2 ++ ....LICENSE.txt => main.3b378d82.js.LICENSE.txt} | 0 assets/js/runtime~main.13000d0a.js | 1 - assets/js/runtime~main.ad7b0a30.js | 1 + blog/2018/02/05/david-grains/index.html | 10 +++++----- blog/2018/03/27/audrey-coms/index.html | 10 +++++----- blog/2018/06/20/izaskun-phosphorus/index.html | 10 +++++----- blog/2018/07/12/felix-collapse/index.html | 10 +++++----- blog/2019/04/19/serena-nitrogen-frac/index.html | 10 +++++----- blog/2019/07/08/felix-ambipolar/index.html | 10 +++++----- blog/2019/08/13/serena-carbon-frac/index.html | 10 +++++----- blog/2019/12/10/tom-shock/index.html | 10 +++++----- blog/2020/02/14/New-Website/index.html | 10 +++++----- blog/2020/12/07/milena-nitrogen-solis/index.html | 10 +++++----- blog/2022/02/06/holdship-hits/index.html | 10 +++++----- blog/2022/04/14/crir-ngc253/index.html | 10 +++++----- blog/2022/04/29/uclchem-v3/index.html | 10 +++++----- blog/archive/index.html | 10 +++++----- blog/index.html | 10 +++++----- blog/page/2/index.html | 10 +++++----- docs/bulk/index.html | 14 +++++++------- docs/category/chemistry/index.html | 14 +++++++------- docs/category/developer/index.html | 14 +++++++------- docs/category/getting-started/index.html | 14 +++++++------- docs/category/tutorials/index.html | 14 +++++++------- docs/chemical_analysis/index.html | 14 +++++++------- docs/desorb/index.html | 14 +++++++------- docs/dev-debugging/index.html | 14 +++++++------- docs/dev-overview/index.html | 14 +++++++------- docs/dev-python-wrap/index.html | 14 +++++++------- docs/dev-web/index.html | 14 +++++++------- docs/first_model/index.html | 14 +++++++------- docs/gas/index.html | 14 +++++++------- docs/grain/index.html | 14 +++++++------- docs/hydro/index.html | 14 +++++++------- docs/index.html | 16 ++++++++-------- docs/modelling_objects/index.html | 14 +++++++------- docs/network/index.html | 14 +++++++------- docs/next/bulk/index.html | 10 +++++----- docs/next/category/chemistry/index.html | 10 +++++----- docs/next/category/developer/index.html | 10 +++++----- docs/next/category/getting-started/index.html | 10 +++++----- docs/next/category/tutorials/index.html | 10 +++++----- docs/next/chemical_analysis/index.html | 10 +++++----- docs/next/desorb/index.html | 10 +++++----- docs/next/dev-debugging/index.html | 10 +++++----- docs/next/dev-overview/index.html | 10 +++++----- docs/next/dev-python-wrap/index.html | 10 +++++----- docs/next/dev-web/index.html | 10 +++++----- docs/next/first_model/index.html | 10 +++++----- docs/next/gas/index.html | 10 +++++----- docs/next/grain/index.html | 10 +++++----- docs/next/hydro/index.html | 10 +++++----- docs/next/index.html | 10 +++++----- docs/next/modelling_objects/index.html | 10 +++++----- docs/next/network/index.html | 10 +++++----- docs/next/notation/index.html | 10 +++++----- docs/next/parameters/index.html | 10 +++++----- docs/next/physics-cloud/index.html | 10 +++++----- docs/next/physics-collapse/index.html | 10 +++++----- docs/next/physics-core/index.html | 10 +++++----- docs/next/physics-hotcore/index.html | 10 +++++----- docs/next/physics-shocks/index.html | 10 +++++----- docs/next/pythonapi/index.html | 10 +++++----- docs/next/running_a_grid/index.html | 10 +++++----- docs/next/trouble-compile/index.html | 10 +++++----- docs/next/trouble-integration/index.html | 10 +++++----- docs/notation/index.html | 16 ++++++++-------- docs/parameters/index.html | 14 +++++++------- docs/physics-cloud/index.html | 14 +++++++------- docs/physics-collapse/index.html | 14 +++++++------- docs/physics-core/index.html | 14 +++++++------- docs/physics-hotcore/index.html | 14 +++++++------- docs/physics-shocks/index.html | 14 +++++++------- docs/pythonapi/index.html | 16 ++++++++-------- docs/running_a_grid/index.html | 14 +++++++------- docs/trouble-compile/index.html | 16 ++++++++-------- docs/trouble-integration/index.html | 14 +++++++------- docs/v3.1.0/bulk/index.html | 10 +++++----- docs/v3.1.0/category/chemistry/index.html | 10 +++++----- docs/v3.1.0/category/developer/index.html | 10 +++++----- docs/v3.1.0/category/getting-started/index.html | 10 +++++----- docs/v3.1.0/category/tutorials/index.html | 10 +++++----- docs/v3.1.0/chemical_analysis/index.html | 10 +++++----- docs/v3.1.0/desorb/index.html | 10 +++++----- docs/v3.1.0/dev-debugging/index.html | 10 +++++----- docs/v3.1.0/dev-overview/index.html | 10 +++++----- docs/v3.1.0/dev-python-wrap/index.html | 10 +++++----- docs/v3.1.0/dev-web/index.html | 10 +++++----- docs/v3.1.0/first_model/index.html | 10 +++++----- docs/v3.1.0/gas/index.html | 10 +++++----- docs/v3.1.0/grain/index.html | 10 +++++----- docs/v3.1.0/hydro/index.html | 10 +++++----- docs/v3.1.0/index.html | 10 +++++----- docs/v3.1.0/modelling_objects/index.html | 10 +++++----- docs/v3.1.0/network/index.html | 10 +++++----- docs/v3.1.0/parameters/index.html | 10 +++++----- docs/v3.1.0/physics-cloud/index.html | 10 +++++----- docs/v3.1.0/physics-collapse/index.html | 10 +++++----- docs/v3.1.0/physics-core/index.html | 10 +++++----- docs/v3.1.0/physics-hotcore/index.html | 10 +++++----- docs/v3.1.0/physics-shocks/index.html | 10 +++++----- docs/v3.1.0/pythonapi/index.html | 10 +++++----- docs/v3.1.0/running_a_grid/index.html | 10 +++++----- docs/v3.1.0/trouble-compile/index.html | 10 +++++----- docs/v3.1.0/trouble-integration/index.html | 10 +++++----- docs/v3.2.0/bulk/index.html | 10 +++++----- docs/v3.2.0/category/chemistry/index.html | 10 +++++----- docs/v3.2.0/category/developer/index.html | 10 +++++----- docs/v3.2.0/category/getting-started/index.html | 10 +++++----- docs/v3.2.0/category/tutorials/index.html | 10 +++++----- docs/v3.2.0/chemical_analysis/index.html | 10 +++++----- docs/v3.2.0/desorb/index.html | 10 +++++----- docs/v3.2.0/dev-debugging/index.html | 10 +++++----- docs/v3.2.0/dev-overview/index.html | 10 +++++----- docs/v3.2.0/dev-python-wrap/index.html | 10 +++++----- docs/v3.2.0/dev-web/index.html | 10 +++++----- docs/v3.2.0/first_model/index.html | 10 +++++----- docs/v3.2.0/gas/index.html | 10 +++++----- docs/v3.2.0/grain/index.html | 10 +++++----- docs/v3.2.0/hydro/index.html | 10 +++++----- docs/v3.2.0/index.html | 10 +++++----- docs/v3.2.0/modelling_objects/index.html | 10 +++++----- docs/v3.2.0/network/index.html | 10 +++++----- docs/v3.2.0/parameters/index.html | 10 +++++----- docs/v3.2.0/physics-cloud/index.html | 10 +++++----- docs/v3.2.0/physics-collapse/index.html | 10 +++++----- docs/v3.2.0/physics-core/index.html | 10 +++++----- docs/v3.2.0/physics-hotcore/index.html | 10 +++++----- docs/v3.2.0/physics-shocks/index.html | 10 +++++----- docs/v3.2.0/pythonapi/index.html | 10 +++++----- docs/v3.2.0/running_a_grid/index.html | 10 +++++----- docs/v3.2.0/trouble-compile/index.html | 10 +++++----- docs/v3.2.0/trouble-integration/index.html | 10 +++++----- emulators/index.html | 10 +++++----- help/index.html | 10 +++++----- index.html | 10 +++++----- othersoftware/index.html | 10 +++++----- ucl_pdr/index.html | 10 +++++----- uclchemcmc/index.html | 10 +++++----- users/index.html | 10 +++++----- 199 files changed, 788 insertions(+), 788 deletions(-) delete mode 100644 assets/js/0769f0fc.27806b34.js delete mode 100644 assets/js/0aba1dff.32532089.js create mode 100644 assets/js/0dad24eb.4b90514c.js delete mode 100644 assets/js/1465a325.77293bb0.js delete mode 100644 assets/js/178ac850.f03290f8.js delete mode 100644 assets/js/1b622d29.8650c532.js create mode 100644 assets/js/1c8e445f.ddb57b80.js delete mode 100644 assets/js/2a453c93.53ffbef8.js create mode 100644 assets/js/2ceb8a1b.3a254222.js create mode 100644 assets/js/2f9c4060.d086ebd7.js create mode 100644 assets/js/3516fda9.6357e12b.js create mode 100644 assets/js/3ac08d0d.4cf4faf9.js delete mode 100644 assets/js/5b2a0f0d.66ee4ab1.js create mode 100644 assets/js/5fc4a2b8.79a89988.js create mode 100644 assets/js/611d6b88.f89bce51.js delete mode 100644 assets/js/634b82b7.90e86b81.js delete mode 100644 assets/js/668339d9.ac7ce8bd.js delete mode 100644 assets/js/6aaec6ca.bcc2e4c8.js create mode 100644 assets/js/73d53c58.33bf9a8e.js create mode 100644 assets/js/7b477ff2.45895960.js delete mode 100644 assets/js/83622784.40db2821.js delete mode 100644 assets/js/875220c9.ab0d4fda.js delete mode 100644 assets/js/8880c86b.d9d60a81.js create mode 100644 assets/js/9341d4f2.9ddc9faa.js delete mode 100644 assets/js/9516cbb3.60b8f789.js create mode 100644 assets/js/95d19e51.21857b8e.js delete mode 100644 assets/js/a487fab1.1b65769f.js create mode 100644 assets/js/ab4c3ea7.b6531bf1.js create mode 100644 assets/js/ade0c702.1d88833a.js delete mode 100644 assets/js/af160429.8610352e.js create mode 100644 assets/js/b0746780.49d05f02.js create mode 100644 assets/js/b1fe966c.7e92a482.js create mode 100644 assets/js/b362315f.334402b1.js create mode 100644 assets/js/b67b3120.295d1dad.js delete mode 100644 assets/js/b7364548.cd8f8324.js create mode 100644 assets/js/b7893f8f.667ce999.js delete mode 100644 assets/js/bad762d9.569937ab.js delete mode 100644 assets/js/bc72a998.96156dda.js create mode 100644 assets/js/c2e3305b.4ec555b7.js delete mode 100644 assets/js/c610bb95.9496d178.js create mode 100644 assets/js/c8dbf7c8.86115ef1.js delete mode 100644 assets/js/cf6a431d.aeb14cb1.js rename assets/js/{d226c097.a7367494.js => d226c097.32badf8f.js} (99%) delete mode 100644 assets/js/d26b1119.a5a3956a.js create mode 100644 assets/js/d26b1119.e35bc5a5.js create mode 100644 assets/js/dbebe280.fa1439de.js delete mode 100644 assets/js/e0f39a39.7edc58d5.js create mode 100644 assets/js/e306a572.ad6adffa.js delete mode 100644 assets/js/e3e9e529.8eab08f6.js delete mode 100644 assets/js/f0775422.ce1d5da4.js create mode 100644 assets/js/f1ff4237.662444ea.js delete mode 100644 assets/js/f364ae83.b6cb26a7.js create mode 100644 assets/js/f8942e5e.de93e01f.js create mode 100644 assets/js/f928d592.45b5fe16.js delete mode 100644 assets/js/fe21a616.8e43114f.js delete mode 100644 assets/js/main.33219f7a.js create mode 100644 assets/js/main.3b378d82.js rename assets/js/{main.33219f7a.js.LICENSE.txt => main.3b378d82.js.LICENSE.txt} (100%) delete mode 100644 assets/js/runtime~main.13000d0a.js create mode 100644 assets/js/runtime~main.ad7b0a30.js diff --git a/3dpdr/index.html b/3dpdr/index.html index bcb1613f..9eefdcd1 100644 --- a/3dpdr/index.html +++ b/3dpdr/index.html @@ -13,13 +13,13 @@ - - + +
-
Skip to main content

3D-PDR is a three-dimensional photodissociation region code written in Fortran. It uses the Sundials package (written in C) to solve the set of ordinary differential equations and it is the successor of UCL_PDR, a one-dimensional PDR code written at UCL. Using the HEALpix ray-tracing scheme, 3D-PDR solves a three-dimensional escape probability routine and evaluates the attenuation of the far-ultraviolet radiation in the PDR and the propagation of FIR/submm emission lines out of the PDR.

The code is parallelized (OpenMP) and can be applied to 1D and 3D problems. The GitHub package includes: the 3D-PDR code, three different chemical networks (33, 58, and 128 species) and molecular data, the Sundials solver, and a set of various 1D uniform density clouds and a uniform density spherical distribution to test the 3D version of the code. To `make' 3D-PDR, you will first need to install the Sundials package and link 3D-PDR with the ODE solver. Please see the manual for instructions on how to do this step-by-step.

(Update: 23/04/2019) The file [3dpdr_cr.tar] that can be found in the main tarball, contains a totally new version of 3D-PDR treating cosmic-ray sources. This version was developed by Brandt Gaches [email: gaches .at. ph1.uni-koeln.de] and is presented in Gaches et al. (2019a). The tarball contains a short additional manual. Please contact Brandt Gaches for any question regarding this version.

3D-PDR works with the gfortran version 4.8.4 and the ifort version 14.0.4. Later compiler versions may require adjustments in the code.

- - +
Skip to main content

3D-PDR is a three-dimensional photodissociation region code written in Fortran. It uses the Sundials package (written in C) to solve the set of ordinary differential equations and it is the successor of UCL_PDR, a one-dimensional PDR code written at UCL. Using the HEALpix ray-tracing scheme, 3D-PDR solves a three-dimensional escape probability routine and evaluates the attenuation of the far-ultraviolet radiation in the PDR and the propagation of FIR/submm emission lines out of the PDR.

The code is parallelized (OpenMP) and can be applied to 1D and 3D problems. The GitHub package includes: the 3D-PDR code, three different chemical networks (33, 58, and 128 species) and molecular data, the Sundials solver, and a set of various 1D uniform density clouds and a uniform density spherical distribution to test the 3D version of the code. To `make' 3D-PDR, you will first need to install the Sundials package and link 3D-PDR with the ODE solver. Please see the manual for instructions on how to do this step-by-step.

(Update: 23/04/2019) The file [3dpdr_cr.tar] that can be found in the main tarball, contains a totally new version of 3D-PDR treating cosmic-ray sources. This version was developed by Brandt Gaches [email: gaches .at. ph1.uni-koeln.de] and is presented in Gaches et al. (2019a). The tarball contains a short additional manual. Please contact Brandt Gaches for any question regarding this version.

3D-PDR works with the gfortran version 4.8.4 and the ifort version 14.0.4. Later compiler versions may require adjustments in the code.

+ + \ No newline at end of file diff --git a/404.html b/404.html index 99445f17..38de1ecb 100644 --- a/404.html +++ b/404.html @@ -13,13 +13,13 @@ - - + +
-
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+ + \ No newline at end of file diff --git a/assets/js/0769f0fc.27806b34.js b/assets/js/0769f0fc.27806b34.js deleted file mode 100644 index 91963e4a..00000000 --- a/assets/js/0769f0fc.27806b34.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7129],{3905:(a,e,t)=>{t.d(e,{Zo:()=>i,kt:()=>o});var s=t(7294);function m(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function n(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(m[t]=a[t]);return m}(a,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(m[t]=a[t])}return m}var l=s.createContext({}),N=function(a){var e=s.useContext(l),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},i=function(a){var e=N(a.components);return s.createElement(l.Provider,{value:e},a.children)},k={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,m=a.mdxType,n=a.originalType,l=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),c=N(t),o=m,h=c["".concat(l,".").concat(o)]||c[o]||k[o]||n;return t?s.createElement(h,p(p({ref:e},i),{},{components:t})):s.createElement(h,p({ref:e},i))}));function o(a,e){var t=arguments,m=e&&e.mdxType;if("string"==typeof a||m){var n=t.length,p=new Array(n);p[0]=c;var r={};for(var l in e)hasOwnProperty.call(e,l)&&(r[l]=e[l]);r.originalType=a,r.mdxType="string"==typeof a?a:m,p[1]=r;for(var N=2;N{t.r(e),t.d(e,{assets:()=>i,contentTitle:()=>l,default:()=>o,frontMatter:()=>r,metadata:()=>N,toc:()=>k});var s=t(7462),m=t(3366),n=(t(7294),t(3905)),p=["components"],r={id:"bulk",title:"Bulk Ice Processes"},l=void 0,N={unversionedId:"bulk",id:"version-v3.3.0/bulk",title:"Bulk Ice Processes",description:"For a three phase network, we must include reactions in the bulk and the process by which it is formed. To do this, MakeRates automatically duplicates all LH reactions so that a reaction on the surface and one in the bulk ice exists in the network. We then include two methods by which material can move between the bulk and the surface. First is the accumulation of the bulk as new surface layers are formed and second is the individual swapping of a particle from the bulk with one on the surface. Both of these processes are taken from Garrod & Pauly 2011",source:"@site/versioned_docs/version-v3.3.0/chem-bulk.md",sourceDirName:".",slug:"/bulk",permalink:"/docs/bulk",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"bulk",title:"Bulk Ice Processes"},sidebar:"docs",previous:{title:"Adsorption & Desorption Reactions",permalink:"/docs/desorb"},next:{title:"Developer",permalink:"/docs/category/developer"}},i={},k=[{value:"Surface Transfer",id:"surface-transfer",level:2},{value:"Individual Swapping",id:"individual-swapping",level:2}],c={toc:k};function o(a){var e=a.components,t=(0,m.Z)(a,p);return(0,n.kt)("wrapper",(0,s.Z)({},c,t,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"For a three phase network, we must include reactions in the bulk and the process by which it is formed. To do this, MakeRates automatically duplicates all LH reactions so that a reaction on the surface and one in the bulk ice exists in the network. We then include two methods by which material can move between the bulk and the surface. First is the accumulation of the bulk as new surface layers are formed and second is the individual swapping of a particle from the bulk with one on the surface. Both of these processes are taken from ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1088/0004-637X/735/1/15"},"Garrod & Pauly 2011")),(0,n.kt)("h2",{id:"surface-transfer"},"Surface Transfer"),(0,n.kt)("p",null,"Once the surface layer of an ice mantle is full, any further material deposited will form a new layer and the old one becomes part of the bulk. Likewise, if any suface is removed then some of the bulk becomes surface. Therefore, we calculate the total rate of change of all species on the surface ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"["),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"n"),(0,n.kt)("mi",{parentName:"mrow"},"s")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"]")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"[\\frac{dns}{dt}]")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.2251079999999999em",verticalAlign:"-0.345em"}}),(0,n.kt)("span",{parentName:"span",className:"mopen"},"["),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8801079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.6550000000000002em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t")))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.394em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.345em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},"]")))))," ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"msub"}),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"m")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_{chem}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.486108em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span"}),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"m"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," due to chemistry, freeze out and desorption and use it to calculate the rate of surface to bulk transfer for each species."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"\u03b1"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("mi",{parentName:"mrow"},"c"))),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"["),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"n"),(0,n.kt)("mi",{parentName:"mrow"},"s")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mo",{parentName:"msub",stretchy:"false"},"]"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"m"))),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_s(i)}{dt} = \\alpha_{acc}[\\frac{dns}{dt}]_{chem} \\frac{n_s(i)}{n_s}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.0037em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"["),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},(0,n.kt)("span",{parentName:"span",className:"mclose"},"]"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"m"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,n.kt)("p",null,"where the first two terms give the total rate of surface to bulk transfer and the final fraction divides this amongst the species on the surface. We subtract this ODE from each surface species and add it to the equivalent bulk species. If the rate of change of the surface is negative, the bulk is transferred to the surface."),(0,n.kt)("h2",{id:"individual-swapping"},"Individual Swapping"),(0,n.kt)("p",null,"Any species in the bulk has the possibilty of diffusing to the surface. It will then displace a surface particle (which will join the bulk) and become part of the surface. We follow Ruaud et al. 2016 by first calculating the rate at which bulk species diffuse to the surface,"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"w"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"p"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mn",{parentName:"mfrac"},"1"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"t"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"o"),(0,n.kt)("mi",{parentName:"mrow"},"p"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"l"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"y")))))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"K_{swap} = \\frac{1}{t_{hop} N_{lay}}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02691em"}},"w"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.293548em",verticalAlign:"-0.972108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.32144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"y"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"1")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.972108em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"t"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"o"),(0,n.kt)("mi",{parentName:"mrow"},"p")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"t_{hop}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.9011879999999999em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is our usual diffusion timescale and ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"l"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"y")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_{lay}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"y"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the number of mantle layers with a minimum of 1. This gives a simple ODE"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"w"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"p"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"b")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_s(i)}{dt} = K_{swap}X_b(i)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.036108em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02691em"}},"w"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"b")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"and we get the rate at which things move from the surface to the bulk by summing this rate of change over all mantle species to get a total rate of swapping from the bulk to the surface. We then divide that by the fraction of the surface which is made up of a species to get its rate of swapping to the bulk."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"m")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub",mathvariant:"normal"},"\u03a3"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"w"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"p"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"b")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_m(i)}{dt} = \\Sigma_j K_{swap,j}X_b(j) \\frac{X_s(i)}{X_s}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"m")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"\u03a3"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02691em"}},"w"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"b")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,n.kt)("p",null,"This ensures that the net movement between the surface and the bulk from this process is zero."))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0aba1dff.32532089.js b/assets/js/0aba1dff.32532089.js deleted file mode 100644 index bc323400..00000000 --- a/assets/js/0aba1dff.32532089.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7688],{3905:(a,e,t)=>{t.d(e,{Zo:()=>N,kt:()=>k});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var i=s.createContext({}),l=function(a){var e=s.useContext(i),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},N=function(a){var e=l(a.components);return s.createElement(i.Provider,{value:e},a.children)},o={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,i=a.parentName,N=r(a,["components","mdxType","originalType","parentName"]),c=l(t),k=n,h=c["".concat(i,".").concat(k)]||c[k]||o[k]||m;return t?s.createElement(h,p(p({ref:e},N),{},{components:t})):s.createElement(h,p({ref:e},N))}));function k(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=c;var r={};for(var i in e)hasOwnProperty.call(e,i)&&(r[i]=e[i]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>N,contentTitle:()=>i,default:()=>k,frontMatter:()=>r,metadata:()=>l,toc:()=>o});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={},i="Chemical Analysis",l={unversionedId:"chemical_analysis",id:"version-v3.3.0/chemical_analysis",title:"Chemical Analysis",description:"Chemical networks are complex systems where the interplay between many elements often means that small changes in one aspect of the network can greatly effect the outcome in unexpected ways. Nevertheless, there are cases where a simple chemical explanation can be found for some observed behaviour in the model outputs. This tutorial demonstrates how to use some of the functionality of the UCLCHEM library to analyse model outputs and discover these explanations.",source:"@site/versioned_docs/version-v3.3.0/chemical_analysis.md",sourceDirName:".",slug:"/chemical_analysis",permalink:"/docs/chemical_analysis",draft:!1,tags:[],version:"v3.3.0",frontMatter:{},sidebar:"docs",previous:{title:"Running a Grid",permalink:"/docs/running_a_grid"},next:{title:"Compilation Issues",permalink:"/docs/trouble-compile"}},N={},o=[{value:"H3O+ and SO",id:"h3o-and-so",level:2},{value:"1. Generate Test Cases",id:"1-generate-test-cases",level:3},{value:"2. Run the Analysis",id:"2-run-the-analysis",level:3},{value:"2.1 H_3O^+",id:"21-h_3o",level:4},{value:"2.2 SO",id:"22-so",level:4},{value:"Summary Notes",id:"summary-notes",level:2},{value:"Considerations",id:"considerations",level:2}],c={toc:o};function k(a){var e=a.components,r=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("h1",{id:"chemical-analysis"},"Chemical Analysis"),(0,m.kt)("p",null,"Chemical networks are complex systems where the interplay between many elements often means that small changes in one aspect of the network can greatly effect the outcome in unexpected ways. Nevertheless, there are cases where a simple chemical explanation can be found for some observed behaviour in the model outputs. This tutorial demonstrates how to use some of the functionality of the UCLCHEM library to analyse model outputs and discover these explanations."),(0,m.kt)("p",null,"We do recommend caution when following the approach laid out in this tutorial. There are many pitfalls which we will try to point out as we go. Ultimately, a comprehensive view of how important a reaction is to the outcome of your model requires detailed statistical calculations such as the use of ",(0,m.kt)("a",{parentName:"p",href:"https://github.com/slundberg/shap"},"SHAP values")," to assign meaningful scores to how much various reactions in a network contribute to a species' abundance. Therefore, care must be taken by the user to ensure that the conclusions they draw from a simpler approach are sound."),(0,m.kt)("p",null,"We'll use an example from work that was recently published at the time of writing this tutorial to demonstrate the use of ",(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.analysis.analysis()")," and how it can be used to draw conclusions about the most important reactions in a network for a given species/behaviour."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\nfrom glob import glob\n")),(0,m.kt)("h2",{id:"h3o-and-so"},"H3O+ and SO"),(0,m.kt)("p",null,"In a piece of inference work in which we measured the cosmic ray ionization rate (CRIR) in NGC 253 ",(0,m.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2022arXiv220403668H/abstract"},"(Holdship et al. 2022)"),". We found that both H3O+ and SO were sensitive to the ionization rate. Furthermore, since H3O+ was increased in abundance by increasing CRIR and SO was destroyed, their ratio was extremely sensitive to the rate. "),(0,m.kt)("p",null,"In the work, we present the plot below which shows how the equilibrium abundance of each species changes with the CRIR as well as the ratio. We plot this for a range of temperatures to show that this behaviour is not particularly sensitive to the gas temperature."),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"crir_h3o_so_example",src:t(8715).Z,width:"1600",height:"1067"})),(0,m.kt)("p",null,"In a sense, this is all the information we need. A complex array of reactions all compete and contribute to produce the outcome of the model. Whatever they are, we see the abundance of these species are very sensitive to the CR over a wide range of temperature and density. However, we can only trust this conclusion as far as we trust the entire chemical network since we don't know what exactly causes this behaviour."),(0,m.kt)("p",null,"If we use the analysis function, we may find all of this is driven by a small handful of reactions. The benefit would then be that our trust in our conclusions only depends on how much we trust the rates of those specific reactions. If it is very important, we can evaluate those reactions and readers of our work can make the same decisions as information from experiment changes."),(0,m.kt)("h3",{id:"1-generate-test-cases"},"1. Generate Test Cases"),(0,m.kt)("p",null,"Ideally, we should run a huge grid of models and find some rigorous way to evaluate how important each reaction is to the outcome of the model. However, if we run a small grid representative of different conditions then any simple chemical explanation will be evident if it exists. If it no simple explanation is appropriate, then the analysis module is not appropriate for our task and we could consider more complex approaches."),(0,m.kt)("p",null,"Let's run a simple grid with all possible combinations of the following:"),(0,m.kt)("ul",null,(0,m.kt)("li",{parentName:"ul"},"A low CRIR (zeta=1) and high CRIR (zeta=1e4)"),(0,m.kt)("li",{parentName:"ul"},"A typical cloud density (n=1e4) and high density (n=1e6)"),(0,m.kt)("li",{parentName:"ul"},"The lower temperature bound of NGC 253 CMZ (50 K) and a high temperature (250 K)")),(0,m.kt)("p",null,"and that will give us enough to work with for our analysis."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'params={\'baseAv\':10, #UV shielded gas in our model\n \'freefall\':False,\n \'finalTime\':1e6\n }\nfor temperature in [50,250]:\n for density in [1e4,1e6]:\n for zeta in [1,1e4]:\n params["initialtemp"]=temperature\n params["initialdens"]=density\n params["zeta"]=zeta\n params["outputfile"]=f"../output/{temperature}_{density}_{zeta}.csv"\n uclchem.model.cloud(param_dict=params)\n')),(0,m.kt)("h3",{id:"2-run-the-analysis"},"2. Run the Analysis"),(0,m.kt)("p",null,"The ",(0,m.kt)("inlineCode",{parentName:"p"},"analysis")," function is very simple. For every time step in your model output, it will use UCLCHEM to calculate the rate of every reaction which includes a chosen species. It then uses the abundances at that time step to calculate the total contribution of that reaction to the rate of change of the species' abundance."),(0,m.kt)("p",null,"For example, if we care about H3O+ and find that it is created by ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("mi",{parentName:"mrow"},"O")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O")))))," + ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"H"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))))))),", then UCLCHEM is called to get ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"k")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"))))),", the rate of that reaction and then analysis calculates"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mover",{parentName:"mrow",accent:"true"},(0,m.kt)("mrow",{parentName:"mover"},(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("mo",{parentName:"mover"},"\u02d9")),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mi",{parentName:"mrow"},"k"),(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"H"),(0,m.kt)("mo",{parentName:"msup"},"+")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mi",{parentName:"msub"},"H"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\dot{Y(H_3O^+)} = k Y(H_2O) Y(H^+) n_H")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"1.23686em",verticalAlign:"-0.25em"}}),(0,m.kt)("span",{parentName:"span",className:"mord accent"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.9868600000000001em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.697331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.989em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.319em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"accent-body",style:{left:"-0.13889em"}},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u02d9")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.25em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"1.071331em",verticalAlign:"-0.25em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.821331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.113em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))),(0,m.kt)("p",null,"where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mover",{parentName:"mrow",accent:"true"},(0,m.kt)("mrow",{parentName:"mover"},(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("mo",{parentName:"mover"},"\u02d9"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\dot{Y(H_3O^+)}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"1.23686em",verticalAlign:"-0.25em"}}),(0,m.kt)("span",{parentName:"span",className:"mord accent"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.9868600000000001em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.697331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.989em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.319em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"accent-body",style:{left:"-0.13889em"}},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u02d9")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.25em"}},(0,m.kt)("span",{parentName:"span"})))))))))," is the rate of change of the ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("mo",{parentName:"mrow"},"+")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mord"},"+")))))," abundance due to the reaction. The ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mover",{parentName:"mrow",accent:"true"},(0,m.kt)("mi",{parentName:"mover"},"Y"),(0,m.kt)("mo",{parentName:"mover"},"\u02d9"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\dot{Y}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.9201900000000001em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord accent"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.9201900000000001em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.25233em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"accent-body",style:{left:"-0.13889em"}},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u02d9")))))))))))," s of each reaction involving the ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," are then compared to see which reactions contribute the most to the destruction and formation of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("mo",{parentName:"mrow"},"+")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mord"},"+"))))),"."),(0,m.kt)("p",null,"Our plan then is to do this for the low zeta case and the high zeta case. Hopefully, we'll see the same reactions are most important to the abundance of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," and SO at all densities and tempertures. If we don't find that that's the case, then the chemistry is these species is fairly complex and perhaps trying to present a simple cause for the CRIR dependence is not a good idea."),(0,m.kt)("p",null,"So, let's analyse the outputs!"),(0,m.kt)("h4",{id:"21-h_3o"},"2.1 ",(0,m.kt)("span",{parentName:"h4",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))),(0,m.kt)("p",null,(0,m.kt)("inlineCode",{parentName:"p"},"analysis()")," takes three arguments: the species, the output file to analyse, and a file to store the analsis output. Let's run it for every model in our little grid so we can inspect the outputs."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'outputs=glob("../output/[0-9]*.csv") #all files that start with a number\nfor output in outputs:\n \n analysis_output="../output/H3O-analysis-"+output[10:]\n uclchem.analysis.analysis("H3O+",output,analysis_output)\n')),(0,m.kt)("p",null,"This will produce one file per model output with lists of the most important reactions at each time step. Analysis will only print a time step when the most important reactions change from the previous one so we often see many fewer steps than in the full output. Let's look at the low temperature, low density, low zeta case:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 7.90e+05 years\nFormation = 1.92e-18 from:\nH2 + H2O+ -> H3O+ + H : 78.49%\nH2O + HCO+ -> CO + H3O+ : 17.68%\nH3+ + H2O -> H3O+ + H2 : 3.40%\n\nDestruction = -1.92e-18 from:\nH3O+ + E- -> OH + H + H : 65.43%\nH3O+ + E- -> H2O + H : 15.21%\nH3O+ + E- -> OH + H2 : 11.52%\nH3O+ + H2S -> H3S+ + H2O : 5.17%\nH3O+ + E- -> O + H2 + H : 1.20%\nH3O+ + HCN -> HCNH+ + H2O : 0.33%\nH3O+ + SIO -> SIOH+ + H2O : 0.33%\n")),(0,m.kt)("p",null,"What this shows is the reactions that cause 99.9% of the formation and 99.9% of the destruction of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," at a time step. The total rate of formation and destruction in units of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"s"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"s^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1")))))))))))))," is given as well the percentage of the total that each reaction contributes. "),(0,m.kt)("p",null,"What we need to find is a pattern in these reactions which holds across time and across different densities and temperatures. It actually turns out that the reactions printed above are the dominate formation and destruction routes of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," for all parameters for all times. For example, at high temperature, high density and high zeta, we get:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 1.00e+04 years\nFormation = 2.03e-14 from:\nH2 + H2O+ -> H3O+ + H : 95.47%\nH3+ + H2O -> H3O+ + H2 : 3.14%\nH2O + HCO+ -> CO + H3O+ : 1.05%\n\nDestruction = -2.03e-14 from:\nH3O+ + E- -> OH + H + H : 69.82%\nH3O+ + E- -> H2O + H : 16.23%\nH3O+ + E- -> OH + H2 : 12.29%\nH3O+ + E- -> O + H2 + H : 1.28%\n")),(0,m.kt)("p",null,"The sole difference being that the formation rate is much higher. Since equilibrium is reached, the destruction rate is also higher and so we need to use the fact we know the ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," abundance increases with CRIR to infer that the destruction rate is only faster because there is more ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," to destroy."),(0,m.kt)("p",null,"However, there are some problems here! Why does ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," + ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," become so efficient at high CRIR? We know the rate of a two body reaction does not depend on CRIR (",(0,m.kt)("a",{parentName:"p",href:"/docs/gas"},"see the chemistry docs"),") so it must be that ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," is increasing in abundance. We can run analysis on ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," to see what is driving that. In fact, as we report in the paper, following this thread we find that a chain of hydrogenations starting from ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"H"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"OH^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," is the overall route of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," formation and that this chain starts with small ions that are primarly formed through cosmic ray reactions. ",(0,m.kt)("em",{parentName:"p"},"It will very often be the case that analysing one species requires you to run analysis on another.")),(0,m.kt)("h4",{id:"22-so"},"2.2 SO"),(0,m.kt)("p",null,"With a strong explanation for ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))))))),", we can now look at SO. We start by running analysis again and then by looking at the reactions as before."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'outputs=glob("../output/[0-9]*.csv") #won\'t pick up H3O+ analysis because it\'s not a number\nfor output in outputs:\n \n analysis_output="../output/SO-analysis-"+output[10:]\n uclchem.analysis.analysis("SO",output,analysis_output)\n')),(0,m.kt)("p",null,"Again, let's start by looking at the low temperature, high density, low zeta case:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 1.31e+04 years\nFormation = 3.67e-22 from:\n#SO + THERM -> SO : 68.11%\nHSO+ + E- -> SO + H : 21.04%\n#SO + DEUVCR -> SO : 9.87%\n\nDestruction = -3.78e-22 from:\nSO + FREEZE -> #SO : 78.04%\nHCO+ + SO -> HSO+ + CO : 20.97%\n")),(0,m.kt)("p",null,"An interesting point here is that equilbrium is reached at around ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1.31"),(0,m.kt)("mo",{parentName:"mrow"},"\xd7"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"4"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"1.31 \\times 10^4")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.72777em",verticalAlign:"-0.08333em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},"."),(0,m.kt)("span",{parentName:"span",className:"mord"},"3"),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"\xd7"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4"))))))))))))," yr in this model. Since ",(0,m.kt)("inlineCode",{parentName:"p"},"analysis()")," only prints a time step when the most important reactions are different to the last one, this time step is the last output from the analysis. We can see that we broadly reach an equilibrium between thermal desorption and freeze out of SO, with some formation and destruction via ions. "),(0,m.kt)("p",null,"This doesn't hold up at lower densities or higher temperatures, looking at the high temperature, low density, low zeta case, we see a second pattern of reactions:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 9.50e+05 years\nFormation = 1.05e-20 from:\nO2 + S -> SO + O : 98.10%\nO + NS -> SO + N : 1.48%\n\nDestruction = -1.02e-20 from:\nC + SO -> CS + O : 39.10%\nC + SO -> S + CO : 39.10%\nC+ + SO -> SO+ + C : 4.33%\nC+ + SO -> CS+ + O : 4.33%\nC+ + SO -> S+ + CO : 4.33%\nC+ + SO -> S + CO+ : 4.33%\nN + SO -> S + NO : 3.46%\nH+ + SO -> SO+ + H : 0.28%\n")),(0,m.kt)("p",null,"However, it's not so complex. All the low zeta outputs show one of these two sets of reactions. Essentially, higher temperatures are opening up gas phase reaction routes which form and destroy SO. These new routes are not particularly quick with a total rate of change of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"20"))),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"s"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^{-20} s^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0"))))))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))),". Note that quite a lot of these are due to reactions with ions."),(0,m.kt)("p",null,"Finally, we look at the high zeta cases and find that no matter the temperature or density, we see the same reactions:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 1.81e+04 years\nFormation = 5.64e-17 from:\nO2 + S -> SO + O : 85.30%\nHSO+ + E- -> SO + H : 13.19%\nO + NS -> SO + N : 1.19%\n\nDestruction = -5.64e-17 from:\nH+ + SO -> SO+ + H : 13.16%\nC+ + SO -> SO+ + C : 10.52%\nC+ + SO -> CS+ + O : 10.52%\nC+ + SO -> S+ + CO : 10.52%\nC+ + SO -> S + CO+ : 10.52%\nH3+ + SO -> HSO+ + H2 : 9.86%\nC + SO -> CS + O : 8.90%\nC + SO -> S + CO : 8.90%\nSO + CRPHOT -> S + O : 4.11%\nSO + CRPHOT -> SO+ + E- : 4.11%\nHCO+ + SO -> HSO+ + CO : 3.20%\nHE+ + SO -> S+ + O + HE : 1.93%\nHE+ + SO -> S + O+ + HE : 1.93%\nN + SO -> S + NO : 0.87%\n")),(0,m.kt)("p",null,"Ions take over the destruction of SO when the CRIR is high and these reactions are proceeding about 1000 times faster than the low zeta rates. This makes sense as increasing the CRIR will greatly increase the abundances of these simple ionic species."),(0,m.kt)("p",null,"All in all, we can conclude that a range of gas phase reactions control the abundance of SO at low zeta but once the CRIR is high, destruction via ions dominates the SO chemistry leading to the decreasing abundance that we see."),(0,m.kt)("h2",{id:"summary-notes"},"Summary Notes"),(0,m.kt)("p",null,"In this notebook, we've run some representative models to look at why the SO and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," abundances seem to so heavily depend on the CRIR. We find that a chain of very efficient reactions starting with simple ions comprise the primary formation route of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," so that the total production of this species depends entirely on the abundance of those ions. With high CRIR, those ions become very abundant and we get a lot of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," formation."),(0,m.kt)("p",null,"SO is complex at first glance since the formation routes vary by parameter. However, looking at the destruction routes we can see that it's simply that SO can be easily destroyed by simple ions and, again, these are very abundant in gas exposed to a high CRIR."),(0,m.kt)("p",null,"An interesting note about SO is that we could potentially say that destruction via C",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," is the dominant destruction route. However, we would caution users to be careful with that kind of statement. Reactions with H",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))))))),", HE",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," and other also destroy SO. It could be that if we turned off the C",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," reactions, the SO chemistry would be unchanged as other ions take up the slack. Therefore, unless a single reaction is clearly dominant (as in ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," formation), it is best to test the importance of a reaction by removing it before concluding it is the single most important reaction."),(0,m.kt)("h2",{id:"considerations"},"Considerations"),(0,m.kt)("p",null,(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.analysis.analysis()")," looks at a snapshot of the gas and calculates the instantaneous rate of change of important reactions. However, over the course of a time step, abundances change and reactions rise and fall in importance. More importantly, complex interplay between reactions can contribute to an outcome. This is ultimately a simple, first order look at what is happening in the network but in many cases, a deeper view will be required."),(0,m.kt)("p",null,"If you struggle to find an explanation that fits all time steps in your outputs and is true across a range of parameters, then it is best not to report simple conclusions about the chemistry and to look for other ways to understand the network."))}k.isMDXComponent=!0},8715:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/holdship_ngc253-f2d6812a8c2a8fc94e669616d3410ee9.png"}}]); \ No newline at end of file diff --git a/assets/js/0dad24eb.4b90514c.js b/assets/js/0dad24eb.4b90514c.js new file mode 100644 index 00000000..92d7ce4c --- /dev/null +++ b/assets/js/0dad24eb.4b90514c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9090],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>h});var a=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},l=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,c=e.parentName,l=i(e,["components","mdxType","originalType","parentName"]),u=p(n),h=r,m=u["".concat(c,".").concat(h)]||u[h]||d[h]||o;return n?a.createElement(m,s(s({ref:t},l),{},{components:n})):a.createElement(m,s({ref:t},l))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,s=new Array(o);s[0]=u;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:r,s[1]=i;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>p,toc:()=>d});var a=n(7462),r=n(3366),o=(n(7294),n(3905)),s=["components"],i={id:"notation",title:"Notation"},c=void 0,p={unversionedId:"notation",id:"version-v3.3.1/notation",title:"Notation",description:"UCLCHEM uses notation, which differentiates between species types. Here, we'll give an overview of this notation and associated processes.",source:"@site/versioned_docs/version-v3.3.1/chem-notation.md",sourceDirName:".",slug:"/notation",permalink:"/docs/notation",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"notation",title:"Notation"},sidebar:"docs",previous:{title:"Chemistry",permalink:"/docs/category/chemistry"},next:{title:"Gas Phase Reactions",permalink:"/docs/gas"}},l={},d=[{value:"Gas phase",id:"gas-phase",level:2},{value:"Ice",id:"ice",level:2},{value:"Surface",id:"surface",level:2},{value:"Bulk",id:"bulk",level:2}],u={toc:d};function h(e){var t=e.components,n=(0,r.Z)(e,s);return(0,o.kt)("wrapper",(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"UCLCHEM uses notation, which differentiates between species types. Here, we'll give an overview of this notation and associated processes. "),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("strong",{parentName:"th"},"Species type")),(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("strong",{parentName:"th"},"Symbol")),(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("strong",{parentName:"th"},"Example")))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Gas phase"),(0,o.kt)("td",{parentName:"tr",align:"center"}),(0,o.kt)("td",{parentName:"tr",align:"center"},"H2O")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Ice"),(0,o.kt)("td",{parentName:"tr",align:"center"},"$"),(0,o.kt)("td",{parentName:"tr",align:"center"},"$H2O")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Surface"),(0,o.kt)("td",{parentName:"tr",align:"center"},"#"),(0,o.kt)("td",{parentName:"tr",align:"center"},"#H2O")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Bulk"),(0,o.kt)("td",{parentName:"tr",align:"center"},"@"),(0,o.kt)("td",{parentName:"tr",align:"center"},"@H2O")))),(0,o.kt)("h2",{id:"gas-phase"},"Gas phase"),(0,o.kt)("p",null,"The gas phase, i.e., the total abundance of a given species in the gas phase, is marked without any symbol. Hence, in order to analyze a given gas phase species, we need to use the name of the species without any additions, e.g., ",(0,o.kt)("strong",{parentName:"p"},"H2O"),". You can read more on reactions occurring in the gas phase ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/gas"},"here"),"."),(0,o.kt)("h2",{id:"ice"},"Ice"),(0,o.kt)("p",null,"When we need to consider the total ice abundance of a given species, we would have to use the $ symbol in front of the molecule. Following the example from the previous section, this would be ",(0,o.kt)("strong",{parentName:"p"},"$H2O"),". However, what is the total ice abundance? If you run a three-phase model, i.e., the one considering gas, surface, and bulk: ",(0,o.kt)("em",{parentName:"p"},"ice = surface + bulk"),".\nIn the case of a simpler two-phase model, it will simply correspond to the abundance on the surface. "),(0,o.kt)("h2",{id:"surface"},"Surface"),(0,o.kt)("p",null,"The surface species starts with #, and the abundance of water on the surface of the grain would be ",(0,o.kt)("strong",{parentName:"p"},"#H2O"),". The grain surface is the outermost part of the grain, from which species get released to the gas phase but are also frozen onto. Hence, the ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/desorb"},"adsorption & desorption reactions")," only consider the surface. Details of the reactions happening on the dust grain surface are described ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/grain"},"here"),". "),(0,o.kt)("h2",{id:"bulk"},"Bulk"),(0,o.kt)("p",null,"In three-phase models, we also account for the bulk of the dust grain, which corresponds to everything below the surface. The bulk is marked with @, so we can access it through ",(0,o.kt)("strong",{parentName:"p"},"@H2O"),". The species from the bulk can diffuse into the surface but also get released into the gas phase (or destroyed) in fast shocks. Bulk ice processes are described in greater detail in a separate ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/bulk"},"page"),"."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1465a325.77293bb0.js b/assets/js/1465a325.77293bb0.js deleted file mode 100644 index d1a3ea96..00000000 --- a/assets/js/1465a325.77293bb0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4870],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>u});var n=a(7294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var o=n.createContext({}),p=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),k=p(a),u=l,d=k["".concat(o,".").concat(u)]||k[u]||m[u]||i;return a?n.createElement(d,r(r({ref:t},c),{},{components:a})):n.createElement(d,r({ref:t},c))}));function u(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,r=new Array(i);r[0]=k;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s.mdxType="string"==typeof e?e:l,r[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>p,toc:()=>m});var n=a(7462),l=a(3366),i=(a(7294),a(3905)),r=["components"],s={id:"pythonapi",title:"Python Reference"},o="Python API",p={unversionedId:"pythonapi",id:"version-v3.3.0/pythonapi",title:"Python Reference",description:"* uclchem",source:"@site/versioned_docs/version-v3.3.0/start-pythonapi.md",sourceDirName:".",slug:"/pythonapi",permalink:"/docs/pythonapi",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"pythonapi",title:"Python Reference"},sidebar:"docs",previous:{title:"Model Parameters",permalink:"/docs/parameters"},next:{title:"Tutorials",permalink:"/docs/category/tutorials"}},c={},m=[{value:"read_output_file",id:"read_output_file",level:4},{value:"create_abundance_plot",id:"create_abundance_plot",level:4},{value:"plot_species",id:"plot_species",level:4},{value:"analysis",id:"analysis",level:4},{value:"total_element_abundance",id:"total_element_abundance",level:4},{value:"check_element_conservation",id:"check_element_conservation",level:4},{value:"cloud",id:"cloud",level:4},{value:"collapse",id:"collapse",level:4},{value:"hot_core",id:"hot_core",level:4},{value:"cshock",id:"cshock",level:4},{value:"jshock",id:"jshock",level:4},{value:"cshock_dissipation_time",id:"cshock_dissipation_time",level:4},{value:"check_error",id:"check_error",level:4},{value:"get_species_table",id:"get_species_table",level:4},{value:"get_reaction_table",id:"get_reaction_table",level:4},{value:"test_ode_conservation",id:"test_ode_conservation",level:4},{value:"is_number",id:"is_number",level:4},{value:"Species Objects",id:"species-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"get_name",id:"get_name",level:4},{value:"get_mass",id:"get_mass",level:4},{value:"set_desorb_products",id:"set_desorb_products",level:4},{value:"get_desorb_products",id:"get_desorb_products",level:4},{value:"set_freeze_products",id:"set_freeze_products",level:4},{value:"get_freeze_products",id:"get_freeze_products",level:4},{value:"get_freeze_products_list",id:"get_freeze_products_list",level:4},{value:"get_freeze_alpha",id:"get_freeze_alpha",level:4},{value:"is_grain_species",id:"is_grain_species",level:4},{value:"is_surface_species",id:"is_surface_species",level:4},{value:"is_bulk_species",id:"is_bulk_species",level:4},{value:"is_ion",id:"is_ion",level:4},{value:"add_default_freeze",id:"add_default_freeze",level:4},{value:"find_constituents",id:"find_constituents",level:4},{value:"get_n_atoms",id:"get_n_atoms",level:4},{value:"set_n_atoms",id:"set_n_atoms",level:4},{value:"__eq__",id:"__eq__",level:4},{value:"__lt__",id:"__lt__",level:4},{value:"__gt__",id:"__gt__",level:4},{value:"run_makerates",id:"run_makerates",level:4},{value:"get_network",id:"get_network",level:4},{value:"Network Objects",id:"network-objects",level:2},{value:"__init__",id:"__init__-1",level:4},{value:"find_similar_reactions",id:"find_similar_reactions",level:4},{value:"remove_reaction_by_index",id:"remove_reaction_by_index",level:4},{value:"remove_reaction",id:"remove_reaction",level:4},{value:"get_reaction",id:"get_reaction",level:4},{value:"set_reaction",id:"set_reaction",level:4},{value:"get_reaction_dict",id:"get_reaction_dict",level:4},{value:"set_reaction_dict",id:"set_reaction_dict",level:4},{value:"get_reaction_list",id:"get_reaction_list",level:4},{value:"sort_reactions",id:"sort_reactions",level:4},{value:"add_species",id:"add_species",level:4},{value:"remove_species",id:"remove_species",level:4},{value:"get_species_list",id:"get_species_list",level:4},{value:"get_species_dict",id:"get_species_dict",level:4},{value:"get_specie",id:"get_specie",level:4},{value:"set_specie",id:"set_specie",level:4},{value:"set_species_dict",id:"set_species_dict",level:4},{value:"sort_species",id:"sort_species",level:4},{value:"check_network",id:"check_network",level:4},{value:"check_and_filter_species",id:"check_and_filter_species",level:4},{value:"add_bulk_species",id:"add_bulk_species",level:4},{value:"check_freeze_and_desorbs",id:"check_freeze_and_desorbs",level:4},{value:"add_freeze_reactions",id:"add_freeze_reactions",level:4},{value:"add_desorb_reactions",id:"add_desorb_reactions",level:4},{value:"add_chemdes_reactions",id:"add_chemdes_reactions",level:4},{value:"check_for_excited_species",id:"check_for_excited_species",level:4},{value:"add_excited_surface_reactions",id:"add_excited_surface_reactions",level:4},{value:"add_bulk_reactions",id:"add_bulk_reactions",level:4},{value:"freeze_checks",id:"freeze_checks",level:4},{value:"duplicate_checks",id:"duplicate_checks",level:4},{value:"index_important_reactions",id:"index_important_reactions",level:4},{value:"index_important_species",id:"index_important_species",level:4},{value:"LoadedNetwork Objects",id:"loadednetwork-objects",level:2},{value:"__init__",id:"__init__-2",level:4},{value:"read_species_file",id:"read_species_file",level:4},{value:"read_reaction_file",id:"read_reaction_file",level:4},{value:"check_reaction",id:"check_reaction",level:4},{value:"kida_parser",id:"kida_parser",level:4},{value:"output_drops",id:"output_drops",level:4},{value:"write_outputs",id:"write_outputs",level:4},{value:"write_species",id:"write_species",level:4},{value:"write_reactions",id:"write_reactions",level:4},{value:"write_odes_f90",id:"write_odes_f90",level:4},{value:"write_jacobian",id:"write_jacobian",level:4},{value:"build_ode_string",id:"build_ode_string",level:4},{value:"species_ode_string",id:"species_ode_string",level:4},{value:"write_evap_lists",id:"write_evap_lists",level:4},{value:"truncate_line",id:"truncate_line",level:4},{value:"write_network_file",id:"write_network_file",level:4},{value:"find_reactant",id:"find_reactant",level:4},{value:"get_desorption_freeze_partners",id:"get_desorption_freeze_partners",level:4},{value:"array_to_string",id:"array_to_string",level:4},{value:"Reaction Objects",id:"reaction-objects",level:2},{value:"get_reactants",id:"get_reactants",level:4},{value:"get_sorted_reactants",id:"get_sorted_reactants",level:4},{value:"set_reactants",id:"set_reactants",level:4},{value:"get_products",id:"get_products",level:4},{value:"get_sorted_products",id:"get_sorted_products",level:4},{value:"set_products",id:"set_products",level:4},{value:"get_alpha",id:"get_alpha",level:4},{value:"set_alpha",id:"set_alpha",level:4},{value:"get_beta",id:"get_beta",level:4},{value:"set_beta",id:"set_beta",level:4},{value:"set_gamma",id:"set_gamma",level:4},{value:"get_gamma",id:"get_gamma",level:4},{value:"set_templow",id:"set_templow",level:4},{value:"get_templow",id:"get_templow",level:4},{value:"set_temphigh",id:"set_temphigh",level:4},{value:"get_temphigh",id:"get_temphigh",level:4},{value:"NANCheck",id:"nancheck",level:4},{value:"get_reaction_type",id:"get_reaction_type",level:4},{value:"convert_to_bulk",id:"convert_to_bulk",level:4},{value:"__eq__",id:"__eq__-1",level:4},{value:"check_temperature_collision",id:"check_temperature_collision",level:4},{value:"changes_surface_count",id:"changes_surface_count",level:4},{value:"changes_total_mantle",id:"changes_total_mantle",level:4},{value:"generate_ode_bit",id:"generate_ode_bit",level:4}],k={toc:m};function u(e){var t=e.components,a=(0,l.Z)(e,r);return(0,i.kt)("wrapper",(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"python-api"},"Python API"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem"},"uclchem"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.analysis"},"uclchem.analysis")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.read_output_file"},"read","_","output","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.create_abundance_plot"},"create","_","abundance","_","plot")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.plot_species"},"plot","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.analysis"},"analysis")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.total_element_abundance"},"total","_","element","_","abundance")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.check_element_conservation"},"check","_","element","_","conservation")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.model"},"uclchem.model")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.cloud"},"cloud")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.collapse"},"collapse")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.hot_core"},"hot","_","core")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.cshock"},"cshock")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.jshock"},"jshock")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.utils"},"uclchem.utils")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.cshock_dissipation_time"},"cshock","_","dissipation","_","time")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.check_error"},"check","_","error")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.get_species_table"},"get","_","species","_","table")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.get_reaction_table"},"get","_","reaction","_","table")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.tests"},"uclchem.tests")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.tests.test_ode_conservation"},"test","_","ode","_","conservation")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.species"},"uclchem.makerates.species")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.is_number"},"is","_","number")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species"},"Species"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__init__"},"_","_","init","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_name"},"get","_","name")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_mass"},"get","_","mass")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.set_desorb_products"},"set","_","desorb","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_desorb_products"},"get","_","desorb","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.set_freeze_products"},"set","_","freeze","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_freeze_products"},"get","_","freeze","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_freeze_products_list"},"get","_","freeze","_","products","_","list")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_freeze_alpha"},"get","_","freeze","_","alpha")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_grain_species"},"is","_","grain","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_surface_species"},"is","_","surface","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_bulk_species"},"is","_","bulk","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_ion"},"is","_","ion")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.add_default_freeze"},"add","_","default","_","freeze")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.find_constituents"},"find","_","constituents")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_n_atoms"},"get","_","n","_","atoms")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.set_n_atoms"},"set","_","n","_","atoms")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__eq__"},"_","_","eq","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__lt__"},"_","_","lt","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__gt__"},"_","_","gt","_","_")))))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates"},"uclchem.makerates"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.makerates"},"uclchem.makerates.makerates")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.makerates.run_makerates"},"run","_","makerates")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.makerates.get_network"},"get","_","network")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.network"},"uclchem.makerates.network")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network"},"Network"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.__init__"},"_","_","init","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.find_similar_reactions"},"find","_","similar","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.remove_reaction_by_index"},"remove","_","reaction","_","by","_","index")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.remove_reaction"},"remove","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_reaction"},"get","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_reaction"},"set","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_reaction_dict"},"get","_","reaction","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_reaction_dict"},"set","_","reaction","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_reaction_list"},"get","_","reaction","_","list")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.sort_reactions"},"sort","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_species"},"add","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.remove_species"},"remove","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_species_list"},"get","_","species","_","list")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_species_dict"},"get","_","species","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_specie"},"get","_","specie")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_specie"},"set","_","specie")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_species_dict"},"set","_","species","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.sort_species"},"sort","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_network"},"check","_","network")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_and_filter_species"},"check","_","and","_","filter","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_bulk_species"},"add","_","bulk","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_freeze_and_desorbs"},"check","_","freeze","_","and","_","desorbs")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_freeze_reactions"},"add","_","freeze","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_desorb_reactions"},"add","_","desorb","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_chemdes_reactions"},"add","_","chemdes","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_for_excited_species"},"check","_","for","_","excited","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_excited_surface_reactions"},"add","_","excited","_","surface","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_bulk_reactions"},"add","_","bulk","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.freeze_checks"},"freeze","_","checks")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.duplicate_checks"},"duplicate","_","checks")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.index_important_reactions"},"index","_","important","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.index_important_species"},"index","_","important","_","species")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.LoadedNetwork"},"LoadedNetwork"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.LoadedNetwork.__init__"},"_","_","init","_","_")))))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.io_functions"},"uclchem.makerates.io","_","functions")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.read_species_file"},"read","_","species","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.read_reaction_file"},"read","_","reaction","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.check_reaction"},"check","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.kida_parser"},"kida","_","parser")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.output_drops"},"output","_","drops")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_outputs"},"write","_","outputs")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_species"},"write","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_reactions"},"write","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_odes_f90"},"write","_","odes","_","f90")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_jacobian"},"write","_","jacobian")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.build_ode_string"},"build","_","ode","_","string")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.species_ode_string"},"species","_","ode","_","string")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_evap_lists"},"write","_","evap","_","lists")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.truncate_line"},"truncate","_","line")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_network_file"},"write","_","network","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.find_reactant"},"find","_","reactant")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.get_desorption_freeze_partners"},"get","_","desorption","_","freeze","_","partners")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.array_to_string"},"array","_","to","_","string")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.reaction"},"uclchem.makerates.reaction")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction"},"Reaction"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_reactants"},"get","_","reactants")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_sorted_reactants"},"get","_","sorted","_","reactants")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_reactants"},"set","_","reactants")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_products"},"get","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_sorted_products"},"get","_","sorted","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_products"},"set","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_alpha"},"get","_","alpha")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_alpha"},"set","_","alpha")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_beta"},"get","_","beta")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_beta"},"set","_","beta")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_gamma"},"set","_","gamma")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_gamma"},"get","_","gamma")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_templow"},"set","_","templow")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_templow"},"get","_","templow")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_temphigh"},"set","_","temphigh")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_temphigh"},"get","_","temphigh")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.NANCheck"},"NANCheck")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_reaction_type"},"get","_","reaction","_","type")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.convert_to_bulk"},"convert","_","to","_","bulk")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.__eq__"},"_","_","eq","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.check_temperature_collision"},"check","_","temperature","_","collision")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.changes_surface_count"},"changes","_","surface","_","count")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.changes_total_mantle"},"changes","_","total","_","mantle")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.generate_ode_bit"},"generate","_","ode","_","bit"))))))),(0,i.kt)("a",{id:"uclchem"}),(0,i.kt)("h1",{id:"uclchem"},"uclchem"),(0,i.kt)("p",null,"The UCLCHEM python module is divided into three parts.\n",(0,i.kt)("inlineCode",{parentName:"p"},"model")," contains the functions for running chemical models under different physics.\n",(0,i.kt)("inlineCode",{parentName:"p"},"analysis")," contains functions for reading and plotting output files as well as investigating the chemistry.\n",(0,i.kt)("inlineCode",{parentName:"p"},"tests")," contains functions for testing the code."),(0,i.kt)("a",{id:"uclchem.analysis"}),(0,i.kt)("h1",{id:"uclchemanalysis"},"uclchem.analysis"),(0,i.kt)("a",{id:"uclchem.analysis.read_output_file"}),(0,i.kt)("h4",{id:"read_output_file"},"read","_","output","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def read_output_file(output_file)\n")),(0,i.kt)("p",null,"Read the output of a UCLCHEM run created with the outputFile parameter into a pandas DataFrame"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_file")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to file containing a full UCLCHEM output")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.DataFrame")," - A dataframe containing the abundances and physical parameters of the model at every time step.")),(0,i.kt)("a",{id:"uclchem.analysis.create_abundance_plot"}),(0,i.kt)("h4",{id:"create_abundance_plot"},"create","_","abundance","_","plot"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def create_abundance_plot(df, species, figsize=(16, 9), plot_file=None)\n")),(0,i.kt)("p",null,"Create a plot of the abundance of a list of species through time."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pd.DataFrame")," - Pandas dataframe containing the UCLCHEM output, see ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"list")," - list of strings containing species names. Using a $ instead of # or @ will plot the sum of surface and bulk abundances."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"figsize")," ",(0,i.kt)("em",{parentName:"li"},"tuple, optional")," - Size of figure, width by height in inches. Defaults to (16, 9)."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"plot_file")," ",(0,i.kt)("em",{parentName:"li"},"str, optional")," - Path to file where figure will be saved. If None, figure is not saved. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fig,ax")," - matplotlib figure and axis objects")),(0,i.kt)("a",{id:"uclchem.analysis.plot_species"}),(0,i.kt)("h4",{id:"plot_species"},"plot","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def plot_species(ax, df, species, **plot_kwargs)\n")),(0,i.kt)("p",null,"Plot the abundance of a list of species through time directly onto an axis."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ax")," ",(0,i.kt)("em",{parentName:"li"},"pyplot.axis")," - An axis object to plot on"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pd.DataFrame")," - A dataframe created by ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"str"),' - A list of species names to be plotted. If species name starts with "$" instead of # or @, plots the sum of surface and bulk abundances')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pyplot.axis")," - Modified input axis is returned")),(0,i.kt)("a",{id:"uclchem.analysis.analysis"}),(0,i.kt)("h4",{id:"analysis"},"analysis"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def analysis(species_name, result_file, output_file, rate_threshold=0.99)\n")),(0,i.kt)("p",null,"A function which loops over every time step in an output file and finds the rate of change of a species at that time due to each of the reactions it is involved in.\nFrom this, the most important reactions are identified and printed to file. This can be used to understand the chemical reason behind a species' behaviour."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Name of species to be analysed"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"result_file")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The path to the file containing the UCLCHEM output"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_file")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The path to the file where the analysis output will be written"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"rate_threshold")," ",(0,i.kt)("em",{parentName:"li"},"float,optional")," - Analysis output will contain the only the most efficient reactions that are responsible for rate_threshold of the total production and destruction rate. Defaults to 0.99.")),(0,i.kt)("a",{id:"uclchem.analysis.total_element_abundance"}),(0,i.kt)("h4",{id:"total_element_abundance"},"total","_","element","_","abundance"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def total_element_abundance(element, df)\n")),(0,i.kt)("p",null,"Calculates that the total elemental abundance of a species as a function of time. Allows you to check conservation."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"element")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Name of element"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pandas.DataFrame")," - DataFrame from ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file()"))),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.Series")," - Total abundance of element for all time steps in df.")),(0,i.kt)("a",{id:"uclchem.analysis.check_element_conservation"}),(0,i.kt)("h4",{id:"check_element_conservation"},"check","_","element","_","conservation"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def check_element_conservation(df,\n element_list=["H", "N", "C", "O"],\n percent=True)\n')),(0,i.kt)("p",null,"Check the conservation of major element by comparing total abundance at start and end of model"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pandas.DataFrame")," - UCLCHEM output in format from ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"element_list")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - List of elements to check. Defaults to ",'["H", "N", "C", "O"]',".")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"dict")," - Dictionary containing the change in the total abundance of each element as a fraction of initial value")),(0,i.kt)("a",{id:"uclchem.model"}),(0,i.kt)("h1",{id:"uclchemmodel"},"uclchem.model"),(0,i.kt)("a",{id:"uclchem.model.cloud"}),(0,i.kt)("h4",{id:"cloud"},"cloud"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def cloud(param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run cloud model from UCLCHEM"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species")," parametere is provided, the remaining elements of this list will be the final abundances of the species in out_species."),(0,i.kt)("a",{id:"uclchem.model.collapse"}),(0,i.kt)("h4",{id:"collapse"},"collapse"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def collapse(collapse, physics_output, param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run collapse model from UCLCHEM based on Priestley et al 2018 AJ 156 51 (",(0,i.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2018AJ....156...51P/abstract"},"https://ui.adsabs.harvard.edu/abs/2018AJ....156...51P/abstract"),")"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"collapse")," ",(0,i.kt)("em",{parentName:"li"},"str")," - A string containing the collapse type, options are 'BE1.1', 'BE4', 'filament', or 'ambipolar'"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"physics_output(str)")," - Filename to store physics output, only relevant for 'filament' and 'ambipolar' collapses. If None, no physics output will be saved."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species")," parametere is provided, the remaining elements of this list will be the final abundances of the species in out_species."),(0,i.kt)("a",{id:"uclchem.model.hot_core"}),(0,i.kt)("h4",{id:"hot_core"},"hot","_","core"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def hot_core(temp_indx, max_temperature, param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run hot core model from UCLCHEM, based on Viti et al. 2004 and Collings et al. 2004"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"temp_indx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Used to select the mass of hot core. 1=1Msun,2=5, 3=10, 4=15, 5=25,6=60]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"max_temperature")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Value at which gas temperature will stop increasing."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species")," parametere is provided, the remaining elements of this list will be the final abundances of the species in out_species."),(0,i.kt)("a",{id:"uclchem.model.cshock"}),(0,i.kt)("h4",{id:"cshock"},"cshock"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def cshock(shock_vel,\n timestep_factor=0.01,\n minimum_temperature=0.0,\n param_dict=None,\n out_species=None)\n")),(0,i.kt)("p",null,"Run C-type shock model from UCLCHEM"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shock_vel")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Velocity of the shock in km/s"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"timestep_factor")," ",(0,i.kt)("em",{parentName:"li"},"float, optional")," - Whilst the time is less than 2 times the dissipation time of shock, timestep is timestep_factor*dissipation time. Essentially controls\nhow well resolved the shock is in your model. Defaults to 0.01."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"minimum_temperature")," ",(0,i.kt)("em",{parentName:"li"},"float, optional")," - Minimum post-shock temperature. Defaults to 0.0 (no minimum). The shocked gas typically cools to ",(0,i.kt)("inlineCode",{parentName:"li"},"initialTemp")," if this is not set."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the model succeeded, the second element is the dissipation time and further elements are the abundances of all species in ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species"),"."),(0,i.kt)("a",{id:"uclchem.model.jshock"}),(0,i.kt)("h4",{id:"jshock"},"jshock"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def jshock(shock_vel, param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run J-type shock model from UCLCHEM"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shock_vel")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Velocity of the shock"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the model succeeded, the second element is the dissipation time and further elements are the abundances of all species in ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species"),"."),(0,i.kt)("a",{id:"uclchem.utils"}),(0,i.kt)("h1",{id:"uclchemutils"},"uclchem.utils"),(0,i.kt)("a",{id:"uclchem.utils.cshock_dissipation_time"}),(0,i.kt)("h4",{id:"cshock_dissipation_time"},"cshock","_","dissipation","_","time"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def cshock_dissipation_time(shock_vel, initial_dens)\n")),(0,i.kt)("p",null,"A simple function used to calculate the dissipation time of a C-type shock.\nUse to obtain a useful timescale for your C-shock model runs. Velocity of\nions and neutrals equalizes at dissipation time and full cooling takes a few dissipation times."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shock_vel")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Velocity of the shock in km/s"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"initial_dens")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Preshock density of the gas in cm",(0,i.kt)("span",{parentName:"li",className:"math math-inline"},(0,i.kt)("span",{parentName:"span",className:"katex"},(0,i.kt)("span",{parentName:"span",className:"katex-mathml"},(0,i.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,i.kt)("semantics",{parentName:"math"},(0,i.kt)("mrow",{parentName:"semantics"},(0,i.kt)("msup",{parentName:"mrow"},(0,i.kt)("mrow",{parentName:"msup"}),(0,i.kt)("mrow",{parentName:"msup"},(0,i.kt)("mo",{parentName:"mrow"},"\u2212"),(0,i.kt)("mn",{parentName:"mrow"},"3")))),(0,i.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,i.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,i.kt)("span",{parentName:"span",className:"base"},(0,i.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,i.kt)("span",{parentName:"span",className:"mord"},(0,i.kt)("span",{parentName:"span"}),(0,i.kt)("span",{parentName:"span",className:"msupsub"},(0,i.kt)("span",{parentName:"span",className:"vlist-t"},(0,i.kt)("span",{parentName:"span",className:"vlist-r"},(0,i.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,i.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,i.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,i.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,i.kt)("span",{parentName:"span",className:"mord mtight"},(0,i.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,i.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))))),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - The dissipation time of the shock in years")),(0,i.kt)("a",{id:"uclchem.utils.check_error"}),(0,i.kt)("h4",{id:"check_error"},"check","_","error"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_error(error_code)\n")),(0,i.kt)("p",null,'Converts the UCLCHEM integer result flag to a simple messaging explaining what went wrong"'),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"error_code")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Error code returned by UCLCHEM models, the first element of the results list.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - Error message")),(0,i.kt)("a",{id:"uclchem.utils.get_species_table"}),(0,i.kt)("h4",{id:"get_species_table"},"get","_","species","_","table"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_species_table()\n")),(0,i.kt)("p",null,"A simple function to load the list of species in the UCLCHEM network into a pandas dataframe."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.DataFrame")," - A dataframe containing the species names and their details")),(0,i.kt)("a",{id:"uclchem.utils.get_reaction_table"}),(0,i.kt)("h4",{id:"get_reaction_table"},"get","_","reaction","_","table"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_table()\n")),(0,i.kt)("p",null,"A function to load the reaction table from the UCLCHEM network into a pandas dataframe."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.DataFrame")," - A dataframe containing the reactions and their rates")),(0,i.kt)("a",{id:"uclchem.tests"}),(0,i.kt)("h1",{id:"uclchemtests"},"uclchem.tests"),(0,i.kt)("a",{id:"uclchem.tests.test_ode_conservation"}),(0,i.kt)("h4",{id:"test_ode_conservation"},"test","_","ode","_","conservation"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def test_ode_conservation(element_list=["H", "N", "C", "O"])\n')),(0,i.kt)("p",null,"Test whether the ODEs conserve elements. Useful to run each time you change network.\nIntegrator errors may still cause elements not to be conserved but they cannot be conserved\nif the ODEs are not correct."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"element_list")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of elements for which to check the conservation. Defaults to ",'["H", "N", "C", "O"]',".")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"dict")," - A dictionary of the elements in element list with values representing the total rate of change of each element.")),(0,i.kt)("a",{id:"uclchem.makerates.species"}),(0,i.kt)("h1",{id:"uclchemmakeratesspecies"},"uclchem.makerates.species"),(0,i.kt)("a",{id:"uclchem.makerates.species.is_number"}),(0,i.kt)("h4",{id:"is_number"},"is","_","number"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_number(s) -> bool\n")),(0,i.kt)("p",null,"Try to convert input to a float, if it succeeds, return True."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"s")," - Input element to check for")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if a number, False if not.")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species"}),(0,i.kt)("h2",{id:"species-objects"},"Species Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class Species()\n")),(0,i.kt)("p",null,"Species is a class that holds all the information about an individual species in the\nnetwork. It also has convenience functions to check whether the species is a gas or grain\nspecies and to help compare between species."),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__init__"}),(0,i.kt)("h4",{id:"__init__"},"_","_","init","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __init__(inputRow)\n")),(0,i.kt)("p",null,"A class representing chemical species, it reads in rows which are formatted as follows:\nNAME,MASS,BINDING ENERGY,SOLID FRACTION,MONO FRACTION,VOLCANO FRACTION,ENTHALPY"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("p",null," inputRow (list):"),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_name"}),(0,i.kt)("h4",{id:"get_name"},"get","_","name"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_name() -> str\n")),(0,i.kt)("p",null,"Get the name of the chemical species."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - The name")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_mass"}),(0,i.kt)("h4",{id:"get_mass"},"get","_","mass"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_mass() -> int\n")),(0,i.kt)("p",null,"Get the molecular mass of the chemical species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"int")," - The molecular mass")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.set_desorb_products"}),(0,i.kt)("h4",{id:"set_desorb_products"},"set","_","desorb","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_desorb_products(new_desorbs: list[str]) -> None\n")),(0,i.kt)("p",null,"Set the desorption products for species on the surface or in the bulk.\nIt is assumed that there is only one desorption pathway."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_desorbs")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The new desorption products")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_desorb_products"}),(0,i.kt)("h4",{id:"get_desorb_products"},"get","_","desorb","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_desorb_products() -> list[str]\n")),(0,i.kt)("p",null,"Obtain the desorbtion products of ice species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[str]")," - The desorption products")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.set_freeze_products"}),(0,i.kt)("h4",{id:"set_freeze_products"},"set","_","freeze","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_freeze_products(product_list: list[str], freeze_alpha: float) -> None\n")),(0,i.kt)("p",null,"Add the freeze products of the species, one species can have several freeze products."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"product_list")," ",(0,i.kt)("em",{parentName:"p"},"list","[str]")," - The list of freeze out products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"freeze_alpha")," ",(0,i.kt)("em",{parentName:"p"},"float")," - The freeze out ratio."),(0,i.kt)("p",{parentName:"li"},"It is called alpha, since it is derived from the alpha column in the UCLCHEM reaction format:\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/uclchem/UCLCHEM/blob/08d37f8c3063f8ff8a9a7aa16d9eff0ed4f99538/Makerates/src/network.py#L160"},"https://github.com/uclchem/UCLCHEM/blob/08d37f8c3063f8ff8a9a7aa16d9eff0ed4f99538/Makerates/src/network.py#L160")))),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_freeze_products"}),(0,i.kt)("h4",{id:"get_freeze_products"},"get","_","freeze","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_freeze_products() -> dict[list[str], float]\n")),(0,i.kt)("p",null,"Obtain the product to which the species freeze out"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[str, float]",": Reactions and their respective freeze out ratios."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Yields"),":"),(0,i.kt)("p",null," Iterator[dict","[str, float]","]: Iterator that returns all of the freeze out reactions with ratios"),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_freeze_products_list"}),(0,i.kt)("h4",{id:"get_freeze_products_list"},"get","_","freeze","_","products","_","list"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_freeze_products_list() -> list[list[str]]\n")),(0,i.kt)("p",null,"Returns all the freeze products without their ratios"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[list[str]]")," - List of freeze products")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_freeze_alpha"}),(0,i.kt)("h4",{id:"get_freeze_alpha"},"get","_","freeze","_","alpha"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_freeze_alpha(product_list: list[str]) -> float\n")),(0,i.kt)("p",null,"Obtain the freeze out ratio of a species for a certain reaction"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"product_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - For a specific reaction, get the freezeout ratio")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - The freezeout ratio")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_grain_species"}),(0,i.kt)("h4",{id:"is_grain_species"},"is","_","grain","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_grain_species() -> bool\n")),(0,i.kt)("p",null,"Return whether the species is a species on the grain"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if it is a grain species.")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_surface_species"}),(0,i.kt)("h4",{id:"is_surface_species"},"is","_","surface","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_surface_species() -> bool\n")),(0,i.kt)("p",null,"Checks if the species is on the surface"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if a surface species")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_bulk_species"}),(0,i.kt)("h4",{id:"is_bulk_species"},"is","_","bulk","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_bulk_species() -> bool\n")),(0,i.kt)("p",null,"Checks if the species is in the bulk"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if a bulk species")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_ion"}),(0,i.kt)("h4",{id:"is_ion"},"is","_","ion"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_ion() -> bool\n")),(0,i.kt)("p",null,"Checks if the species is ionized, either postively or negatively."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if it is an ionized")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.add_default_freeze"}),(0,i.kt)("h4",{id:"add_default_freeze"},"add","_","default","_","freeze"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_default_freeze() -> None\n")),(0,i.kt)("p",null,"Adds a defalt freezeout, which is freezing out to the species itself, but with no ionization."),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.find_constituents"}),(0,i.kt)("h4",{id:"find_constituents"},"find","_","constituents"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def find_constituents()\n")),(0,i.kt)("p",null,"Loop through the species' name and work out what its consituent\natoms are. Then calculate mass and alert user if it doesn't match\ninput mass."),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_n_atoms"}),(0,i.kt)("h4",{id:"get_n_atoms"},"get","_","n","_","atoms"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_n_atoms() -> int\n")),(0,i.kt)("p",null,"Obtain the number of atoms in the molecule"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"int")," - The number of atoms")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.set_n_atoms"}),(0,i.kt)("h4",{id:"set_n_atoms"},"set","_","n","_","atoms"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_n_atoms(new_n_atoms: int) -> None\n")),(0,i.kt)("p",null,"Set the number of atoms"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_n_atoms")," ",(0,i.kt)("em",{parentName:"li"},"int")," - The new number of atoms")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__eq__"}),(0,i.kt)("h4",{id:"__eq__"},"_","_","eq","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __eq__(other)\n")),(0,i.kt)("p",null,"Check for equality based on either a string or another Species instance."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," ",(0,i.kt)("em",{parentName:"li"},"str, Species")," - Another species")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"NotImplementedError")," - We can only compare between species or strings of species.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if two species are identical.")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__lt__"}),(0,i.kt)("h4",{id:"__lt__"},"_","_","lt","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __lt__(other) -> bool\n")),(0,i.kt)("p",null,"Compare the mass of the species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - Another species instance")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if less than the other species")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__gt__"}),(0,i.kt)("h4",{id:"__gt__"},"_","_","gt","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __gt__(other) -> bool\n")),(0,i.kt)("p",null,"Compare the mass of the species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - Another species instance")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if larger than than the other species")),(0,i.kt)("a",{id:"uclchem.makerates"}),(0,i.kt)("h1",{id:"uclchemmakerates"},"uclchem.makerates"),(0,i.kt)("a",{id:"uclchem.makerates.makerates"}),(0,i.kt)("h1",{id:"uclchemmakeratesmakerates"},"uclchem.makerates.makerates"),(0,i.kt)("a",{id:"uclchem.makerates.makerates.run_makerates"}),(0,i.kt)("h4",{id:"run_makerates"},"run","_","makerates"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def run_makerates(configuration_file: str = "user_settings.yaml",\n write_files: bool = True) -> Network\n')),(0,i.kt)("p",null,"The main run wrapper for makerates, it loads a configuration, parses it in Network\nand then returns the Network. It by default writes to the uclchem fortran directory, but\nthis can be skipped."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"configuration_file")," ",(0,i.kt)("em",{parentName:"li"},"str, optional"),' - A UCLCHEM Makerates configuration file. Defaults to "user_settings.yaml".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"write_files")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether to write the fortran files to the src/fortran_src. Defaults to True.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"KeyError")," - The configuration cannot be found")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Network")," - A chemical network instance.")),(0,i.kt)("a",{id:"uclchem.makerates.makerates.get_network"}),(0,i.kt)("h4",{id:"get_network"},"get","_","network"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_network(path_to_input_file: Union[str, bytes, os.PathLike] = None,\n path_to_species_file: Union[str, bytes, os.PathLike] = None,\n path_to_reaction_file: Union[str, bytes, os.PathLike] = None,\n verbosity=None)\n")),(0,i.kt)("p",null,"In memory equivalent of Makerates, can either be used on the original input files\nfor makerates, or on the output files that makerates generates. So either specify:"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"path_to_input_file ")," exclusive OR (",(0,i.kt)("inlineCode",{parentName:"p"},"path_to_species_file")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"path_to_reaction_file"),")"),(0,i.kt)("p",null,"The latter scenario allows you to reload a reaction network from a network already written by Makerates."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path_to_input_file")," ",(0,i.kt)("em",{parentName:"li"},"Union","[str, bytes, os.PathLike]",", optional")," - Path to input file. Defaults to None."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path_to_species_file")," ",(0,i.kt)("em",{parentName:"li"},"Union","[str, bytes, os.PathLike]",", optional")," - Path to a species.csv in/from the src directory. Defaults to None."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path_to_reaction_file")," ",(0,i.kt)("em",{parentName:"li"},"Union","[str, bytes, os.PathLike]",", optional")," - Path to a reactions.csv in/from the src directory. Defaults to None."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"verbosity")," ",(0,i.kt)("em",{parentName:"li"},"LEVEL, optional")," - The verbosity level as specified in logging. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError")," - You cannot specify both an input configuration and species+reaction.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Network")," - A chemical reaction network.")),(0,i.kt)("a",{id:"uclchem.makerates.network"}),(0,i.kt)("h1",{id:"uclchemmakeratesnetwork"},"uclchem.makerates.network"),(0,i.kt)("p",null,"This python file contains all functions for de-duplicating species and reaction lists,\nchecking for common errors, and automatic addition of reactions such as freeze out,\ndesorption and bulk reactions for three phase models."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network"}),(0,i.kt)("h2",{id:"network-objects"},"Network Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class Network()\n")),(0,i.kt)("p",null,"The network class stores all the information about reaction network."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.__init__"}),(0,i.kt)("h4",{id:"__init__-1"},"_","_","init","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __init__(species: list[Species],\n reactions: list[Reaction],\n three_phase: bool = False,\n user_defined_bulk: list = [])\n")),(0,i.kt)("p",null,"A class to store network information such as indices of important reactions."),(0,i.kt)("p",null,"The class fully utilizes getters and setters, which can be used to add/remove\nreactions and the species involved. Important is that you do not directly edit\nthe internal dictionaries that store the species and reactions, unless you\nknow what you are doing. The network by default checks for duplicates in species\nand identical reactions that overlap in temperature ranges, potentially causing\nproblems."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - A list of chemical species that are added to the network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactions")," ",(0,i.kt)("em",{parentName:"li"},"list","[Reaction]")," - A list of chemical reactions that are added to the network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether to use a three phase model (gas, surface, bulk). Defaults to False."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"user_defined_bulk")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - List of user defined bulk. Defaults to [].")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.find_similar_reactions"}),(0,i.kt)("h4",{id:"find_similar_reactions"},"find","_","similar","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def find_similar_reactions(reaction: Reaction) -> dict[int, Reaction]\n")),(0,i.kt)("p",null,"Reactions are similar if the reaction has the same reactants and products,\nfind all reactions that are similar, returning their index and the reaction itself."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction")," ",(0,i.kt)("em",{parentName:"li"},"Reaction")," - Reaction with possible identical (but for temperature range) reactions in the network")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[int, Reaction]",": A dict with the identical reactions."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.remove_reaction_by_index"}),(0,i.kt)("h4",{id:"remove_reaction_by_index"},"remove","_","reaction","_","by","_","index"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def remove_reaction_by_index(reaction_idx: int) -> None\n")),(0,i.kt)("p",null,"Remove a reaction by its index in the internal _reactions_dict, this is the only way\nto remove reactions that are defined piecewise across temperature ranges."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_idx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Index of the reaction to remove")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.remove_reaction"}),(0,i.kt)("h4",{id:"remove_reaction"},"remove","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def remove_reaction(reaction: Reaction) -> None\n")),(0,i.kt)("p",null,"Remove the reaction by giving the object itself, this only works if the reaction is\nnot piecewise defined across the temperature ranges."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction")," ",(0,i.kt)("em",{parentName:"li"},"Reaction")," - The reaction you wish to delete.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_reaction"}),(0,i.kt)("h4",{id:"get_reaction"},"get","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction(reaction_idx: int) -> Reaction\n")),(0,i.kt)("p",null,"Obtain a reaction from the reaction set given an index of the internal _reactions_dict."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_idx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - The reaction index")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Reaction")," - the desired reaction")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_reaction"}),(0,i.kt)("h4",{id:"set_reaction"},"set","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_reaction(reaction_idx: int, reaction: Reaction) -> None\n")),(0,i.kt)("p",null,"This setter explicitely sets the reaction for a certain index."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_idx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - The index to be written to"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction")," ",(0,i.kt)("em",{parentName:"li"},"Reaction")," - The reaction to be added to the index.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_reaction_dict"}),(0,i.kt)("h4",{id:"get_reaction_dict"},"get","_","reaction","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_dict() -> dict[int, Reaction]\n")),(0,i.kt)("p",null,"Returns the whole internal reaction dictionary."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[int, Reaction]",": A copy of the internal reactions dictionary."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_reaction_dict"}),(0,i.kt)("h4",{id:"set_reaction_dict"},"set","_","reaction","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_reaction_dict(new_dict: dict[int, Reaction]) -> None\n")),(0,i.kt)("p",null,"Override the reactions dictionary with a new dictionar."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict","[int, Reaction]")," - The new reactions_dictionary.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_reaction_list"}),(0,i.kt)("h4",{id:"get_reaction_list"},"get","_","reaction","_","list"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_list() -> list[Reaction]\n")),(0,i.kt)("p",null,"Obtain all the reactions in the Network."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[Reaction]")," - A list with all the reaction objects")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.sort_reactions"}),(0,i.kt)("h4",{id:"sort_reactions"},"sort","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def sort_reactions() -> None\n")),(0,i.kt)("p",null,"Sort the reaction dictionary by reaction type first and by the first reactant second."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_species"}),(0,i.kt)("h4",{id:"add_species"},"add","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_species(species: Union[Union[Species, str], list[Union[Species,\n str]]])\n")),(0,i.kt)("p",null,"Add species to the network, given a (list of) species. If it is a list of strings,\nit tries to instantiate a species class with it. It also checks for duplicate entries and\nfilters out attempts to add reaction types to the species."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"Union[Union","[Species, str]",", list[Union","[Species, str]","]]")," - A (list of) species or strings.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError")," - If we cannot parse the (list of) reactions"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError")," - If an ice specie with binding energy of zero is added.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.remove_species"}),(0,i.kt)("h4",{id:"remove_species"},"remove","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def remove_species(specie_name: str) -> None\n")),(0,i.kt)("p",null,"Remove a specie from the network"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"specie_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Species to remove")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_species_list"}),(0,i.kt)("h4",{id:"get_species_list"},"get","_","species","_","list"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_species_list() -> list[Species]\n")),(0,i.kt)("p",null,"Obtain a list with all the species in the network"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[Species]")," - A list of all the species in the reaction network")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_species_dict"}),(0,i.kt)("h4",{id:"get_species_dict"},"get","_","species","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_species_dict() -> dict[str, Species]\n")),(0,i.kt)("p",null,"Get the internal dictionary that stores all the species, it consists\nof all species' names as key, with the species object as value."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[str, Species]",": A dictionary with the species"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_specie"}),(0,i.kt)("h4",{id:"get_specie"},"get","_","specie"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_specie(specie_name: str) -> Species\n")),(0,i.kt)("p",null,"Get the species of the reaction network (from the internal dictionary)"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"specie_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - the name of the species as a string")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Species")," - The species object")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_specie"}),(0,i.kt)("h4",{id:"set_specie"},"set","_","specie"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_specie(species_name: str, species: Species) -> None\n")),(0,i.kt)("p",null,"Set the species of the reaction network in the internal dictionary"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The name of the species as string"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - The Species object to set")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_species_dict"}),(0,i.kt)("h4",{id:"set_species_dict"},"set","_","species","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_species_dict(new_species_dict: dict[str, Species]) -> None\n")),(0,i.kt)("p",null,"Set the internal species dict"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_species_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict","[str, Species]")," - The new dictionary to set")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.sort_species"}),(0,i.kt)("h4",{id:"sort_species"},"sort","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def sort_species() -> None\n")),(0,i.kt)("p",null,"Sort the species based on their mass in ascending order. We always make sure the Electron is last."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_network"}),(0,i.kt)("h4",{id:"check_network"},"check","_","network"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_network() -> None\n")),(0,i.kt)("p",null,"Run through the list of reactions and check for obvious errors such\nas duplicate reactions, multiple freeze out routes (to warn, not necessarily\nan error), etc."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_and_filter_species"}),(0,i.kt)("h4",{id:"check_and_filter_species"},"check","_","and","_","filter","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_and_filter_species() -> None\n")),(0,i.kt)("p",null,"Check every speces in network appears in at least one reaction.\nRemove any that do not and alert user."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_bulk_species"}),(0,i.kt)("h4",{id:"add_bulk_species"},"add","_","bulk","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_bulk_species() -> None\n")),(0,i.kt)("p",null,"For three phase models, MakeRates will produce the version of the species in the bulk\nso that the user doesn't have to endlessly relist the same species"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_freeze_and_desorbs"}),(0,i.kt)("h4",{id:"check_freeze_and_desorbs"},"check","_","freeze","_","and","_","desorbs"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_freeze_and_desorbs() -> None\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"add_freeze_reactions()")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"add_desorb_reactions()")," automatically generate\nall desorption and freeze out reactions. However, user may want to change a species on freeze out\neg C+ becomes ",(0,i.kt)("inlineCode",{parentName:"p"},"C")," rather than ",(0,i.kt)("inlineCode",{parentName:"p"},"C"),"+. This function checks for that and updates species so they'll\nfreeze or desorb correctly when reactions are generated."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_freeze_reactions"}),(0,i.kt)("h4",{id:"add_freeze_reactions"},"add","_","freeze","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_freeze_reactions() -> None\n")),(0,i.kt)("p",null,"Save the user effort by automatically generating freeze out reactions"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_desorb_reactions"}),(0,i.kt)("h4",{id:"add_desorb_reactions"},"add","_","desorb","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_desorb_reactions() -> None\n")),(0,i.kt)("p",null,"Save the user effort by automatically generating desorption reactions"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_chemdes_reactions"}),(0,i.kt)("h4",{id:"add_chemdes_reactions"},"add","_","chemdes","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_chemdes_reactions() -> None\n")),(0,i.kt)("p",null,"We have the user list all Langmuir-Hinshelwood and Eley-Rideal\nreactions once. Then we duplicate so that the reaction branches\nwith products on grain and products desorbing."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_for_excited_species"}),(0,i.kt)("h4",{id:"check_for_excited_species"},"check","_","for","_","excited","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_for_excited_species() -> bool\n")),(0,i.kt)("p",null,"Check if there are any exicted species in the network, true if there are any."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_excited_surface_reactions"}),(0,i.kt)("h4",{id:"add_excited_surface_reactions"},"add","_","excited","_","surface","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_excited_surface_reactions() -> None\n")),(0,i.kt)("p",null,"All excited species will relax to the ground state if they do not react\nthe vibrational frequency of the species is used as a pseudo approximation of the rate coefficient\nWe assume all grain reactions have an excited variant. For example:\n",(0,i.kt)("inlineCode",{parentName:"p"},"A"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"B")," LH ",(0,i.kt)("inlineCode",{parentName:"p"},"C")," will have the variants:\n",(0,i.kt)("inlineCode",{parentName:"p"},"A"),(0,i.kt)("em",{parentName:"p"},", ",(0,i.kt)("inlineCode",{parentName:"em"},"B")," EXSOLID ",(0,i.kt)("inlineCode",{parentName:"em"},"C")," and ",(0,i.kt)("inlineCode",{parentName:"em"},"A"),", ",(0,i.kt)("inlineCode",{parentName:"em"},"B"))," EXSOLID ",(0,i.kt)("inlineCode",{parentName:"p"},"C"),"\nIf only one of the reactants in the base reaction has an excited counterpart then\nonly one excited version of that reaction is created."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_bulk_reactions"}),(0,i.kt)("h4",{id:"add_bulk_reactions"},"add","_","bulk","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_bulk_reactions() -> None\n")),(0,i.kt)("p",null,"We assume any reaction that happens on the surface of grains can also happen\nin the bulk (just more slowly due to binding energy). The user therefore only\nlists surface reactions in their input reaction file and we duplicate here."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.freeze_checks"}),(0,i.kt)("h4",{id:"freeze_checks"},"freeze","_","checks"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def freeze_checks() -> None\n")),(0,i.kt)("p",null,"Check that every species freezes out and alert the user if a\nspecies freezes out via mutiple routes. This isn't necessarily an\nerror so best just print."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.duplicate_checks"}),(0,i.kt)("h4",{id:"duplicate_checks"},"duplicate","_","checks"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def duplicate_checks() -> None\n")),(0,i.kt)("p",null,"Check reaction network to make sure no reaction appears twice unless\nthey have different temperature ranges."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.index_important_reactions"}),(0,i.kt)("h4",{id:"index_important_reactions"},"index","_","important","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def index_important_reactions() -> None\n")),(0,i.kt)("p",null,"We have a whole bunch of important reactions and we want to store\ntheir indices. We find them all here."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.index_important_species"}),(0,i.kt)("h4",{id:"index_important_species"},"index","_","important","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def index_important_species() -> None\n")),(0,i.kt)("p",null,"Obtain the indices for all the important reactions."),(0,i.kt)("a",{id:"uclchem.makerates.network.LoadedNetwork"}),(0,i.kt)("h2",{id:"loadednetwork-objects"},"LoadedNetwork Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class LoadedNetwork(Network)\n")),(0,i.kt)("p",null,"Network version that skips all steps and just loads two lists. This is another\nhere be dragons version, use this with exceeding caution as no checks are performed for you."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Network")," ",(0,i.kt)("strong",{parentName:"li"},"type")," - ",(0,i.kt)("em",{parentName:"li"},"description"))),(0,i.kt)("a",{id:"uclchem.makerates.network.LoadedNetwork.__init__"}),(0,i.kt)("h4",{id:"__init__-2"},"_","_","init","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __init__(species: list[Species], reactions: list[Reaction]) -> None\n")),(0,i.kt)("p",null,"A loader of networks without any checks."),(0,i.kt)("p",null,"Here be dragons."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - A list of species objects"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactions")," ",(0,i.kt)("em",{parentName:"li"},"list","[Reaction]")," - A list of reaction objects.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions"}),(0,i.kt)("h1",{id:"uclchemmakeratesio_functions"},"uclchem.makerates.io","_","functions"),(0,i.kt)("p",null,"Functions to read in the species and reaction files and write output files"),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.read_species_file"}),(0,i.kt)("h4",{id:"read_species_file"},"read","_","species","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def read_species_file(file_name: Path) -> list[Species]\n")),(0,i.kt)("p",null,"Reads in a Makerates species file"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fileName")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to file containing the species list")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list")," - List of Species objects")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.read_reaction_file"}),(0,i.kt)("h4",{id:"read_reaction_file"},"read","_","reaction","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def read_reaction_file(file_name: Path, species_list: list[Species],\n ftype: str) -> tuple[list[Reaction], list[Reaction]]\n")),(0,i.kt)("p",null,"Reads in a reaction file of any kind (user, UMIST, KIDA)\nproduces a list of reactions for the network, filtered by species_list"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - A file name for the reaction file to read."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - A list of chemical species to be used in the reading."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ftype")," ",(0,i.kt)("em",{parentName:"li"},"str")," - 'UMIST','UCL', or 'KIDA' to describe format of file_name")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list,list")," - Lists of kept and dropped reactions.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.check_reaction"}),(0,i.kt)("h4",{id:"check_reaction"},"check","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_reaction(reaction_row, keep_list) -> bool\n")),(0,i.kt)("p",null,"Checks a row parsed from a reaction file and checks it only contains acceptable things.\nIt checks if all species in the reaction are present, and adds the temperature range is none is specified."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_row")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List parsed from a reaction file and formatted to be able to called Reaction(reaction_row)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"keep_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - list of elements that are acceptable in the reactant or product bits of row")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - Whether the row contains acceptable entries.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.kida_parser"}),(0,i.kt)("h4",{id:"kida_parser"},"kida","_","parser"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def kida_parser(kida_file)\n")),(0,i.kt)("p",null,"KIDA used a fixed format file so we read each line in the chunks they specify\nand use python built in classes to convert to the necessary types.\nNOTE KIDA defines some of the same reaction types to UMIST but with different names\nand coefficients. We fix that by converting them here."),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.output_drops"}),(0,i.kt)("h4",{id:"output_drops"},"output","_","drops"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def output_drops(dropped_reactions: list[Reaction],\n output_dir: str,\n write_files=True)\n")),(0,i.kt)("p",null,"Writes the reactions that are dropped to disk/logs"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"dropped_reactions")," ",(0,i.kt)("em",{parentName:"li"},"list","[Reaction]")," - The reactions that were dropped"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_dir")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The directory that dropped_reactions.csv will be written to."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"write_files")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether or not to write the file. Defaults to True.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_outputs"}),(0,i.kt)("h4",{id:"write_outputs"},"write","_","outputs"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_outputs(network: Network, output_dir: str = None) -> None\n")),(0,i.kt)("p",null,"Write the ODE and Network fortran source files to the fortran source."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"network")," ",(0,i.kt)("em",{parentName:"li"},"network")," - The makerates Network class"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_dir")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - The directory to write to.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_species"}),(0,i.kt)("h4",{id:"write_species"},"write","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_species(file_name: Path, species_list: list[Species]) -> None\n")),(0,i.kt)("p",null,"Write the human readable species file. Note UCLCHEM doesn't use this file."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fileName")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to output file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species objects for network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_reactions"}),(0,i.kt)("h4",{id:"write_reactions"},"write","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_reactions(fileName, reaction_list) -> None\n")),(0,i.kt)("p",null,"Write the human readable reaction file. Note UCLCHEM doesn't use this file."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fileName")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to output file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of reaction objects for network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_odes_f90"}),(0,i.kt)("h4",{id:"write_odes_f90"},"write","_","odes","_","f90"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_odes_f90(file_name: Path, species_list: list[Species],\n reaction_list: list[Reaction], three_phase: bool) -> None\n")),(0,i.kt)("p",null,"Write the ODEs in Modern Fortran. This is an actual code file."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Path to file where code will be written"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species describing network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of reactions describing network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - Flag for whether this is a 3 phase network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_jacobian"}),(0,i.kt)("h4",{id:"write_jacobian"},"write","_","jacobian"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_jacobian(file_name: Path, species_list: list[Species]) -> None\n")),(0,i.kt)("p",null,"Write jacobian in Modern Fortran. This has never improved UCLCHEM's speed\nand so is not used in the code as it stands.\nCurrent only works for three phase model."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Path to jacobian file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"species_list")," - List of species AFTER being processed by build_ode_string")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.build_ode_string"}),(0,i.kt)("h4",{id:"build_ode_string"},"build","_","ode","_","string"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def build_ode_string(species_list: list[Species],\n reaction_list: list[Reaction], three_phase: bool) -> str\n")),(0,i.kt)("p",null,"A long, complex function that does the messy work of creating the actual ODE\ncode to calculate the rate of change of each species. Test any change to this code\nthoroughly because ODE mistakes are very hard to spot."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species in network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of reactions in network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - Bool denoting if this is a three phase network")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - One long string containing the entire ODE fortran code.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.species_ode_string"}),(0,i.kt)("h4",{id:"species_ode_string"},"species","_","ode","_","string"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def species_ode_string(n: int, species: Species) -> str\n")),(0,i.kt)("p",null,"Build the string of Fortran code for a species once it's loss and gains\nstrings have been produced."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"n")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Index of species in python format"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - species object")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - the fortran code for the rate of change of the species")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_evap_lists"}),(0,i.kt)("h4",{id:"write_evap_lists"},"write","_","evap","_","lists"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_evap_lists(network_file, species_list: list[Species]) -> None\n")),(0,i.kt)("p",null,"Two phase networks mimic episodic thermal desorption seen in lab (see Viti et al. 2004)\nby desorbing fixed fractions of material at specific temperatures. Three phase networks just\nuse binding energy and that fact we set binding energies in bulk to water by default.\nThis function writes all necessary arrays to the network file so these processes work."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"network_file")," ",(0,i.kt)("em",{parentName:"li"},"file")," - Open file object to which the network code is being written"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - List of species in network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.truncate_line"}),(0,i.kt)("h4",{id:"truncate_line"},"truncate","_","line"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def truncate_line(input_string: str, lineLength: int = 72) -> str\n")),(0,i.kt)("p",null,"Take a string and adds line endings at regular intervals\nkeeps us from overshooting fortran's line limits and, frankly,\nmakes for nicer ode.f90 even if human readability isn't very important"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"input_string")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Line of code to be truncated"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"lineLength")," ",(0,i.kt)("em",{parentName:"li"},"int, optional")," - rough line length. Defaults to 72.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - Code string with line endings at regular intervals")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_network_file"}),(0,i.kt)("h4",{id:"write_network_file"},"write","_","network","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_network_file(file_name: Path, network: Network)\n")),(0,i.kt)("p",null,"Write the Fortran code file that contains all network information for UCLCHEM.\nThis includes lists of reactants, products, binding energies, formationEnthalpies\nand so on."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The file name where the code will be written."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"network")," ",(0,i.kt)("em",{parentName:"li"},"Network")," - A Network object built from lists of species and reactions.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.find_reactant"}),(0,i.kt)("h4",{id:"find_reactant"},"find","_","reactant"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def find_reactant(species_list: list[str], reactant: str) -> int\n")),(0,i.kt)("p",null,"Try to find a reactant in the species list"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - A list of species in the network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactant")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The reactant to be indexed")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"int")," - The index of the reactant, if it is not found, 9999")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.get_desorption_freeze_partners"}),(0,i.kt)("h4",{id:"get_desorption_freeze_partners"},"get","_","desorption","_","freeze","_","partners"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_desorption_freeze_partners(\n reaction_list: list[Reaction]) -> list[Reaction]\n")),(0,i.kt)("p",null,"Every desorption has a corresponding freeze out eg desorption of ",(0,i.kt)("inlineCode",{parentName:"p"},"CO")," and freeze of CO.\nThis find the corresponding freeze out for every desorb so that when desorb>>freeze\nwe can turn off freeze out in UCLCHEM."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - Reactions in network")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list")," - list of indices of freeze out reactions matching order of desorptions.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.array_to_string"}),(0,i.kt)("h4",{id:"array_to_string"},"array","_","to","_","string"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def array_to_string(name: str,\n array: np.array,\n type: str = "int",\n parameter: bool = True) -> str\n')),(0,i.kt)("p",null,"Write an array to fortran source code"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Variable name of array in Fortran"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"array")," ",(0,i.kt)("em",{parentName:"li"},"iterable")," - List of values of array"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"type")," ",(0,i.kt)("em",{parentName:"li"},"str, optional"),' - The array\'s type. Must be one of "int","float", or "string".Defaults to "int".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"parameter")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether the array is a Fortran PARAMETER (constant). Defaults to True.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError"),' - Raises an error if type isn\'t "int","float", or "string"')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - String containing the Fortran code to declare this array.")),(0,i.kt)("a",{id:"uclchem.makerates.reaction"}),(0,i.kt)("h1",{id:"uclchemmakeratesreaction"},"uclchem.makerates.reaction"),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction"}),(0,i.kt)("h2",{id:"reaction-objects"},"Reaction Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class Reaction()\n")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_reactants"}),(0,i.kt)("h4",{id:"get_reactants"},"get","_","reactants"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reactants() -> list[str]\n")),(0,i.kt)("p",null,"Get the four reactants present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[str]")," - The four reactants names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_sorted_reactants"}),(0,i.kt)("h4",{id:"get_sorted_reactants"},"get","_","sorted","_","reactants"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_sorted_reactants() -> list[str]\n")),(0,i.kt)("p",null,"Get the four reactants present in the reaction, sorted for fast comparisons"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactants")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four sorted reactant names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_reactants"}),(0,i.kt)("h4",{id:"set_reactants"},"set","_","reactants"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_reactants(reactants: list[str]) -> None\n")),(0,i.kt)("p",null,"Set the four reactants present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactants")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four reactants names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_products"}),(0,i.kt)("h4",{id:"get_products"},"get","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_products() -> list[str]\n")),(0,i.kt)("p",null,"Get the four products present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactants")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four products names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_sorted_products"}),(0,i.kt)("h4",{id:"get_sorted_products"},"get","_","sorted","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_sorted_products() -> list[str]\n")),(0,i.kt)("p",null,"Get the four products present in the reaction, sorted for fast comparisons"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"products")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four sorted products names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_products"}),(0,i.kt)("h4",{id:"set_products"},"set","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_products(products: list[str]) -> None\n")),(0,i.kt)("p",null,"Set the four products present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"products")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four products names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_alpha"}),(0,i.kt)("h4",{id:"get_alpha"},"get","_","alpha"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_alpha() -> float\n")),(0,i.kt)("p",null,"Get the alpha parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the alpha parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_alpha"}),(0,i.kt)("h4",{id:"set_alpha"},"set","_","alpha"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_alpha(alpha: float) -> None\n")),(0,i.kt)("p",null,"Set the alpha parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"alpha")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the alpha parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_beta"}),(0,i.kt)("h4",{id:"get_beta"},"get","_","beta"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_beta() -> float\n")),(0,i.kt)("p",null,"Get the beta parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the beta parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_beta"}),(0,i.kt)("h4",{id:"set_beta"},"set","_","beta"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_beta(beta: float) -> None\n")),(0,i.kt)("p",null,"Set the beta parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"beta")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the beta parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_gamma"}),(0,i.kt)("h4",{id:"set_gamma"},"set","_","gamma"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_gamma(gamma: float) -> None\n")),(0,i.kt)("p",null,"Set the gamma parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"gamma")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the gamma parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_gamma"}),(0,i.kt)("h4",{id:"get_gamma"},"get","_","gamma"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_gamma() -> float\n")),(0,i.kt)("p",null,"Get the gamma parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the gamma parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_templow"}),(0,i.kt)("h4",{id:"set_templow"},"set","_","templow"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_templow(templow: float) -> None\n")),(0,i.kt)("p",null,"Set the lower temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"templow")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the lower temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_templow"}),(0,i.kt)("h4",{id:"get_templow"},"get","_","templow"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_templow() -> float\n")),(0,i.kt)("p",null,"Get the lower temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the lower temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_temphigh"}),(0,i.kt)("h4",{id:"set_temphigh"},"set","_","temphigh"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_temphigh(temphigh: float) -> None\n")),(0,i.kt)("p",null,"Set the higher temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"templow")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the higher temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_temphigh"}),(0,i.kt)("h4",{id:"get_temphigh"},"get","_","temphigh"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_temphigh() -> float\n")),(0,i.kt)("p",null,"Get the higher temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the higher temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.NANCheck"}),(0,i.kt)("h4",{id:"nancheck"},"NANCheck"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def NANCheck(a)\n")),(0,i.kt)("p",null,"Convert any Falsy statement to a NAN string"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"a")," - thing to check for falsiness")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - input a if truthy, otherwise NAN")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_reaction_type"}),(0,i.kt)("h4",{id:"get_reaction_type"},"get","_","reaction","_","type"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_type() -> str\n")),(0,i.kt)("p",null,"Get the type of a reaction from the reactants\nFirst check the third reactant for a reaction type, then the second. If there are none\nin there, it will be regarded as a two body reaction."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," str:"),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.convert_to_bulk"}),(0,i.kt)("h4",{id:"convert_to_bulk"},"convert","_","to","_","bulk"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def convert_to_bulk() -> None\n")),(0,i.kt)("p",null,"Convert the surface species to bulk species in place for this reaction."),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.__eq__"}),(0,i.kt)("h4",{id:"__eq__-1"},"_","_","eq","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __eq__(other) -> bool\n")),(0,i.kt)("p",null,"Check for equality against another reaction based on the products and reactants.\nNote that it does not check for the temperature ranges that the reactions might have!\nThe Reaction.check_temperature_collision can be used for this purpose."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," - Another reaction set.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - equality")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.check_temperature_collision"}),(0,i.kt)("h4",{id:"check_temperature_collision"},"check","_","temperature","_","collision"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_temperature_collision(other) -> bool\n")),(0,i.kt)("p",null,"Check if two reactions have overlapping temperature ranges, returning True means there is a collision."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," - Another reaction")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"NotImplementedError")," - Currently we can only compare against instantiated Reaction objects.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - Whether there is a collision (True), or not (False)")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.changes_surface_count"}),(0,i.kt)("h4",{id:"changes_surface_count"},"changes","_","surface","_","count"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def changes_surface_count()\n")),(0,i.kt)("p",null,"This checks whether a grain reaction changes number of particles on the surface\n2 reactants to 2 products won't but two reactants combining to one will."),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.changes_total_mantle"}),(0,i.kt)("h4",{id:"changes_total_mantle"},"changes","_","total","_","mantle"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def changes_total_mantle()\n")),(0,i.kt)("p",null,"Check if the total grains on the mantle are changed by the reaction."),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.generate_ode_bit"}),(0,i.kt)("h4",{id:"generate_ode_bit"},"generate","_","ode","_","bit"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def generate_ode_bit(i: int, species_names: list, three_phase: bool)\n")),(0,i.kt)("p",null,"Every reaction contributes a fixed rate of change to whatever species it\naffects. We create the string of fortran code describing that change here."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"i")," ",(0,i.kt)("em",{parentName:"li"},"int")," - index of reaction in network in python format (counting from 0)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_names")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species names so we can find index of reactants in species list"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - Bool indicating whether this is three phase network")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/178ac850.f03290f8.js b/assets/js/178ac850.f03290f8.js deleted file mode 100644 index f172e037..00000000 --- a/assets/js/178ac850.f03290f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4006],{3905:(a,e,s)=>{s.d(e,{Zo:()=>i,kt:()=>o});var t=s(7294);function m(a,e,s){return e in a?Object.defineProperty(a,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[e]=s,a}function n(a,e){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),s.push.apply(s,t)}return s}function p(a){for(var e=1;e=0||(m[s]=a[s]);return m}(a,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(a,s)&&(m[s]=a[s])}return m}var N=t.createContext({}),l=function(a){var e=t.useContext(N),s=e;return a&&(s="function"==typeof a?a(e):p(p({},e),a)),s},i=function(a){var e=l(a.components);return t.createElement(N.Provider,{value:e},a.children)},k={inlineCode:"code",wrapper:function(a){var e=a.children;return t.createElement(t.Fragment,{},e)}},c=t.forwardRef((function(a,e){var s=a.components,m=a.mdxType,n=a.originalType,N=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),c=l(s),o=m,h=c["".concat(N,".").concat(o)]||c[o]||k[o]||n;return s?t.createElement(h,p(p({ref:e},i),{},{components:s})):t.createElement(h,p({ref:e},i))}));function o(a,e){var s=arguments,m=e&&e.mdxType;if("string"==typeof a||m){var n=s.length,p=new Array(n);p[0]=c;var r={};for(var N in e)hasOwnProperty.call(e,N)&&(r[N]=e[N]);r.originalType=a,r.mdxType="string"==typeof a?a:m,p[1]=r;for(var l=2;l{s.r(e),s.d(e,{assets:()=>i,contentTitle:()=>N,default:()=>o,frontMatter:()=>r,metadata:()=>l,toc:()=>k});var t=s(7462),m=s(3366),n=(s(7294),s(3905)),p=["components"],r={id:"grain",title:"Grain Surface Reactions"},N=void 0,l={unversionedId:"grain",id:"version-v3.3.0/grain",title:"Grain Surface Reactions",description:"Whilst the basic treatment of gas phase chemistry is well established, grain surface chemistry is more complex. There are three possible ways to treat grain surface chemistry in UCLCHEM. In general we assume that:",source:"@site/versioned_docs/version-v3.3.0/chem-grain.md",sourceDirName:".",slug:"/grain",permalink:"/docs/grain",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"grain",title:"Grain Surface Reactions"},sidebar:"docs",previous:{title:"Gas Phase Reactions",permalink:"/docs/gas"},next:{title:"Adsorption & Desorption Reactions",permalink:"/docs/desorb"}},i={},k=[{value:"Langmuir-Hinshelwood Mechanism",id:"langmuir-hinshelwood-mechanism",level:3},{value:"Eley-Rideal Mechanism",id:"eley-rideal-mechanism",level:3}],c={toc:k};function o(a){var e=a.components,s=(0,m.Z)(a,p);return(0,n.kt)("wrapper",(0,t.Z)({},c,s,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Whilst the basic treatment of gas phase chemistry is well established, grain surface chemistry is more complex. There are three possible ways to treat grain surface chemistry in UCLCHEM. In general we assume that:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"All dust grains are well covered by the species in question so we can take a rate equation approach based on fractional abundance rather than tracking if molecule A is on the same dust grain as molecule B."),(0,n.kt)("li",{parentName:"ul"},"Grains are spherical objects of a uniform size."),(0,n.kt)("li",{parentName:"ul"},"All species are thermalized on the grains.")),(0,n.kt)("p",null,"This allows a fairly straight forward treatment of the grain chemistry. Below we list several processes that are important in UCLCHEM's treatment of the grain chemistry."),(0,n.kt)("h3",{id:"langmuir-hinshelwood-mechanism"},"Langmuir-Hinshelwood Mechanism"),(0,n.kt)("p",null,"Reactions via diffusion of reactants across the grain surface was added to UCLCHEM by ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1093/mnras/stx2960"},"Quenard et al. 2018"),", drawing their formalism from ",(0,n.kt)("a",{parentName:"p",href:"http://adsabs.harvard.edu/doi/10.1086/191713"},"Hasegawa et al. 1992"),", ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1088/0004-637X/735/1/15"},"Garrod & Pauly 2011"),", and ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1093/mnras/stw887"},"Ruaud et al. 2016"),". These reactions can be included in your grain file in the form,"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"#H,#CO,LH,#HCO,,,,alpha,0.0,gamma,,,\n")),(0,n.kt)("p",null,"where alpha is a branching ratio if you include multiple versions of the same reaction and gamma is the energy barrier to the reaction. Including this reaction in your MakeRates input will result in two reactions being created in the actual network: one with gas phase products and one with grain surface products. This is to account for the desorption of products of exothermic reactions and the branching ratio is determined within UCLCHEM using the binding energy of the products and energy released by the reaction following ",(0,n.kt)("a",{parentName:"p",href:"https://www.aanda.org/10.1051/0004-6361/201525981"},"Minissale et al. 2016"),". The equivalent reactions will also be generated for the ice bulk if you are using a three phase network so you only need to list LH reactions with surface reactants and products."),(0,n.kt)("p",null,"If we follow the rate of change of the absolute number of a species on the surface of a grain (",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"S"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_S")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05764em"}},"S")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),"), we get"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s")))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dN_s(i)}{dt} = -\\frac{k_{ij} k_{diff}}{N_{sites}} N_s(i)N_s(j)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.20744em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{ij}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the reaction rate when species i and j are in adjacent sites, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{diff}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the rate at which these species diffuse between sites and ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_{sites}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the number of binding sites on the surface. For reactions in the bulk ice, we multiply the number of sites per layer by the number of mantle layers. If we multiply both sides by the dust concentration, we get the LHS in the standard form of rate of change of concentration and convert one N on the RHS to a concentration. We can also multiply the RHS by ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_d")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),"/",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_d")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," to convert the other N."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d")))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_s(i)}{dt} = -\\frac{k_{ij} k_{diff}}{N_{sites} n_d} n_s(i)n_s(j)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.20744em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"Finally, we want a rate of change of fractional abundance so we can divide through by ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),". Since ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d")),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"d")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_d = X_d n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),", we can also cancel a factor of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," in the RHS."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"d")))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_s(i)}{dt} = -\\frac{k_{ij} k_{diff}}{N_{sites} X_d} X_s(i)X_s(j)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.20744em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"This is the final rate of change which is sent to the ODE solver. See ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1093/mnras/stx2960"},"Quenard et al. 2018")," for a discussion of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{ij}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," and ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"K_{diff}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))))))),"."),(0,n.kt)("p",null,"Note, these reactions can become ",(0,n.kt)("em",{parentName:"p"},"very")," fast at high temperatures and will eventually break the integrator with a careful, network depedent choice of tolerances. To avoid this, we stop all grain chemistry at MAX_GRAIN_TEMP in UCLCHEM which is set by default to 150 K. By this temperature, the ice will have almost entirely sublimated and so stopping the chemistry will have a negligible effect on abundances."),(0,n.kt)("h3",{id:"eley-rideal-mechanism"},"Eley-Rideal Mechanism"),(0,n.kt)("p",null,"Reactions that occur when a species colliding with a dust grain lands on a binding site occupied by another reactant are also included in UCLCHEM. They can be included in your grain file in the form,"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"H,#CO,ER,#HCO,,,,alpha,0.0,gamma,,,\n")),(0,n.kt)("p",null,"and produce gas and grain surface products in the same way as the Langmuir-Hinshelwood reactions. These reactions have an ODE of the form"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"r"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"z"),(0,n.kt)("mi",{parentName:"mrow"},"e"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"E")),(0,n.kt)("mi",{parentName:"mfrac"},"T")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_s(i)}{dt} = -k_{i,freeze} \\exp(\\frac{-E}{T}) \\frac{n_s(j)}{n_{s}} n_s(i)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02778em"}},"r"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.04398em"}},"z"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"r"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"z"),(0,n.kt)("mi",{parentName:"mrow"},"e")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{i,freeze}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02778em"}},"r"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.04398em"}},"z"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the freeze out rate of the gas phase reactant (ie the rate at which it collides with the grains), ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"E")),(0,n.kt)("mi",{parentName:"mfrac"},"T")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\exp(\\frac{-E}{T})")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.217331em",verticalAlign:"-0.345em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.872331em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.6550000000000002em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.13889em"}},"T")))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.394em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05764em"}},"E"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.345em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))," is the probability of a reaction occuring given the energy barrier, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_s")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the total concentration of ice species, and therefore ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"o"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"l"))))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{n_s(j)}{n_{s,total}}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.55808em",verticalAlign:"-0.5480799999999999em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.01em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.6550000000000002em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3448em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3487714285714287em",marginLeft:"0em",marginRight:"0.07142857142857144em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.5em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.29011428571428566em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.485em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.16454285714285719em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.357em",marginLeft:"0em",marginRight:"0.07142857142857144em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.5em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.143em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen mtight"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose mtight"},")"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.5480799999999999em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))," is the fraction of surface sites occupied by the surface reactant. This reduces to"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"r"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"z"),(0,n.kt)("mi",{parentName:"mrow"},"e"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"E")),(0,n.kt)("mi",{parentName:"mfrac"},"T")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_s(i)}{dt} = -k_{i,freeze} \\exp(\\frac{-E}{T}) \\frac{X_s(j)}{X_{s}} X_s(i)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02778em"}},"r"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.04398em"}},"z"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1b622d29.8650c532.js b/assets/js/1b622d29.8650c532.js deleted file mode 100644 index 8ed9be13..00000000 --- a/assets/js/1b622d29.8650c532.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1418],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var l=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=l.createContext({}),u=function(e){var t=l.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=u(e.components);return l.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},p=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=u(n),k=a,h=p["".concat(i,".").concat(k)]||p[k]||c[k]||r;return n?l.createElement(h,o(o({ref:t},d),{},{components:n})):l.createElement(h,o({ref:t},d))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=p;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>k,frontMatter:()=>s,metadata:()=>u,toc:()=>c});var l=n(7462),a=n(3366),r=(n(7294),n(3905)),o=["components"],s={},i="Running Your First Models",u={unversionedId:"first_model",id:"version-v3.3.0/first_model",title:"Running Your First Models",description:"In this notebook, we demonstrate the basic use of UCLCHEM's python module by running a simple model and then using the analysis functions to examine the output.",source:"@site/versioned_docs/version-v3.3.0/first_model.md",sourceDirName:".",slug:"/first_model",permalink:"/docs/first_model",draft:!1,tags:[],version:"v3.3.0",frontMatter:{},sidebar:"docs",previous:{title:"Tutorials",permalink:"/docs/category/tutorials"},next:{title:"Advanced Physical Modelling",permalink:"/docs/modelling_objects"}},d={},c=[{value:"A Simple Cloud",id:"a-simple-cloud",level:2},{value:"Checking the output",id:"checking-the-output",level:2},{value:"Plotting Results",id:"plotting-results",level:2}],p={toc:c};function k(e){var t=e.components,s=(0,a.Z)(e,o);return(0,r.kt)("wrapper",(0,l.Z)({},p,s,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"running-your-first-models"},"Running Your First Models"),(0,r.kt)("p",null,"In this notebook, we demonstrate the basic use of UCLCHEM's python module by running a simple model and then using the analysis functions to examine the output."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\n")),(0,r.kt)("h2",{id:"a-simple-cloud"},"A Simple Cloud"),(0,r.kt)("p",null,"UCLCHEM's ",(0,r.kt)("inlineCode",{parentName:"p"},"cloud()")," model is a spherical cloud of isothermal gas. We can keep a constant density or have it increase over time following a freefall equation. This model is generally useful whenever you want to model a homogeneous cloud of gas under constant conditions. For example, in the inner parts of a molecular cloud where Av ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("mo",{parentName:"mrow"},"\u2273")),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\gtrsim")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.95916em",verticalAlign:"-0.22958em"}}),(0,r.kt)("span",{parentName:"span",className:"mrel amsrm"},"\u2273")))))," 10 there are very few depth dependent processes. You may wish to model the whole of this UV shielded portion of the cloud with a single ",(0,r.kt)("inlineCode",{parentName:"p"},"cloud()")," model."),(0,r.kt)("p",null,"Due to the large number of parameters in a chemical model and the way fortran and python interaction, we find it is easiest to do parameter input through python dictionaries. In this block, we define param_dict which contains the parameters we wish to modify for this run. Every ",(0,r.kt)("inlineCode",{parentName:"p"},"uclchem.model")," function accepts a dictionary as an optional argument. Every parameter has a default value which is overriden if that parameter is specified in this dictionary. You can find a complete list of modifiable parameters and their default values in ",(0,r.kt)("a",{parentName:"p",href:"/docs/parameters"},"our parameter docs"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'# set a parameter dictionary for phase 1 collapse model\n\nout_species = ["SO","CO"]\nparam_dict = {\n "endAtFinalDensity": False,#stop at finalTime\n "freefall": False,#don\'t increase density in freefall\n "initialDens": 1e4, #starting density\n "initialTemp": 10.0,#temperature of gas\n "finalTime": 1.0e6, #final time\n "rout":0.1, #radius of cloud in pc\n "baseAv":1.0, #visual extinction at cloud edge.\n "outputFile": "../examples/test-output/static-full.dat",#full UCLCHEM output\n "abundSaveFile": "../examples/test-output/startstatic.dat",#save final abundances to file\n}\nresult = uclchem.model.cloud(param_dict=param_dict,out_species=out_species)\nprint(result)\n\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"[1, 3.331065659699488e-11, 3.576305642378658e-05]\n")),(0,r.kt)("h2",{id:"checking-the-output"},"Checking the output"),(0,r.kt)("p",null,"At the end of the previous cell, we printed ",(0,r.kt)("inlineCode",{parentName:"p"},"result")," which is a list returned by every UCLCHEM model function. The first element is always an integer which will be positive if the code completed and negative otherwise. You can send negative values to ",(0,r.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to get a more detailed error message."),(0,r.kt)("p",null,"The subsequent elements are the final abundances of any species listed in ",(0,r.kt)("inlineCode",{parentName:"p"},"out_species"),", in this case we have the abundance of SO and CO. This is useful when we want to use UCLCHEM as part of something like an MCMC procedure, obtaining abundances for given parameters. However, we also write the final abundances of all species to ",(0,r.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," and the abundances of all species at every time step in ",(0,r.kt)("inlineCode",{parentName:"p"},"outputFile")," so it is not necessary to acquire abundances in this way."),(0,r.kt)("p",null,"The output file is just a simple csv with some header rows, UCLCHEM has a utility function to read that file into a pandas dataframe. Let's load it up and look at it."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'result_df=uclchem.analysis.read_output_file("../examples/test-output/static-full.dat")\nresult_df.head()\n')),(0,r.kt)("div",null,(0,r.kt)("table",{border:"1",class:"dataframe"},(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("th",null),(0,r.kt)("th",null,"Time"),(0,r.kt)("th",null,"Density"),(0,r.kt)("th",null,"gasTemp"),(0,r.kt)("th",null,"av"),(0,r.kt)("th",null,"zeta"),(0,r.kt)("th",null,"point"),(0,r.kt)("th",null,"H"),(0,r.kt)("th",null,"#H"),(0,r.kt)("th",null,"H+"),(0,r.kt)("th",null,"@H"),(0,r.kt)("th",null,"..."),(0,r.kt)("th",null,"HS2+"),(0,r.kt)("th",null,"HSO2+"),(0,r.kt)("th",null,"H2S2+"),(0,r.kt)("th",null,"H2S2"),(0,r.kt)("th",null,"#H2S2"),(0,r.kt)("th",null,"@H2S2"),(0,r.kt)("th",null,"E-"),(0,r.kt)("th",null,"BULK"),(0,r.kt)("th",null,"SURFACE"),(0,r.kt)("th",null,"radfield"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("th",null,"0"),(0,r.kt)("td",null,"0.000000e+00"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"1"),(0,r.kt)("td",null,"1.000000e-07"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.680300e-13"),(0,r.kt)("td",null,"1.789040e-17"),(0,r.kt)("td",null,"4.269620e-20"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.629010e-20"),(0,r.kt)("td",null,"7.488850e-13"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"2"),(0,r.kt)("td",null,"1.000000e-06"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.646510e-12"),(0,r.kt)("td",null,"1.789080e-16"),(0,r.kt)("td",null,"4.219000e-18"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"1.631720e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000020e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.562330e-18"),(0,r.kt)("td",null,"7.444370e-12"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"3"),(0,r.kt)("td",null,"1.000000e-05"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.641430e-11"),(0,r.kt)("td",null,"1.789520e-15"),(0,r.kt)("td",null,"4.212520e-16"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"7.762720e-29"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000050e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000010e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.554260e-16"),(0,r.kt)("td",null,"7.438940e-11"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"4"),(0,r.kt)("td",null,"1.000000e-04"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.480630e-10"),(0,r.kt)("td",null,"1.793810e-14"),(0,r.kt)("td",null,"4.079690e-14"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"7.864380e-27"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000070e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000150e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.425070e-14"),(0,r.kt)("td",null,"7.351600e-10"),(0,r.kt)("td",null,"1.0")))),(0,r.kt)("p",null,"5 rows \xd7 321 columns")),(0,r.kt)("p",null,"We can also test whether the model run went well by checking for element conservation. We do this because integrator errors often show up as a failure to conserve elemental abundances. "),(0,r.kt)("p",null,"We can use ",(0,r.kt)("inlineCode",{parentName:"p"},"check_element_conservation()")," to test whether we conserve elements in this run. This function returns a dictionary where each entry gives the change in the total abundance of an element as a percentage of the original abundance. In an ideal case, these values are 0\\% indicating the total abundance at the end of the model is exactly the same as the total at the start."),(0,r.kt)("p",null,"Changes of less than 1\\% are fine for many cases but if they are too high, you could consider changing the ",(0,r.kt)("inlineCode",{parentName:"p"},"reltol")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"abstol")," parameters that control the integrator accuracy. They are error tolerance so smaller values lead to smaller errors and (usually) longer integration times. The default values were chosen by running a large grid of models and choosing the tolerances with the lowest average run time from those that conserved elements well and rarely failed. Despite this, there are no one-size-fits-all perfect tolerances and you may run into issues with different networks or models."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'conservation=uclchem.analysis.check_element_conservation(result_df,element_list=["H","N","C","O","S"])\nprint("Percentage change in total abundances:")\nprint(conservation)\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"Percentage change in total abundances:\n{'H': '0.001%', 'N': '0.000%', 'C': '0.000%', 'O': '0.000%', 'S': '0.000%'}\n")),(0,r.kt)("h2",{id:"plotting-results"},"Plotting Results"),(0,r.kt)("p",null,"Finally, you will want to plot your results. This can be done with any plotting library but UCLCHEM does provide a few functions to make quick plots. Note the use of $ symbols in the species list below, this gets the total ice abundance of a species. For two phase models, this is just the surface abudance but for three phase it is the sum of surface and bulk."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'species=["H","H2","$H","$H2","H2O","$H2O","CO","$CO","$CH3OH","CH3OH"]\nfig,ax=uclchem.analysis.create_abundance_plot(result_df,species,figsize=(10,7))\nax=ax.set(xscale="log",ylim=(1e-15,1),xlim=(1e3,1e6))\n')),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"png",src:n(8899).Z,width:"712",height:"496"})),(0,r.kt)("p",null,"and that's it! You've run your first UCLCHEM model, checked that the element conservation is correct, and plotted the abundances."))}k.isMDXComponent=!0},8899:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/first_model_9_0-fff8b0e800895dbb0e755cc2b9459720.png"}}]); \ No newline at end of file diff --git a/assets/js/1c8e445f.ddb57b80.js b/assets/js/1c8e445f.ddb57b80.js new file mode 100644 index 00000000..3ccbf1d1 --- /dev/null +++ b/assets/js/1c8e445f.ddb57b80.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5591],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var s=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,s)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=s.createContext({}),p=function(e){var t=s.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=p(e.components);return s.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return s.createElement(s.Fragment,{},t)}},u=s.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(a),h=n,d=u["".concat(l,".").concat(h)]||u[h]||m[h]||r;return a?s.createElement(d,i(i({ref:t},c),{},{components:a})):s.createElement(d,i({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>p,toc:()=>m});var s=a(7462),n=a(3366),r=(a(7294),a(3905)),i=["components"],o={id:"network",title:"Creating a Network"},l=void 0,p={unversionedId:"network",id:"version-v3.3.1/network",title:"Creating a Network",description:"MakeRates",source:"@site/versioned_docs/version-v3.3.1/start-network.md",sourceDirName:".",slug:"/network",permalink:"/docs/network",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"network",title:"Creating a Network"},sidebar:"docs",previous:{title:"Installation",permalink:"/docs/"},next:{title:"Model Parameters",permalink:"/docs/parameters"}},c={},m=[{value:"MakeRates",id:"makerates",level:2},{value:"Input",id:"input",level:2},{value:"Default Network",id:"default-network",level:2},{value:"Outputs",id:"outputs",level:2},{value:"What MakeRates Does",id:"what-makerates-does",level:2},{value:"Creating your own Network",id:"creating-your-own-network",level:2},{value:"Species list",id:"species-list",level:4},{value:"Reaction list",id:"reaction-list",level:4},{value:"Three Phase Chemistry",id:"three-phase-chemistry",level:2}],u={toc:m};function h(e){var t=e.components,a=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"makerates"},"MakeRates"),(0,r.kt)("p",null,"In order to make a chemical model flexible, the ability to solve a user supplied chemical network is a must. UCLCHEM uses a preprocessing python script to turn csv lists of species and reactions into fortran files for use in the main code. This script is called MakeRates and can be found in the Makerates subdirectory of the repository. It combines a gas phase reaction database with user supplied lists of species and additional reactions into the necessary Fortran code to run UCLCHEM. It also supplies a number of human readable outputs."),(0,r.kt)("p",null,"In the sections below, we discuss how to build your network and set the inputs for MakeRates but once that is done, you can run MakeRates with the following commands:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd MakeRates\npython MakeRates.py\ncd ..\npip install -e . \n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note the pip install at the end of the process. Any output from MakeRates requires that the code be recompiled because MakeRates produces new source code for UCLCHEM!")),(0,r.kt)("h2",{id:"input"},"Input"),(0,r.kt)("p",null,"Makerates is controlled using a yaml file ",(0,r.kt)("inlineCode",{parentName:"p"},"Makerates/user_settings.yaml"),". By changing the values in this file, you can create different networks. The default values of this file are copied below."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"#Your list of all species\nspecies_file : inputFiles/default_species.csv\n\n#core reactions from gas phase database\ndatabase_reaction_file : inputFiles/umist12-ucledit.csv\ndatabase_reaction_type : UMIST\n\n#set of additional reactions: eg grain network\ncustom_reaction_file : inputFiles/default_grain_network.csv\ncustom_reaction_type : UCL\n\n#whether to automatically expand to three phase network\nthree_phase : True\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"species_file")," is a csv list of species and their properties. We provide a default list and detailed instructions below."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"database_reaction_file")," is your first reaction file, we expect most users to use UMIST12 or KIDA2014 for this but you could create your own file from an alternative database. Makerates can read files formatted in the same manner as the UMIST or KIDA databases as well as our own simple csv format, the ",(0,r.kt)("inlineCode",{parentName:"p"},"database_reaction_type")," setting lets MakeRates know which and should be set to 'UMIST', 'KIDA', or 'UCL'."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"custom_reaction_file")," is an additional reaction file. In the example file, we include all of our grain surface reactions which is the intended use of this file. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"three_phase")," is a toggle that tells MakeRates whether to automatically expand your network into a three phase model."),(0,r.kt)("h2",{id:"default-network"},"Default Network"),(0,r.kt)("p",null,"A basic version of each of the required file is supplied in the repository. The network that MakeRates produces from those files is also include in the source code so that a new user who simply installs UCLCHEM without running MakeRates will be using our default network. These default files serve largely as examples of how the files should be formatted and we also describe each one below so that the user can produce their own network."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"We do not endorse the default network"),", we have simply produced a grain surface network that was relatively up to date in 2018. It produces reasonable ice mantle abundances for major species and ignores larger COMs. We strongly suggest any published work be based on a network in which the user has confidence. However, where the user is not greatly concerned with grain surface chemistry, the default network is a good starting point."),(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("p",null,"Outputs from MakeRates are automatically moved to the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/")," directory so the user can ",(0,r.kt)("inlineCode",{parentName:"p"},"pip install .")," and update their installation of UCLCHEM to use their new network. However, by adding the parameter ",(0,r.kt)("inlineCode",{parentName:"p"},"output_directory")," to the yaml file, you can have all the files moved to a directory instead without copying them to your UCLCHEM src folder. If you do, the following files will be produced:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"network.f90 - Fortran arrays containing lists of species names and properties (mass, binding energy etc) as well as reaction reactants, products and rate coefficients."),(0,r.kt)("li",{parentName:"ul"},"odes.f90 - Code to calculate the rate of change of each species' abundance for the numerical solver"),(0,r.kt)("li",{parentName:"ul"},"species.csv - A list of all species in the network and their properties. Made for humans not UCLCHEM."),(0,r.kt)("li",{parentName:"ul"},"reactions.csv - A list of all reactions including reactants, products and coefficients. Made for humans not UCLCHEM.")),(0,r.kt)("h2",{id:"what-makerates-does"},"What MakeRates Does"),(0,r.kt)("p",null,"MakeRates does the following:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Combines the two input reaction lists"),(0,r.kt)("li",{parentName:"ul"},"Filters to remove any reactions containing species not in the input species list"),(0,r.kt)("li",{parentName:"ul"},"Adds freeze out and desorption reactions for all species"),(0,r.kt)("li",{parentName:"ul"},"Creates branching reactions for Langmuir-Hinshelwood and Eley-Rideal reactions where products chemically desorb"),(0,r.kt)("li",{parentName:"ul"},"Optionally: creates additional reactions and species needed for a three phase network"),(0,r.kt)("li",{parentName:"ul"},"Does basic network consistency checks and alerts user of problems"),(0,r.kt)("li",{parentName:"ul"},"Writes fortran files for UCLCHEM"),(0,r.kt)("li",{parentName:"ul"},"Writes other output files")),(0,r.kt)("h2",{id:"creating-your-own-network"},"Creating your own Network"),(0,r.kt)("p",null,"To create your own network you need to produce a species list and a reaction list."),(0,r.kt)("h4",{id:"species-list"},"Species list"),(0,r.kt)("p",null,"The species list should simply be a list with one row per species in the network. Each row should contain the species name, mass, binding energy and enthalpy of formation. The latter two are only used for surface species so can be set to zero for the gas phase species. MakeRates will check the mass is correct for each species and alert you of discrepancies."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"C,12,0,0,0,0,0\n#CH4,16,960,0,0.7,0.667,-15.9\n")),(0,r.kt)("p",null,"In the above example, C is a gas phase species so we have set the mass but ignored the other variables. #CH4 is methane in the ice so we have additionally set a binding energy of 960 K and enthalpy of formation of -15.9 kcal/mol. The other three values (0, 0.7, 0.667) are desorption fractions that three phase chemistry networks ignore. For two phase networks, we mimic the multiple desorption events seen in TPD experiments by setting these fractions. See ",(0,r.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2004MNRAS.354.1141V/abstract"},"Viti et al. 2004")," for more information."),(0,r.kt)("p",null,"The enthalpy of formation for essentially any species can be found in chemical databases such as the ",(0,r.kt)("a",{parentName:"p",href:"https://webbook.nist.gov/"},"NIST web book"),". They're usually in kj/mol but the conversion to kcal/mol is easy enough and NIST has an option to switch values to kcal. A fantastic resource for binding energies is ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1016/j.molap.2017.01.002"},"Wakelam et al. 2017")," but these are harder to find in general. In the absolute worse case, you can sum up the binding energies of sub-groups in your molecule but this is pretty inaccurate."),(0,r.kt)("h4",{id:"reaction-list"},"Reaction list"),(0,r.kt)("p",null,"The second reaction list is intended to contain your surface network but can also be used to augment the gas phase databases by including additional gas phase reactions. The reaction list should be a list with one row per reaction and each row should be a comma separated list of 3 reactants, 4 products, three coefficients (alpha,beta,gamma) and a minimum and maximum temperature. Any missing values such as a third reactant can be left blank. In particular, the temperatures are optional but can be useful when you include multiple versions of the same reaction. In that case, UCLCHEM will only use each one within its specified temperature range."),(0,r.kt)("p",null,"The third reactant can be used as a keyword to tell MakeRates what kind of reaction is occuring. In the absence of a keyword, MakeRates and UCLCHEM will treat any reaction as a gas-phase two body reaction. Two keywords the user may wish to use are ER and LH for Eley-Rideal and Langmuir-Hinshelwood reactions respectively (see ",(0,r.kt)("a",{parentName:"p",href:"grain/"},"Grain Chemisty"),"). If a keyword is not added, UCLCHEM will assume a reaction between two surface reactions follows a Kooji-Arrhenius equation."),(0,r.kt)("p",null,"Two other useful reactions types to include are FREEZE and DESORB. Makerates adds freeze out and desorption reactions for every species, assuming they remain unchanged by the process. For example, CO in the gas becomes #CO on the grain. If you would instead like to specify the products, you can include a reaction:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"H3O+,FREEZE,,#H2O,H,,,1,0,0,,,\n#HPN,DESORB,,HPN+,,,,1,0,0,,,\n")),(0,r.kt)("p",null,"which will override the desorption or freeze out products of a species. "),(0,r.kt)("h2",{id:"three-phase-chemistry"},"Three Phase Chemistry"),(0,r.kt)("p",null,"The input ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," controls whether the ices are treated as a single phase or the surface is treated separated to the bulk. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to true, the chemical network will have gas, grain surface, and bulk ice chemistry. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to false, the chemical network will have gas and grain surface chemistry."),(0,r.kt)("p",null,"When true, MakeRates will create the bulk ice chemistry by duplicating the surface species and reactions in your input files. The difference will be that, unless you specifically override the bulk binding energy, every species in the bulk has a binding energy equal to the H2O binding energy. It will also add terms to the ODEs to allow transfer between the bulk and the surface. See the chemistry sections for more information."),(0,r.kt)("p",null,'You can override the binding energy of material in the bulk by explicitly including the bulk species in your species file rather than allowing MakeRates to automatically add it. Bulk species are designated with an "@". For example, "H2O" is gas phase H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O, "#H2O" is surface H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O and "@H2O" is H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O in the bulk. If you set the binding energy to "Inf", the species will not leave the grains during thermal desorption. This allows you to model refractory species in the bulk.'))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2a453c93.53ffbef8.js b/assets/js/2a453c93.53ffbef8.js deleted file mode 100644 index 2d494eb0..00000000 --- a/assets/js/2a453c93.53ffbef8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7258],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=c(r),d=o,m=f["".concat(s,".").concat(d)]||f[d]||u[d]||a;return r?n.createElement(m,l(l({ref:t},p),{},{components:r})):n.createElement(m,l({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:o,l[1]=i;for(var c=2;c{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=r(7462),o=r(3366),a=(r(7294),r(3905)),l=["components"],i={id:"physics-collapse",title:"Collapse Models"},s=void 0,c={unversionedId:"physics-collapse",id:"version-v3.3.0/physics-collapse",title:"Collapse Models",description:"Main Contributors: Felix Priestley",source:"@site/versioned_docs/version-v3.3.0/physics-collapse.md",sourceDirName:".",slug:"/physics-collapse",permalink:"/docs/physics-collapse",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"physics-collapse",title:"Collapse Models"},sidebar:"docs",previous:{title:"Shock Models",permalink:"/docs/physics-shocks"},next:{title:"Chemistry",permalink:"/docs/category/chemistry"}},p={},u=[],f={toc:u};function d(e){var t=e.components,r=(0,o.Z)(e,l);return(0,a.kt)("wrapper",(0,n.Z)({},f,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Main Contributors"),": Felix Priestley"),(0,a.kt)("p",null,"The freefall collapse function used to control the density in most UCLCHEM models is fairly simplistic. ",(0,a.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.3847/1538-3881/aac957"},"Priestley et al. 2018")," created the collapse model which parameterizes the density profile of a collapsing core as a function of time and radius. The following collapse modes are possible:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'"BE1.1": Bonnor-Ebert sphere, overdensity factor 1.1 (Aikawa+2005)'),(0,a.kt)("li",{parentName:"ul"},'"BE4": Bonnor-Ebert sphere, overdensity factor 4 (Aikawa+2005)'),(0,a.kt)("li",{parentName:"ul"},'"filament": magnetised filament, initially unstable to collapse (Nakamura+1995)'),(0,a.kt)("li",{parentName:"ul"},'"ambipolar": magnetised cloud, initially stable, collapse due to ambipolar diffusion (Fiedler+1993)')))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2ceb8a1b.3a254222.js b/assets/js/2ceb8a1b.3a254222.js new file mode 100644 index 00000000..c0db5991 --- /dev/null +++ b/assets/js/2ceb8a1b.3a254222.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7277],{3905:(a,e,t)=>{t.d(e,{Zo:()=>o,kt:()=>h});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var i=s.createContext({}),l=function(a){var e=s.useContext(i),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},o=function(a){var e=l(a.components);return s.createElement(i.Provider,{value:e},a.children)},N={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,i=a.parentName,o=r(a,["components","mdxType","originalType","parentName"]),c=l(t),h=n,k=c["".concat(i,".").concat(h)]||c[h]||N[h]||m;return t?s.createElement(k,p(p({ref:e},o),{},{components:t})):s.createElement(k,p({ref:e},o))}));function h(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=c;var r={};for(var i in e)hasOwnProperty.call(e,i)&&(r[i]=e[i]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>N});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={id:"desorb",title:"Adsorption & Desorption Reactions"},i=void 0,l={unversionedId:"desorb",id:"version-v3.3.1/desorb",title:"Adsorption & Desorption Reactions",description:"Coupling between the gas and the grain chemistry primarily comes from the freeze out of material from the gas phase onto the dust grains (adsorption) and the sublimation of material from the grains into the gas phase (desorption). The major processes considered by UCLCHEM are listed below. Note that we assume desorption and freeze out occur between the gas and the surface only, bulk material in three phase models does not directly desorb into the gas phase.",source:"@site/versioned_docs/version-v3.3.1/chem-desorb.md",sourceDirName:".",slug:"/desorb",permalink:"/docs/desorb",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"desorb",title:"Adsorption & Desorption Reactions"},sidebar:"docs",previous:{title:"Grain Surface Reactions",permalink:"/docs/grain"},next:{title:"Bulk Ice Processes",permalink:"/docs/bulk"}},o={},N=[{value:"Freeze out",id:"freeze-out",level:2},{value:"Thermal Desorption",id:"thermal-desorption",level:2},{value:"Non-thermal Desorption Methods",id:"non-thermal-desorption-methods",level:2},{value:"H2 Formation",id:"h2-formation",level:5},{value:"Cosmic Rays",id:"cosmic-rays",level:5},{value:"UV photons",id:"uv-photons",level:5},{value:"Chemical Desorption",id:"chemical-desorption",level:5}],c={toc:N};function h(a){var e=a.components,t=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},c,t,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("p",null,"Coupling between the gas and the grain chemistry primarily comes from the freeze out of material from the gas phase onto the dust grains (adsorption) and the sublimation of material from the grains into the gas phase (desorption). The major processes considered by UCLCHEM are listed below. Note that we assume desorption and freeze out occur between the gas and the surface only, bulk material in three phase models does not directly desorb into the gas phase."),(0,m.kt)("h2",{id:"freeze-out"},"Freeze out"),(0,m.kt)("p",null,"We assume that molecules freeze out at a rate given by the rate of collision between a species and the dust grains:"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"k"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"v"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"t"),(0,m.kt)("mi",{parentName:"mrow"},"h"))),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"A"),(0,m.kt)("mi",{parentName:"msub"},"g")),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"C"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"n")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k=\\alpha v_{th} A_g C_{ion}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"g")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"C"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))),(0,m.kt)("p",null,"where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"\u03b1")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\alpha")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1")))))," is a branching ratio, ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"V"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"t"),(0,m.kt)("mi",{parentName:"mrow"},"h")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"V_{th}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"V"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.22222em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the thermal velocity of the particle and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"A"),(0,m.kt)("mi",{parentName:"msub"},"g"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"A_g")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"g")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the dust grain cross sectional area per hydrogen nuclei. ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"C"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"n")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"C_{ion}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"C"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is a factor that increases the freeze out rate of ions due to electrostatic forces."),(0,m.kt)("p",null,"The branching ratio is an artefact of older versions of UCLCHEM which allows the user to include some grain processing of species without surface reactions. For a given species (eg C) we can determine several species that will rapidly form on the grain (CH,CH4) and freeze some portion of the original species (C) out to these products. This allows fast processes like hydrogenation to be treated without a network of surface reactions. ",(0,m.kt)("em",{parentName:"p"},"However, users should default to using a branching ratio of 1 and allowing surface reactions to take place"),"."),(0,m.kt)("p",null,"For efficiency, freeze out is turned off when the desorption rate is so high that ignoring freeze out would produce an error of around 10",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"20")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-20}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))))))))))))," on the abundances of the gas phase species. We also turn off freeze out when the temperature exceeds the binding energy of H",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msub"}),(0,m.kt)("mn",{parentName:"msub"},"2"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))))))),"O."),(0,m.kt)("h2",{id:"thermal-desorption"},"Thermal Desorption"),(0,m.kt)("p",null,"We include thermal desorption of material from the grains based on the binding energy of each species to the ices. "),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"k"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"\u03bd"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"d"),(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"f"),(0,m.kt)("mi",{parentName:"mrow"},"f"))),(0,m.kt)("mi",{parentName:"mrow"},"exp"),(0,m.kt)("mo",{parentName:"mrow"},"\u2061"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"E"),(0,m.kt)("mi",{parentName:"msub"},"B"))),(0,m.kt)("mi",{parentName:"mfrac"},"T")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\nu_{diff} \\exp(\\frac{-E_B}{T})")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.04633em",verticalAlign:"-0.686em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.06366em"}},"\u03bd"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.06366em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.05764em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05017em"}},"B")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,m.kt)("p",null,"This can be simply multiplied by the surface abundance of a species to get its rate of change when using a three phase network. However, for two phases, we multiply by the fraction of the total ice particle which are a given species and by the number of surface sites per volume. This accounts for the fact a majority of the ice material cannot thermally desorb as it not on the surface."),(0,m.kt)("p",null,"Thermal desorption is most relevant to hot core models. As the temperature increases, sublimation can occur. However, TPD experiments (Collings et al. 2004) show that this happens in bursts rather than as a continuous process. These bursts happen naturally in the three phase model as the surface is removed and then the bulk. However, for a two phase network, such bursts need to be simulated. For this reason, the hot core model handles these bursts in the two phase case and the user should turn off thermal desorption."),(0,m.kt)("h2",{id:"non-thermal-desorption-methods"},"Non-thermal Desorption Methods"),(0,m.kt)("h5",{id:"h2-formation"},"H2 Formation"),(0,m.kt)("p",null,"H2 molecules form when H atoms meet briefly on grain surfaces. The reaction is sufficiently exothermic that not only is the product is released into the gas phase but the surrounding grain material is also heated. "),(0,m.kt)("h5",{id:"cosmic-rays"},"Cosmic Rays"),(0,m.kt)("p",null,"Cosmic rays which impact the grains can free molecules from the surface."),(0,m.kt)("h5",{id:"uv-photons"},"UV photons"),(0,m.kt)("p",null,"Surface molecules which absorb a UV photon may gain sufficient energy to escape the surface. We consider secondary photons created by cosmic rays as well as the interstellar radiation field."),(0,m.kt)("h5",{id:"chemical-desorption"},"Chemical Desorption"),(0,m.kt)("p",null,"Other than H2 formation, the desorption of species due to exothermic reactions happening nearby on the grain is not treated. However, as described in the grain surface reaction section, any exothermic grain surface reaction has a probability of releasing the products into the gas phase and this is accounted for."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2f9c4060.d086ebd7.js b/assets/js/2f9c4060.d086ebd7.js new file mode 100644 index 00000000..e0e1b8ac --- /dev/null +++ b/assets/js/2f9c4060.d086ebd7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9494],{3905:(e,t,o)=>{o.d(t,{Zo:()=>d,kt:()=>h});var n=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function a(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var l=n.createContext({}),c=function(e){var t=n.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):a(a({},t),e)),o},d=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var o=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(o),h=r,m=u["".concat(l,".").concat(h)]||u[h]||p[h]||i;return o?n.createElement(m,a(a({ref:t},d),{},{components:o})):n.createElement(m,a({ref:t},d))}));function h(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=o.length,a=new Array(i);a[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:r,a[1]=s;for(var c=2;c{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var n=o(7462),r=o(3366),i=(o(7294),o(3905)),a=["components"],s={id:"physics-cloud",title:"Cloud Model",author:"Jon Holdship"},l=void 0,c={unversionedId:"physics-cloud",id:"version-v3.3.1/physics-cloud",title:"Cloud Model",description:"Main Contributors: Serena Viti, Jon Holdship",source:"@site/versioned_docs/version-v3.3.1/physics-cloud.md",sourceDirName:".",slug:"/physics-cloud",permalink:"/docs/physics-cloud",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"physics-cloud",title:"Cloud Model",author:"Jon Holdship"},sidebar:"docs",previous:{title:"Core Physics",permalink:"/docs/physics-core"},next:{title:"Hot Core",permalink:"/docs/physics-hotcore"}},d={},p=[],u={toc:p};function h(e){var t=e.components,o=(0,r.Z)(e,a);return(0,i.kt)("wrapper",(0,n.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Main Contributors"),": Serena Viti, Jon Holdship"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Source"),": src/fortran_src/cloud.f90"),(0,i.kt)("p",null,"The cloud model is our simplest physical model and is intended to model spherical clouds of gas with constant physical conditions. The exception to this is the density which can be modified using the ",(0,i.kt)("inlineCode",{parentName:"p"},"freefall")," parameter. "),(0,i.kt)("p",null,"Cloud is a 1D model that models positions through the cloud that are evenly spaced between some inner radius ",(0,i.kt)("inlineCode",{parentName:"p"},"rin")," and the outer radius ",(0,i.kt)("inlineCode",{parentName:"p"},"rout"),". The number of positions is set by the ",(0,i.kt)("inlineCode",{parentName:"p"},"points")," parameter and each position is treated almost independently with no transfer of material between them. The one interaction they have is that positions closer to the edge of the cloud (rout) are used to calculate column densities for the positions further into the cloud. Since UCLCHEM treats self-shielding of H2, C and CO, it does a fair job of properly modelling UV processes in a 1D cloud."),(0,i.kt)("p",null,"However, we caution UCLCHEM's cloud is not a PDR model. It does not consider heating and cooling and uses a fixed temperature for all positions. Moreover, it is unlikely one will model enough positions in the low Av parts of the cloud to properly capture the self-shielding. Therefore, we recommend using ",(0,i.kt)("a",{parentName:"p",href:"https://uclchem.github.io/3dpdr"},"3D-PDR")," for your PDR modelling needs."),(0,i.kt)("p",null,"Cloud is more suitable for studing the UV shielded parts of molecular clouds. If we assume the only depth dependent effect on the chemistry in these clouds is the UV radiation, it becomes reasonable to assume the UV shielded parts of the cloud are homogeneous and can be modelled with a single point code. Thus, most users will use cloud with ",(0,i.kt)("inlineCode",{parentName:"p"},"points=1")," and some combination of ",(0,i.kt)("inlineCode",{parentName:"p"},"rout"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"baseAv"),", and density that produce a large Av."),(0,i.kt)("img",{src:"/img/dark_cloud.png",width:"600","margin-left":"40%"}),(0,i.kt)("p",null,"The other major use of cloud is to model a simple cloud of gas in order to calculate reasonable starting abundances for another model. We may wish to run a hot core or shock model for some investigation and require reasonable initial conditions for the gas. We do this by starting a cloud model with a low density gas of atoms and ions with no molecules or ices. We then allow it to collapse using the ",(0,i.kt)("inlineCode",{parentName:"p"},"freefall")," parameter to reach the density of the gas in our science model. Whatever abundances are reached are then used as the starting abundances in the science model."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3516fda9.6357e12b.js b/assets/js/3516fda9.6357e12b.js new file mode 100644 index 00000000..2c4a9392 --- /dev/null +++ b/assets/js/3516fda9.6357e12b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4971],{3905:(a,e,t)=>{t.d(e,{Zo:()=>i,kt:()=>o});var s=t(7294);function m(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function n(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(m[t]=a[t]);return m}(a,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(m[t]=a[t])}return m}var l=s.createContext({}),N=function(a){var e=s.useContext(l),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},i=function(a){var e=N(a.components);return s.createElement(l.Provider,{value:e},a.children)},k={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,m=a.mdxType,n=a.originalType,l=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),c=N(t),o=m,h=c["".concat(l,".").concat(o)]||c[o]||k[o]||n;return t?s.createElement(h,p(p({ref:e},i),{},{components:t})):s.createElement(h,p({ref:e},i))}));function o(a,e){var t=arguments,m=e&&e.mdxType;if("string"==typeof a||m){var n=t.length,p=new Array(n);p[0]=c;var r={};for(var l in e)hasOwnProperty.call(e,l)&&(r[l]=e[l]);r.originalType=a,r.mdxType="string"==typeof a?a:m,p[1]=r;for(var N=2;N{t.r(e),t.d(e,{assets:()=>i,contentTitle:()=>l,default:()=>o,frontMatter:()=>r,metadata:()=>N,toc:()=>k});var s=t(7462),m=t(3366),n=(t(7294),t(3905)),p=["components"],r={id:"bulk",title:"Bulk Ice Processes"},l=void 0,N={unversionedId:"bulk",id:"version-v3.3.1/bulk",title:"Bulk Ice Processes",description:"For a three phase network, we must include reactions in the bulk and the process by which it is formed. To do this, MakeRates automatically duplicates all LH reactions so that a reaction on the surface and one in the bulk ice exists in the network. We then include two methods by which material can move between the bulk and the surface. First is the accumulation of the bulk as new surface layers are formed and second is the individual swapping of a particle from the bulk with one on the surface. Both of these processes are taken from Garrod & Pauly 2011",source:"@site/versioned_docs/version-v3.3.1/chem-bulk.md",sourceDirName:".",slug:"/bulk",permalink:"/docs/bulk",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"bulk",title:"Bulk Ice Processes"},sidebar:"docs",previous:{title:"Adsorption & Desorption Reactions",permalink:"/docs/desorb"},next:{title:"Developer",permalink:"/docs/category/developer"}},i={},k=[{value:"Surface Transfer",id:"surface-transfer",level:2},{value:"Individual Swapping",id:"individual-swapping",level:2}],c={toc:k};function o(a){var e=a.components,t=(0,m.Z)(a,p);return(0,n.kt)("wrapper",(0,s.Z)({},c,t,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"For a three phase network, we must include reactions in the bulk and the process by which it is formed. To do this, MakeRates automatically duplicates all LH reactions so that a reaction on the surface and one in the bulk ice exists in the network. We then include two methods by which material can move between the bulk and the surface. First is the accumulation of the bulk as new surface layers are formed and second is the individual swapping of a particle from the bulk with one on the surface. Both of these processes are taken from ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1088/0004-637X/735/1/15"},"Garrod & Pauly 2011")),(0,n.kt)("h2",{id:"surface-transfer"},"Surface Transfer"),(0,n.kt)("p",null,"Once the surface layer of an ice mantle is full, any further material deposited will form a new layer and the old one becomes part of the bulk. Likewise, if any suface is removed then some of the bulk becomes surface. Therefore, we calculate the total rate of change of all species on the surface ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"["),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"n"),(0,n.kt)("mi",{parentName:"mrow"},"s")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"]")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"[\\frac{dns}{dt}]")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.2251079999999999em",verticalAlign:"-0.345em"}}),(0,n.kt)("span",{parentName:"span",className:"mopen"},"["),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8801079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.6550000000000002em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t")))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.394em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.345em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},"]")))))," ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"msub"}),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"m")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_{chem}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.486108em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span"}),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"m"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," due to chemistry, freeze out and desorption and use it to calculate the rate of surface to bulk transfer for each species."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"\u03b1"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("mi",{parentName:"mrow"},"c"))),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"["),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"n"),(0,n.kt)("mi",{parentName:"mrow"},"s")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mo",{parentName:"msub",stretchy:"false"},"]"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"m"))),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_s(i)}{dt} = \\alpha_{acc}[\\frac{dns}{dt}]_{chem} \\frac{n_s(i)}{n_s}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.0037em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"["),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},(0,n.kt)("span",{parentName:"span",className:"mclose"},"]"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"m"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,n.kt)("p",null,"where the first two terms give the total rate of surface to bulk transfer and the final fraction divides this amongst the species on the surface. We subtract this ODE from each surface species and add it to the equivalent bulk species. If the rate of change of the surface is negative, the bulk is transferred to the surface."),(0,n.kt)("h2",{id:"individual-swapping"},"Individual Swapping"),(0,n.kt)("p",null,"Any species in the bulk has the possibilty of diffusing to the surface. It will then displace a surface particle (which will join the bulk) and become part of the surface. We follow Ruaud et al. 2016 by first calculating the rate at which bulk species diffuse to the surface,"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"w"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"p"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mn",{parentName:"mfrac"},"1"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"t"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"o"),(0,n.kt)("mi",{parentName:"mrow"},"p"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"l"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"y")))))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"K_{swap} = \\frac{1}{t_{hop} N_{lay}}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02691em"}},"w"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.293548em",verticalAlign:"-0.972108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.32144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"y"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"1")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.972108em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"t"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"h"),(0,n.kt)("mi",{parentName:"mrow"},"o"),(0,n.kt)("mi",{parentName:"mrow"},"p")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"t_{hop}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.9011879999999999em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is our usual diffusion timescale and ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"l"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"y")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_{lay}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"y"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the number of mantle layers with a minimum of 1. This gives a simple ODE"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"w"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"p"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"b")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_s(i)}{dt} = K_{swap}X_b(i)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.036108em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02691em"}},"w"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"b")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"and we get the rate at which things move from the surface to the bulk by summing this rate of change over all mantle species to get a total rate of swapping from the bulk to the surface. We then divide that by the fraction of the surface which is made up of a species to get its rate of swapping to the bulk."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"m")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub",mathvariant:"normal"},"\u03a3"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"w"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"p"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"b")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_m(i)}{dt} = \\Sigma_j K_{swap,j}X_b(j) \\frac{X_s(i)}{X_s}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"m")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"\u03a3"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02691em"}},"w"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"b")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,n.kt)("p",null,"This ensures that the net movement between the surface and the bulk from this process is zero."))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/3ac08d0d.4cf4faf9.js b/assets/js/3ac08d0d.4cf4faf9.js new file mode 100644 index 00000000..401c528c --- /dev/null +++ b/assets/js/3ac08d0d.4cf4faf9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1976],{3905:(a,e,t)=>{t.d(e,{Zo:()=>N,kt:()=>k});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var i=s.createContext({}),l=function(a){var e=s.useContext(i),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},N=function(a){var e=l(a.components);return s.createElement(i.Provider,{value:e},a.children)},o={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,i=a.parentName,N=r(a,["components","mdxType","originalType","parentName"]),c=l(t),k=n,h=c["".concat(i,".").concat(k)]||c[k]||o[k]||m;return t?s.createElement(h,p(p({ref:e},N),{},{components:t})):s.createElement(h,p({ref:e},N))}));function k(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=c;var r={};for(var i in e)hasOwnProperty.call(e,i)&&(r[i]=e[i]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>N,contentTitle:()=>i,default:()=>k,frontMatter:()=>r,metadata:()=>l,toc:()=>o});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={},i="Chemical Analysis",l={unversionedId:"chemical_analysis",id:"version-v3.3.1/chemical_analysis",title:"Chemical Analysis",description:"Chemical networks are complex systems where the interplay between many elements often means that small changes in one aspect of the network can greatly effect the outcome in unexpected ways. Nevertheless, there are cases where a simple chemical explanation can be found for some observed behaviour in the model outputs. This tutorial demonstrates how to use some of the functionality of the UCLCHEM library to analyse model outputs and discover these explanations.",source:"@site/versioned_docs/version-v3.3.1/chemical_analysis.md",sourceDirName:".",slug:"/chemical_analysis",permalink:"/docs/chemical_analysis",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{},sidebar:"docs",previous:{title:"Running a Grid",permalink:"/docs/running_a_grid"},next:{title:"Compilation Issues",permalink:"/docs/trouble-compile"}},N={},o=[{value:"H3O+ and SO",id:"h3o-and-so",level:2},{value:"1. Generate Test Cases",id:"1-generate-test-cases",level:3},{value:"2. Run the Analysis",id:"2-run-the-analysis",level:3},{value:"2.1 H_3O^+",id:"21-h_3o",level:4},{value:"2.2 SO",id:"22-so",level:4},{value:"Summary Notes",id:"summary-notes",level:2},{value:"Considerations",id:"considerations",level:2}],c={toc:o};function k(a){var e=a.components,r=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},c,r,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("h1",{id:"chemical-analysis"},"Chemical Analysis"),(0,m.kt)("p",null,"Chemical networks are complex systems where the interplay between many elements often means that small changes in one aspect of the network can greatly effect the outcome in unexpected ways. Nevertheless, there are cases where a simple chemical explanation can be found for some observed behaviour in the model outputs. This tutorial demonstrates how to use some of the functionality of the UCLCHEM library to analyse model outputs and discover these explanations."),(0,m.kt)("p",null,"We do recommend caution when following the approach laid out in this tutorial. There are many pitfalls which we will try to point out as we go. Ultimately, a comprehensive view of how important a reaction is to the outcome of your model requires detailed statistical calculations such as the use of ",(0,m.kt)("a",{parentName:"p",href:"https://github.com/slundberg/shap"},"SHAP values")," to assign meaningful scores to how much various reactions in a network contribute to a species' abundance. Therefore, care must be taken by the user to ensure that the conclusions they draw from a simpler approach are sound."),(0,m.kt)("p",null,"We'll use an example from work that was recently published at the time of writing this tutorial to demonstrate the use of ",(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.analysis.analysis()")," and how it can be used to draw conclusions about the most important reactions in a network for a given species/behaviour."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\nfrom glob import glob\n")),(0,m.kt)("h2",{id:"h3o-and-so"},"H3O+ and SO"),(0,m.kt)("p",null,"In a piece of inference work in which we measured the cosmic ray ionization rate (CRIR) in NGC 253 ",(0,m.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2022arXiv220403668H/abstract"},"(Holdship et al. 2022)"),". We found that both H3O+ and SO were sensitive to the ionization rate. Furthermore, since H3O+ was increased in abundance by increasing CRIR and SO was destroyed, their ratio was extremely sensitive to the rate. "),(0,m.kt)("p",null,"In the work, we present the plot below which shows how the equilibrium abundance of each species changes with the CRIR as well as the ratio. We plot this for a range of temperatures to show that this behaviour is not particularly sensitive to the gas temperature."),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"crir_h3o_so_example",src:t(3292).Z,width:"1600",height:"1067"})),(0,m.kt)("p",null,"In a sense, this is all the information we need. A complex array of reactions all compete and contribute to produce the outcome of the model. Whatever they are, we see the abundance of these species are very sensitive to the CR over a wide range of temperature and density. However, we can only trust this conclusion as far as we trust the entire chemical network since we don't know what exactly causes this behaviour."),(0,m.kt)("p",null,"If we use the analysis function, we may find all of this is driven by a small handful of reactions. The benefit would then be that our trust in our conclusions only depends on how much we trust the rates of those specific reactions. If it is very important, we can evaluate those reactions and readers of our work can make the same decisions as information from experiment changes."),(0,m.kt)("h3",{id:"1-generate-test-cases"},"1. Generate Test Cases"),(0,m.kt)("p",null,"Ideally, we should run a huge grid of models and find some rigorous way to evaluate how important each reaction is to the outcome of the model. However, if we run a small grid representative of different conditions then any simple chemical explanation will be evident if it exists. If it no simple explanation is appropriate, then the analysis module is not appropriate for our task and we could consider more complex approaches."),(0,m.kt)("p",null,"Let's run a simple grid with all possible combinations of the following:"),(0,m.kt)("ul",null,(0,m.kt)("li",{parentName:"ul"},"A low CRIR (zeta=1) and high CRIR (zeta=1e4)"),(0,m.kt)("li",{parentName:"ul"},"A typical cloud density (n=1e4) and high density (n=1e6)"),(0,m.kt)("li",{parentName:"ul"},"The lower temperature bound of NGC 253 CMZ (50 K) and a high temperature (250 K)")),(0,m.kt)("p",null,"and that will give us enough to work with for our analysis."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'params={\'baseAv\':10, #UV shielded gas in our model\n \'freefall\':False,\n \'finalTime\':1e6\n }\nfor temperature in [50,250]:\n for density in [1e4,1e6]:\n for zeta in [1,1e4]:\n params["initialtemp"]=temperature\n params["initialdens"]=density\n params["zeta"]=zeta\n params["outputfile"]=f"../output/{temperature}_{density}_{zeta}.csv"\n uclchem.model.cloud(param_dict=params)\n')),(0,m.kt)("h3",{id:"2-run-the-analysis"},"2. Run the Analysis"),(0,m.kt)("p",null,"The ",(0,m.kt)("inlineCode",{parentName:"p"},"analysis")," function is very simple. For every time step in your model output, it will use UCLCHEM to calculate the rate of every reaction which includes a chosen species. It then uses the abundances at that time step to calculate the total contribution of that reaction to the rate of change of the species' abundance."),(0,m.kt)("p",null,"For example, if we care about H3O+ and find that it is created by ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("mi",{parentName:"mrow"},"O")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O")))))," + ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"H"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))))))),", then UCLCHEM is called to get ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"k")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"))))),", the rate of that reaction and then analysis calculates"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mover",{parentName:"mrow",accent:"true"},(0,m.kt)("mrow",{parentName:"mover"},(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("mo",{parentName:"mover"},"\u02d9")),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mi",{parentName:"mrow"},"k"),(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"H"),(0,m.kt)("mo",{parentName:"msup"},"+")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mi",{parentName:"msub"},"H"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\dot{Y(H_3O^+)} = k Y(H_2O) Y(H^+) n_H")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"1.23686em",verticalAlign:"-0.25em"}}),(0,m.kt)("span",{parentName:"span",className:"mord accent"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.9868600000000001em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.697331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.989em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.319em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"accent-body",style:{left:"-0.13889em"}},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u02d9")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.25em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"1.071331em",verticalAlign:"-0.25em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.821331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.113em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))),(0,m.kt)("p",null,"where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mover",{parentName:"mrow",accent:"true"},(0,m.kt)("mrow",{parentName:"mover"},(0,m.kt)("mi",{parentName:"mrow"},"Y"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("mo",{parentName:"mover"},"\u02d9"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\dot{Y(H_3O^+)}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"1.23686em",verticalAlign:"-0.25em"}}),(0,m.kt)("span",{parentName:"span",className:"mord accent"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.9868600000000001em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.697331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.989em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))),(0,m.kt)("span",{parentName:"span",className:"mclose"},")"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.319em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"accent-body",style:{left:"-0.13889em"}},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u02d9")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.25em"}},(0,m.kt)("span",{parentName:"span"})))))))))," is the rate of change of the ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("mo",{parentName:"mrow"},"+")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mord"},"+")))))," abundance due to the reaction. The ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mover",{parentName:"mrow",accent:"true"},(0,m.kt)("mi",{parentName:"mover"},"Y"),(0,m.kt)("mo",{parentName:"mover"},"\u02d9"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\dot{Y}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.9201900000000001em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord accent"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.9201900000000001em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"Y"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.25233em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"accent-body",style:{left:"-0.13889em"}},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u02d9")))))))))))," s of each reaction involving the ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," are then compared to see which reactions contribute the most to the destruction and formation of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("mo",{parentName:"mrow"},"+")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mord"},"+"))))),"."),(0,m.kt)("p",null,"Our plan then is to do this for the low zeta case and the high zeta case. Hopefully, we'll see the same reactions are most important to the abundance of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," and SO at all densities and tempertures. If we don't find that that's the case, then the chemistry is these species is fairly complex and perhaps trying to present a simple cause for the CRIR dependence is not a good idea."),(0,m.kt)("p",null,"So, let's analyse the outputs!"),(0,m.kt)("h4",{id:"21-h_3o"},"2.1 ",(0,m.kt)("span",{parentName:"h4",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))),(0,m.kt)("p",null,(0,m.kt)("inlineCode",{parentName:"p"},"analysis()")," takes three arguments: the species, the output file to analyse, and a file to store the analsis output. Let's run it for every model in our little grid so we can inspect the outputs."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'outputs=glob("../output/[0-9]*.csv") #all files that start with a number\nfor output in outputs:\n \n analysis_output="../output/H3O-analysis-"+output[10:]\n uclchem.analysis.analysis("H3O+",output,analysis_output)\n')),(0,m.kt)("p",null,"This will produce one file per model output with lists of the most important reactions at each time step. Analysis will only print a time step when the most important reactions change from the previous one so we often see many fewer steps than in the full output. Let's look at the low temperature, low density, low zeta case:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 7.90e+05 years\nFormation = 1.92e-18 from:\nH2 + H2O+ -> H3O+ + H : 78.49%\nH2O + HCO+ -> CO + H3O+ : 17.68%\nH3+ + H2O -> H3O+ + H2 : 3.40%\n\nDestruction = -1.92e-18 from:\nH3O+ + E- -> OH + H + H : 65.43%\nH3O+ + E- -> H2O + H : 15.21%\nH3O+ + E- -> OH + H2 : 11.52%\nH3O+ + H2S -> H3S+ + H2O : 5.17%\nH3O+ + E- -> O + H2 + H : 1.20%\nH3O+ + HCN -> HCNH+ + H2O : 0.33%\nH3O+ + SIO -> SIOH+ + H2O : 0.33%\n")),(0,m.kt)("p",null,"What this shows is the reactions that cause 99.9% of the formation and 99.9% of the destruction of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," at a time step. The total rate of formation and destruction in units of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"s"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"s^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1")))))))))))))," is given as well the percentage of the total that each reaction contributes. "),(0,m.kt)("p",null,"What we need to find is a pattern in these reactions which holds across time and across different densities and temperatures. It actually turns out that the reactions printed above are the dominate formation and destruction routes of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," for all parameters for all times. For example, at high temperature, high density and high zeta, we get:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 1.00e+04 years\nFormation = 2.03e-14 from:\nH2 + H2O+ -> H3O+ + H : 95.47%\nH3+ + H2O -> H3O+ + H2 : 3.14%\nH2O + HCO+ -> CO + H3O+ : 1.05%\n\nDestruction = -2.03e-14 from:\nH3O+ + E- -> OH + H + H : 69.82%\nH3O+ + E- -> H2O + H : 16.23%\nH3O+ + E- -> OH + H2 : 12.29%\nH3O+ + E- -> O + H2 + H : 1.28%\n")),(0,m.kt)("p",null,"The sole difference being that the formation rate is much higher. Since equilibrium is reached, the destruction rate is also higher and so we need to use the fact we know the ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," abundance increases with CRIR to infer that the destruction rate is only faster because there is more ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," to destroy."),(0,m.kt)("p",null,"However, there are some problems here! Why does ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," + ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," become so efficient at high CRIR? We know the rate of a two body reaction does not depend on CRIR (",(0,m.kt)("a",{parentName:"p",href:"/docs/gas"},"see the chemistry docs"),") so it must be that ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," is increasing in abundance. We can run analysis on ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"2")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_2O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," to see what is driving that. In fact, as we report in the paper, following this thread we find that a chain of hydrogenations starting from ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"O"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"H"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"OH^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," is the overall route of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," formation and that this chain starts with small ions that are primarly formed through cosmic ray reactions. ",(0,m.kt)("em",{parentName:"p"},"It will very often be the case that analysing one species requires you to run analysis on another.")),(0,m.kt)("h4",{id:"22-so"},"2.2 SO"),(0,m.kt)("p",null,"With a strong explanation for ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))))))),", we can now look at SO. We start by running analysis again and then by looking at the reactions as before."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'outputs=glob("../output/[0-9]*.csv") #won\'t pick up H3O+ analysis because it\'s not a number\nfor output in outputs:\n \n analysis_output="../output/SO-analysis-"+output[10:]\n uclchem.analysis.analysis("SO",output,analysis_output)\n')),(0,m.kt)("p",null,"Again, let's start by looking at the low temperature, high density, low zeta case:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 1.31e+04 years\nFormation = 3.67e-22 from:\n#SO + THERM -> SO : 68.11%\nHSO+ + E- -> SO + H : 21.04%\n#SO + DEUVCR -> SO : 9.87%\n\nDestruction = -3.78e-22 from:\nSO + FREEZE -> #SO : 78.04%\nHCO+ + SO -> HSO+ + CO : 20.97%\n")),(0,m.kt)("p",null,"An interesting point here is that equilbrium is reached at around ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1.31"),(0,m.kt)("mo",{parentName:"mrow"},"\xd7"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"4"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"1.31 \\times 10^4")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.72777em",verticalAlign:"-0.08333em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},"."),(0,m.kt)("span",{parentName:"span",className:"mord"},"3"),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"\xd7"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4"))))))))))))," yr in this model. Since ",(0,m.kt)("inlineCode",{parentName:"p"},"analysis()")," only prints a time step when the most important reactions are different to the last one, this time step is the last output from the analysis. We can see that we broadly reach an equilibrium between thermal desorption and freeze out of SO, with some formation and destruction via ions. "),(0,m.kt)("p",null,"This doesn't hold up at lower densities or higher temperatures, looking at the high temperature, low density, low zeta case, we see a second pattern of reactions:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 9.50e+05 years\nFormation = 1.05e-20 from:\nO2 + S -> SO + O : 98.10%\nO + NS -> SO + N : 1.48%\n\nDestruction = -1.02e-20 from:\nC + SO -> CS + O : 39.10%\nC + SO -> S + CO : 39.10%\nC+ + SO -> SO+ + C : 4.33%\nC+ + SO -> CS+ + O : 4.33%\nC+ + SO -> S+ + CO : 4.33%\nC+ + SO -> S + CO+ : 4.33%\nN + SO -> S + NO : 3.46%\nH+ + SO -> SO+ + H : 0.28%\n")),(0,m.kt)("p",null,"However, it's not so complex. All the low zeta outputs show one of these two sets of reactions. Essentially, higher temperatures are opening up gas phase reaction routes which form and destroy SO. These new routes are not particularly quick with a total rate of change of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"20"))),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"s"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^{-20} s^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0"))))))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))),". Note that quite a lot of these are due to reactions with ions."),(0,m.kt)("p",null,"Finally, we look at the high zeta cases and find that no matter the temperature or density, we see the same reactions:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"New Important Reactions At: 1.81e+04 years\nFormation = 5.64e-17 from:\nO2 + S -> SO + O : 85.30%\nHSO+ + E- -> SO + H : 13.19%\nO + NS -> SO + N : 1.19%\n\nDestruction = -5.64e-17 from:\nH+ + SO -> SO+ + H : 13.16%\nC+ + SO -> SO+ + C : 10.52%\nC+ + SO -> CS+ + O : 10.52%\nC+ + SO -> S+ + CO : 10.52%\nC+ + SO -> S + CO+ : 10.52%\nH3+ + SO -> HSO+ + H2 : 9.86%\nC + SO -> CS + O : 8.90%\nC + SO -> S + CO : 8.90%\nSO + CRPHOT -> S + O : 4.11%\nSO + CRPHOT -> SO+ + E- : 4.11%\nHCO+ + SO -> HSO+ + CO : 3.20%\nHE+ + SO -> S+ + O + HE : 1.93%\nHE+ + SO -> S + O+ + HE : 1.93%\nN + SO -> S + NO : 0.87%\n")),(0,m.kt)("p",null,"Ions take over the destruction of SO when the CRIR is high and these reactions are proceeding about 1000 times faster than the low zeta rates. This makes sense as increasing the CRIR will greatly increase the abundances of these simple ionic species."),(0,m.kt)("p",null,"All in all, we can conclude that a range of gas phase reactions control the abundance of SO at low zeta but once the CRIR is high, destruction via ions dominates the SO chemistry leading to the decreasing abundance that we see."),(0,m.kt)("h2",{id:"summary-notes"},"Summary Notes"),(0,m.kt)("p",null,"In this notebook, we've run some representative models to look at why the SO and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," abundances seem to so heavily depend on the CRIR. We find that a chain of very efficient reactions starting with simple ions comprise the primary formation route of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," so that the total production of this species depends entirely on the abundance of those ions. With high CRIR, those ions become very abundant and we get a lot of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," formation."),(0,m.kt)("p",null,"SO is complex at first glance since the formation routes vary by parameter. However, looking at the destruction routes we can see that it's simply that SO can be easily destroyed by simple ions and, again, these are very abundant in gas exposed to a high CRIR."),(0,m.kt)("p",null,"An interesting note about SO is that we could potentially say that destruction via C",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," is the dominant destruction route. However, we would caution users to be careful with that kind of statement. Reactions with H",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+")))))))))))),", HE",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," and other also destroy SO. It could be that if we turned off the C",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," reactions, the SO chemistry would be unchanged as other ions take up the slack. Therefore, unless a single reaction is clearly dominant (as in ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"H"),(0,m.kt)("mn",{parentName:"msub"},"3")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"O"),(0,m.kt)("mo",{parentName:"msup"},"+"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"H_3O^+")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.921331em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.08125em"}},"H"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.08125em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"O"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mbin mtight"},"+"))))))))))))," formation), it is best to test the importance of a reaction by removing it before concluding it is the single most important reaction."),(0,m.kt)("h2",{id:"considerations"},"Considerations"),(0,m.kt)("p",null,(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.analysis.analysis()")," looks at a snapshot of the gas and calculates the instantaneous rate of change of important reactions. However, over the course of a time step, abundances change and reactions rise and fall in importance. More importantly, complex interplay between reactions can contribute to an outcome. This is ultimately a simple, first order look at what is happening in the network but in many cases, a deeper view will be required."),(0,m.kt)("p",null,"If you struggle to find an explanation that fits all time steps in your outputs and is true across a range of parameters, then it is best not to report simple conclusions about the chemistry and to look for other ways to understand the network."))}k.isMDXComponent=!0},3292:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/holdship_ngc253-f2d6812a8c2a8fc94e669616d3410ee9.png"}}]); \ No newline at end of file diff --git a/assets/js/5b2a0f0d.66ee4ab1.js b/assets/js/5b2a0f0d.66ee4ab1.js deleted file mode 100644 index 118e1c0a..00000000 --- a/assets/js/5b2a0f0d.66ee4ab1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7570],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),u=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return o.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=u(n),h=r,m=d["".concat(s,".").concat(h)]||d[h]||p[h]||a;return n?o.createElement(m,i(i({ref:t},c),{},{components:n})):o.createElement(m,i({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>u,toc:()=>p});var o=n(7462),r=n(3366),a=(n(7294),n(3905)),i=["components"],l={id:"dev-debugging",title:"Debugging"},s=void 0,u={unversionedId:"dev-debugging",id:"version-v3.3.0/dev-debugging",title:"Debugging",description:"UCLCHEM is a complex code and many things can go wrong. Here, we'll list some of the things that often go wrong when you modify the code as well as a few helpful steps to trace down bugs.",source:"@site/versioned_docs/version-v3.3.0/dev-debugging.md",sourceDirName:".",slug:"/dev-debugging",permalink:"/docs/dev-debugging",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"dev-debugging",title:"Debugging"},sidebar:"docs",previous:{title:"Writing The Python Interface",permalink:"/docs/dev-python-wrap"},next:{title:"Maintaining the Website",permalink:"/docs/dev-web"}},c={},p=[{value:"Finding the error",id:"finding-the-error",level:2},{value:"Makefile",id:"makefile",level:3},{value:"Python",id:"python",level:3},{value:"Non-fatal errors",id:"non-fatal-errors",level:2},{value:"Common Error Sources",id:"common-error-sources",level:2},{value:"Variable Reset",id:"variable-reset",level:3}],d={toc:p};function h(e){var t=e.components,n=(0,r.Z)(e,i);return(0,a.kt)("wrapper",(0,o.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"UCLCHEM is a complex code and many things can go wrong. Here, we'll list some of the things that often go wrong when you modify the code as well as a few helpful steps to trace down bugs."),(0,a.kt)("h2",{id:"finding-the-error"},"Finding the error"),(0,a.kt)("p",null,"An unfortunate side effect of the python installation process and running the code in python is that underlying errors can go missing. If you get an error it is often best to go as close to the source as you can. That means compiling the code with the makefile and running it through a python script or, failing that, the binary."),(0,a.kt)("h3",{id:"makefile"},"Makefile"),(0,a.kt)("p",null,"You'll find the source code and makefile in ",(0,a.kt)("inlineCode",{parentName:"p"},"src/fortran_src"),", if you run"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"cd src/fortran_src\nmake clean\nmake python\n")),(0,a.kt)("p",null,"you'll build the python wrap from scratch and you'll get any compilation errors printed to screen directly. These compilation errors should print when ",(0,a.kt)("inlineCode",{parentName:"p"},"pip install .")," fails but they can be lost in the python errors and often won't be as helpfully coloured as the direct output from ",(0,a.kt)("inlineCode",{parentName:"p"},"make"),". You can also go into the Makefile and change the compiler flags. Switching the optimization flags out for debugging flags will make the error easier to find. You'll find them in the Makefile:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-makefile"},"#Unforgiving debugging flags\n#FFLAGS =-g -fbacktrace -Wall -fcheck=all\n#Fast optimizing flags\nFFLAGS = -O3 -fPIC -ffree-line-length-0\n")),(0,a.kt)("p",null,"where you simply switch over which ",(0,a.kt)("inlineCode",{parentName:"p"},"FFLAGS")," is commented out."),(0,a.kt)("p",null,"You can also test for errors that come from the python interface by using ",(0,a.kt)("inlineCode",{parentName:"p"},"make")," instead of ",(0,a.kt)("inlineCode",{parentName:"p"},"make python"),". This will build a uclchem binary which you can simply run with the default parameters,"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"cd src/fortran_src\nmake\ncd ../../\n./uclchem CLOUD examples/phase1.inp\n")),(0,a.kt)("p",null,"Where phase1.inp is a parameter file written in a json like format and CLOUD is the type of model we'd like to run. Better yet, if you use the debugging flags to build this, you can run it in gdb."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"gdb uclchem\nrun CLOUD examples/phase1.inp\n")),(0,a.kt)("p",null,"We can't go into detail on gdb is here but it's a terminal based debugger that can be used to trace down the error. It will often let you look at values of variables at the point where the code broke and give more information than the standard fortran outputs."),(0,a.kt)("h3",{id:"python"},"Python"),(0,a.kt)("p",null,"It's mentioned at several points in the docs but if you habitually run your UCLCHEM codes in jupyter notebooks, you'll find that error messages are often hidden from you. Any debugging should really be done via python script."),(0,a.kt)("h2",{id:"non-fatal-errors"},"Non-fatal errors"),(0,a.kt)("p",null,"Many errors will not stop the code compiling but are catastrophic. For example, you could introduce a new procedure that is valid Fortran but does not do what you want it to do. In these cases, you'll have to hunt the problem down yourself. We recommend running the test cases in ",(0,a.kt)("inlineCode",{parentName:"p"},"scripts/run_uclchem_tests.py")," and comparing the output to the ones in the example using the plot created by ",(0,a.kt)("inlineCode",{parentName:"p"},"scripts/plot_uclchem_tests.py"),". Sometimes, they'll be different because you introduced a change that you know will effect the chemistry. For example, you might have changed a desorption process and find the ice abundances change which is totally fine. However, if you see a change that is unexpected, you can investigate."),(0,a.kt)("p",null,"There's no better way to debug these errors than to simply print a lot of things to screen. It can seem silly but adding a bunch of write statements to your code is often the fastest way to track down what is going wrong."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-fortran"},'IF (myParam .gt. criticalValue) THEN\n write(*,*) "here!"\n !do stuff\nELSE\n write(*,*) "if not trigged because myParam is", myParam\n !do other stuff\nEND IF\n\n!do some processing\nCALL myNewSubroutine\nwrite(*,*) "myParam", myParam, "at code point x"\n\n')),(0,a.kt)("p",null,"Additions to the code like above will check the logic of your code is going the way you expect and that parameters aren't taking surprise values. If you have absolutely no suspicions about which part of your code is going wrong, you can use the subroutine ",(0,a.kt)("inlineCode",{parentName:"p"},"simpleDebug")," which is in the IO module (",(0,a.kt)("inlineCode",{parentName:"p"},"io.f90"),"). That prints a statement of your choice as well as many of the parameters."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-fortran"},'!do some processing\nCALL myNewSubroutine\nCALL simpleDebug("Param values after myNewSubroutine")\n')),(0,a.kt)("h2",{id:"common-error-sources"},"Common Error Sources"),(0,a.kt)("h3",{id:"variable-reset"},"Variable Reset"),(0,a.kt)("p",null,"If you notice errors that only occur when you run the code more than once in a python script, then a common source is the initial value that variables take in the code. Variable initialization done at the declaration stage of a module only happens once. That is why the vast majority of variables that are not fortran parameters (constants) are set to an initial value by defaultparameters.f90 or in the initialization subroutines of the physics-core, chemistry, and physics modules."),(0,a.kt)("p",null,"It's very common when editing the code or adding new variables to forget to do this and then to see unusual behaviour when you run multiple models in a row in python."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5fc4a2b8.79a89988.js b/assets/js/5fc4a2b8.79a89988.js new file mode 100644 index 00000000..c963abb4 --- /dev/null +++ b/assets/js/5fc4a2b8.79a89988.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8132],{3902:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"v3.3.1","label":"v3.3.1","banner":null,"badge":true,"noIndex":false,"className":"docs-version-v3.3.1","isLast":true,"docsSidebars":{"docs":[{"type":"category","label":"Getting Started","items":[{"type":"link","label":"Installation","href":"/docs/","docId":"install"},{"type":"link","label":"Creating a Network","href":"/docs/network","docId":"network"},{"type":"link","label":"Model Parameters","href":"/docs/parameters","docId":"parameters"},{"type":"link","label":"Python Reference","href":"/docs/pythonapi","docId":"pythonapi"}],"collapsed":true,"collapsible":true,"href":"/docs/category/getting-started"},{"type":"category","label":"Tutorials","items":[{"type":"link","label":"Running Your First Models","href":"/docs/first_model","docId":"first_model"},{"type":"link","label":"Advanced Physical Modelling","href":"/docs/modelling_objects","docId":"modelling_objects"},{"type":"link","label":"Running a Grid","href":"/docs/running_a_grid","docId":"running_a_grid"},{"type":"link","label":"Chemical Analysis","href":"/docs/chemical_analysis","docId":"chemical_analysis"}],"collapsed":true,"collapsible":true,"href":"/docs/category/tutorials"},{"type":"category","label":"Troubleshooting","items":[{"type":"link","label":"Compilation Issues","href":"/docs/trouble-compile","docId":"trouble-compile"},{"type":"link","label":"Integration","href":"/docs/trouble-integration","docId":"trouble-integration"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Physics","items":[{"type":"link","label":"Core Physics","href":"/docs/physics-core","docId":"physics-core"},{"type":"link","label":"Cloud Model","href":"/docs/physics-cloud","docId":"physics-cloud"},{"type":"link","label":"Hot Core","href":"/docs/physics-hotcore","docId":"physics-hotcore"},{"type":"link","label":"Shock Models","href":"/docs/physics-shocks","docId":"physics-shocks"},{"type":"link","label":"Collapse Models","href":"/docs/physics-collapse","docId":"physics-collapse"}],"collapsed":true,"collapsible":true,"href":"/docs/physics-core"},{"type":"category","label":"Chemistry","items":[{"type":"link","label":"Notation","href":"/docs/notation","docId":"notation"},{"type":"link","label":"Gas Phase Reactions","href":"/docs/gas","docId":"gas"},{"type":"link","label":"Grain Surface Reactions","href":"/docs/grain","docId":"grain"},{"type":"link","label":"Adsorption & Desorption Reactions","href":"/docs/desorb","docId":"desorb"},{"type":"link","label":"Bulk Ice Processes","href":"/docs/bulk","docId":"bulk"}],"collapsed":true,"collapsible":true,"href":"/docs/category/chemistry"},{"type":"category","label":"Developer","items":[{"type":"link","label":"Overview of the Code","href":"/docs/dev-overview","docId":"dev-overview"},{"type":"link","label":"Writing The Python Interface","href":"/docs/dev-python-wrap","docId":"dev-python-wrap"},{"type":"link","label":"Debugging","href":"/docs/dev-debugging","docId":"dev-debugging"},{"type":"link","label":"Maintaining the Website","href":"/docs/dev-web","docId":"dev-web"}],"collapsed":true,"collapsible":true,"href":"/docs/category/developer"}]},"docs":{"bulk":{"id":"bulk","title":"Bulk Ice Processes","description":"For a three phase network, we must include reactions in the bulk and the process by which it is formed. To do this, MakeRates automatically duplicates all LH reactions so that a reaction on the surface and one in the bulk ice exists in the network. We then include two methods by which material can move between the bulk and the surface. First is the accumulation of the bulk as new surface layers are formed and second is the individual swapping of a particle from the bulk with one on the surface. Both of these processes are taken from Garrod & Pauly 2011","sidebar":"docs"},"chemical_analysis":{"id":"chemical_analysis","title":"Chemical Analysis","description":"Chemical networks are complex systems where the interplay between many elements often means that small changes in one aspect of the network can greatly effect the outcome in unexpected ways. Nevertheless, there are cases where a simple chemical explanation can be found for some observed behaviour in the model outputs. This tutorial demonstrates how to use some of the functionality of the UCLCHEM library to analyse model outputs and discover these explanations.","sidebar":"docs"},"desorb":{"id":"desorb","title":"Adsorption & Desorption Reactions","description":"Coupling between the gas and the grain chemistry primarily comes from the freeze out of material from the gas phase onto the dust grains (adsorption) and the sublimation of material from the grains into the gas phase (desorption). The major processes considered by UCLCHEM are listed below. Note that we assume desorption and freeze out occur between the gas and the surface only, bulk material in three phase models does not directly desorb into the gas phase.","sidebar":"docs"},"dev-debugging":{"id":"dev-debugging","title":"Debugging","description":"UCLCHEM is a complex code and many things can go wrong. Here, we\'ll list some of the things that often go wrong when you modify the code as well as a few helpful steps to trace down bugs.","sidebar":"docs"},"dev-overview":{"id":"dev-overview","title":"Overview of the Code","description":"The page is designed to give a brief overview of the code\'s structure. It\'s less about the scientific justification for the various treatments in the code and more about how the code is segmented and where to look for things.","sidebar":"docs"},"dev-python-wrap":{"id":"dev-python-wrap","title":"Writing The Python Interface","description":"The python interface is a relatively complex bit of code, a lot of work is put on the development side to make the user side a smooth experience. Writing the core of UCLCHEM in Fortran gives great performance benefits but compiling it to python with F2PY has its peculiarities. Here, we discuss the steps needed to adjust the code.","sidebar":"docs"},"dev-web":{"id":"dev-web","title":"Maintaining the Website","description":"We use Docusaurus to maintain our website. The upside is that documentation and blog posts can all be created as simple markdown files. The downside is a slightly convoluted workflow which we explain here.","sidebar":"docs"},"first_model":{"id":"first_model","title":"Running Your First Models","description":"In this notebook, we demonstrate the basic use of UCLCHEM\'s python module by running a simple model and then using the analysis functions to examine the output.","sidebar":"docs"},"gas":{"id":"gas","title":"Gas Phase Reactions","description":"Gas phase ODEs","sidebar":"docs"},"grain":{"id":"grain","title":"Grain Surface Reactions","description":"Whilst the basic treatment of gas phase chemistry is well established, grain surface chemistry is more complex. There are three possible ways to treat grain surface chemistry in UCLCHEM. In general we assume that:","sidebar":"docs"},"hydro":{"id":"hydro","title":"Hydro Post Processing","description":"Main Contributors: Jon Holdship"},"install":{"id":"install","title":"Installation","description":"Prerequisites","sidebar":"docs"},"modelling_objects":{"id":"modelling_objects","title":"Advanced Physical Modelling","description":"In the previous tutorial, we simply modelled the chemistry of a static cloud for 1 Myr. This is unlikely to meet everybody\'s modelling needs and UCLCHEM is capable of modelling much more complex environments such as hot cores and shocks. In this tutorial, we model both a hot core and a shock to explore how these models work and to demonstrate the workflow that the UCLCHEM team normally follow.","sidebar":"docs"},"network":{"id":"network","title":"Creating a Network","description":"MakeRates","sidebar":"docs"},"notation":{"id":"notation","title":"Notation","description":"UCLCHEM uses notation, which differentiates between species types. Here, we\'ll give an overview of this notation and associated processes.","sidebar":"docs"},"parameters":{"id":"parameters","title":"Model Parameters","description":"UCLCHEM will default to these values unless they are overridden by user. Users can override these by adding the variable name as written here in the paramdict argument of any UCLCHEM model function. paramdict is not case sensitive.","sidebar":"docs"},"physics-cloud":{"id":"physics-cloud","title":"Cloud Model","description":"Main Contributors: Serena Viti, Jon Holdship","sidebar":"docs"},"physics-collapse":{"id":"physics-collapse","title":"Collapse Models","description":"Main Contributors: Felix Priestley","sidebar":"docs"},"physics-core":{"id":"physics-core","title":"Core Physics","description":"Each of the other physics doc pages details the specifics of a particular physics model. This one gives a general overview of the physics in UCLCHEM, including the core physics routines that are called for all models.","sidebar":"docs"},"physics-hotcore":{"id":"physics-hotcore","title":"Hot Core","description":"Main Contributors: Serena Viti, Jon Holdship","sidebar":"docs"},"physics-shocks":{"id":"physics-shocks","title":"Shock Models","description":"Main Contributors: Izaskun Jimenez-Serra, Tom James, Jon Holdship","sidebar":"docs"},"pythonapi":{"id":"pythonapi","title":"Python Reference","description":"* uclchem","sidebar":"docs"},"running_a_grid":{"id":"running_a_grid","title":"Running a Grid","description":"A common task is to run UCLCHEM over a grid of parameter combinations. This notebook sets up a simple approach to doing so for regular grids.","sidebar":"docs"},"trouble-compile":{"id":"trouble-compile","title":"Compilation Issues","description":"Given that UCLCHEM is supplied as source code, used across many machine types, and is a fairly complex model, things will occasionally go wrong. We\'ve collected here some of the most common problems and hope they resolve most issues.","sidebar":"docs"},"trouble-integration":{"id":"trouble-integration","title":"Integration","description":"My code just keeps running","sidebar":"docs"}}}')}}]); \ No newline at end of file diff --git a/assets/js/611d6b88.f89bce51.js b/assets/js/611d6b88.f89bce51.js new file mode 100644 index 00000000..eb03952d --- /dev/null +++ b/assets/js/611d6b88.f89bce51.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7589],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),c=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),u=c(r),f=o,y=u["".concat(p,".").concat(f)]||u[f]||d[f]||a;return r?n.createElement(y,i(i({ref:t},l),{},{components:r})):n.createElement(y,i({ref:t},l))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=u;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s.mdxType="string"==typeof e?e:o,i[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>f,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=r(7462),o=r(3366),a=(r(7294),r(3905)),i=["components"],s={id:"hydro",title:"Hydro Post Processing"},p=void 0,c={unversionedId:"hydro",id:"version-v3.3.1/hydro",title:"Hydro Post Processing",description:"Main Contributors: Jon Holdship",source:"@site/versioned_docs/version-v3.3.1/hydro.md",sourceDirName:".",slug:"/hydro",permalink:"/docs/hydro",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"hydro",title:"Hydro Post Processing"}},l={},d=[],u={toc:d};function f(e){var t=e.components,r=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,n.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Main Contributors"),": Jon Holdship"),(0,a.kt)("p",null,"UCLCHEM includes a post-processing module ",(0,a.kt)("inlineCode",{parentName:"p"},"src/hydro.f90")," which is effectively a template as it necessarily requires user editing. The module reads in a columnated file of physical properties such as the output from a hydrodynamical model and creates interpolation functions."),(0,a.kt)("p",null,"As ",(0,a.kt)("inlineCode",{parentName:"p"},"updatePhysics")," is called by UCLCHEM's main loop, these interpolation functions are called to get the physical properties of the gas at the current simulation time."),(0,a.kt)("p",null,"Whilst the maximum amount of information that can be read from the input file is set by the physical properties UCLCHEM deals with, this is naturally a user dependent process. The input file format and the gas properties that are supplied (eg just density/temperature or density/temperature/Av) depend on the model being post processed. Thus ",(0,a.kt)("inlineCode",{parentName:"p"},"src/hydro.f90")," needs to be edited to account for this."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/634b82b7.90e86b81.js b/assets/js/634b82b7.90e86b81.js deleted file mode 100644 index c0ff3c93..00000000 --- a/assets/js/634b82b7.90e86b81.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5572],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=c(n),f=o,g=d["".concat(s,".").concat(f)]||d[f]||p[f]||a;return n?r.createElement(g,i(i({ref:t},u),{},{components:n})):r.createElement(g,i({ref:t},u))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>f,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=n(7462),o=n(3366),a=(n(7294),n(3905)),i=["components"],l={id:"trouble-integration",title:"Integration"},s=void 0,c={unversionedId:"trouble-integration",id:"version-v3.3.0/trouble-integration",title:"Integration",description:"My code just keeps running",source:"@site/versioned_docs/version-v3.3.0/trouble-integration.md",sourceDirName:".",slug:"/trouble-integration",permalink:"/docs/trouble-integration",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"trouble-integration",title:"Integration"},sidebar:"docs",previous:{title:"Compilation Issues",permalink:"/docs/trouble-compile"},next:{title:"Core Physics",permalink:"/docs/physics-core"}},u={},p=[{value:"My code just keeps running",id:"my-code-just-keeps-running",level:2},{value:"Crashing/Stalling Model Runs",id:"crashingstalling-model-runs",level:2}],d={toc:p};function f(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"my-code-just-keeps-running"},"My code just keeps running"),(0,a.kt)("p",null,"If you're working in jupyter notebooks, fortran output will often not be printed to the cell outputs until the cell finishes running. This can be a real problem if the integration is failing because UCLCHEM may be printing warnings to the screen but you won't see them. If your code is running for a few minutes in a notebook, you may want to export the code to a python script and run it. The uclchem output will print to the console and you will see the integration errors piling up."),(0,a.kt)("h2",{id:"crashingstalling-model-runs"},"Crashing/Stalling Model Runs"),(0,a.kt)("p",null,"Chemical ODEs are infamously stiff and, as such, difficult to solve. There's also no single solver configuration we can use that will guarantee an efficient and accurate solution to every single problem. In particular, if you have a very large network or one with very fast reactions, you may find the integrator stuggles. "),(0,a.kt)("p",null,'You\'ll know the integrator is struggling if you find you get a lot of printed messages stating "ISTATE = -n" (where n is some integer). If the model run completes and there is nothing obviously wrong (eg oscillations) then its likely the solution is fine and your network/parameter combination is at the edge of what the solver can handle. If it takes a very long time or never completes, there is an issue.'),(0,a.kt)("p",null,"One good method to check the validity of your solution is to use the element conservation functions in the ",(0,a.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.analysis.check_element_conservation"},"python module"),". The integrator typically fails to conserve elemental abundances when the integration has accumulated too large an error. Thus, checking for conservation can reassure you that the integration was successful even if the integrator struggled."),(0,a.kt)("p",null,"To fix this, your first port of call should be the ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_factor"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_min")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"reltol")," parameters. The comments in ",(0,a.kt)("inlineCode",{parentName:"p"},"src/fortran_src/dvode.f90")," give a fantastic overview of the integrator but in essence, DVODE takes two parameters: ",(0,a.kt)("inlineCode",{parentName:"p"},"reltol")," should set the decimal place accuracy of your abundances and ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol")," the overall error you'll accept. In UCLCHEM, reltol is just a number but we use DVODE's option of making ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol")," a vector with one value per species instead of a single value. This allows us to change the error tolerance depending on the species abundances. ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol")," will take the value of ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_factor")," times the species abundance or ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_min"),", whichever is larger."),(0,a.kt)("p",null,"Changing the tolerances is a dark art and it isn't necessarily the case that smaller values = more accuracy and larger values = faster integration. Trying a few values (particularly of ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_factor"),") is always a good first step when you hit integrator problems."),(0,a.kt)("p",null,"If that doesn't work, you should investigate whether your network is reasonable. Duplicated reactions and bad rate coefficients can result in reactions going too quickly and breaking the integrator."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/668339d9.ac7ce8bd.js b/assets/js/668339d9.ac7ce8bd.js deleted file mode 100644 index 3653ea63..00000000 --- a/assets/js/668339d9.ac7ce8bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2963],{3905:(a,e,t)=>{t.d(e,{Zo:()=>o,kt:()=>h});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var i=s.createContext({}),l=function(a){var e=s.useContext(i),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},o=function(a){var e=l(a.components);return s.createElement(i.Provider,{value:e},a.children)},N={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,i=a.parentName,o=r(a,["components","mdxType","originalType","parentName"]),c=l(t),h=n,k=c["".concat(i,".").concat(h)]||c[h]||N[h]||m;return t?s.createElement(k,p(p({ref:e},o),{},{components:t})):s.createElement(k,p({ref:e},o))}));function h(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=c;var r={};for(var i in e)hasOwnProperty.call(e,i)&&(r[i]=e[i]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>N});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={id:"desorb",title:"Adsorption & Desorption Reactions"},i=void 0,l={unversionedId:"desorb",id:"version-v3.3.0/desorb",title:"Adsorption & Desorption Reactions",description:"Coupling between the gas and the grain chemistry primarily comes from the freeze out of material from the gas phase onto the dust grains (adsorption) and the sublimation of material from the grains into the gas phase (desorption). The major processes considered by UCLCHEM are listed below. Note that we assume desorption and freeze out occur between the gas and the surface only, bulk material in three phase models does not directly desorb into the gas phase.",source:"@site/versioned_docs/version-v3.3.0/chem-desorb.md",sourceDirName:".",slug:"/desorb",permalink:"/docs/desorb",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"desorb",title:"Adsorption & Desorption Reactions"},sidebar:"docs",previous:{title:"Grain Surface Reactions",permalink:"/docs/grain"},next:{title:"Bulk Ice Processes",permalink:"/docs/bulk"}},o={},N=[{value:"Freeze out",id:"freeze-out",level:2},{value:"Thermal Desorption",id:"thermal-desorption",level:2},{value:"Non-thermal Desorption Methods",id:"non-thermal-desorption-methods",level:2},{value:"H2 Formation",id:"h2-formation",level:5},{value:"Cosmic Rays",id:"cosmic-rays",level:5},{value:"UV photons",id:"uv-photons",level:5},{value:"Chemical Desorption",id:"chemical-desorption",level:5}],c={toc:N};function h(a){var e=a.components,t=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},c,t,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("p",null,"Coupling between the gas and the grain chemistry primarily comes from the freeze out of material from the gas phase onto the dust grains (adsorption) and the sublimation of material from the grains into the gas phase (desorption). The major processes considered by UCLCHEM are listed below. Note that we assume desorption and freeze out occur between the gas and the surface only, bulk material in three phase models does not directly desorb into the gas phase."),(0,m.kt)("h2",{id:"freeze-out"},"Freeze out"),(0,m.kt)("p",null,"We assume that molecules freeze out at a rate given by the rate of collision between a species and the dust grains:"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"k"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"v"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"t"),(0,m.kt)("mi",{parentName:"mrow"},"h"))),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"A"),(0,m.kt)("mi",{parentName:"msub"},"g")),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"C"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"n")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k=\\alpha v_{th} A_g C_{ion}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"g")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"C"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))),(0,m.kt)("p",null,"where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"\u03b1")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\alpha")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1")))))," is a branching ratio, ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"V"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"t"),(0,m.kt)("mi",{parentName:"mrow"},"h")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"V_{th}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"V"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.22222em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"h"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the thermal velocity of the particle and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"A"),(0,m.kt)("mi",{parentName:"msub"},"g"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"A_g")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15139200000000003em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"g")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the dust grain cross sectional area per hydrogen nuclei. ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"C"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"n")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"C_{ion}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"C"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is a factor that increases the freeze out rate of ions due to electrostatic forces."),(0,m.kt)("p",null,"The branching ratio is an artefact of older versions of UCLCHEM which allows the user to include some grain processing of species without surface reactions. For a given species (eg C) we can determine several species that will rapidly form on the grain (CH,CH4) and freeze some portion of the original species (C) out to these products. This allows fast processes like hydrogenation to be treated without a network of surface reactions. ",(0,m.kt)("em",{parentName:"p"},"However, users should default to using a branching ratio of 1 and allowing surface reactions to take place"),"."),(0,m.kt)("p",null,"For efficiency, freeze out is turned off when the desorption rate is so high that ignoring freeze out would produce an error of around 10",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"20")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-20}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))))))))))))," on the abundances of the gas phase species. We also turn off freeze out when the temperature exceeds the binding energy of H",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msub"}),(0,m.kt)("mn",{parentName:"msub"},"2"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))))))),"O."),(0,m.kt)("h2",{id:"thermal-desorption"},"Thermal Desorption"),(0,m.kt)("p",null,"We include thermal desorption of material from the grains based on the binding energy of each species to the ices. "),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"k"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"\u03bd"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"d"),(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"f"),(0,m.kt)("mi",{parentName:"mrow"},"f"))),(0,m.kt)("mi",{parentName:"mrow"},"exp"),(0,m.kt)("mo",{parentName:"mrow"},"\u2061"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"E"),(0,m.kt)("mi",{parentName:"msub"},"B"))),(0,m.kt)("mi",{parentName:"mfrac"},"T")),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\nu_{diff} \\exp(\\frac{-E_B}{T})")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.04633em",verticalAlign:"-0.686em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.06366em"}},"\u03bd"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.06366em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.05764em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05017em"}},"B")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,m.kt)("p",null,"This can be simply multiplied by the surface abundance of a species to get its rate of change when using a three phase network. However, for two phases, we multiply by the fraction of the total ice particle which are a given species and by the number of surface sites per volume. This accounts for the fact a majority of the ice material cannot thermally desorb as it not on the surface."),(0,m.kt)("p",null,"Thermal desorption is most relevant to hot core models. As the temperature increases, sublimation can occur. However, TPD experiments (Collings et al. 2004) show that this happens in bursts rather than as a continuous process. These bursts happen naturally in the three phase model as the surface is removed and then the bulk. However, for a two phase network, such bursts need to be simulated. For this reason, the hot core model handles these bursts in the two phase case and the user should turn off thermal desorption."),(0,m.kt)("h2",{id:"non-thermal-desorption-methods"},"Non-thermal Desorption Methods"),(0,m.kt)("h5",{id:"h2-formation"},"H2 Formation"),(0,m.kt)("p",null,"H2 molecules form when H atoms meet briefly on grain surfaces. The reaction is sufficiently exothermic that not only is the product is released into the gas phase but the surrounding grain material is also heated. "),(0,m.kt)("h5",{id:"cosmic-rays"},"Cosmic Rays"),(0,m.kt)("p",null,"Cosmic rays which impact the grains can free molecules from the surface."),(0,m.kt)("h5",{id:"uv-photons"},"UV photons"),(0,m.kt)("p",null,"Surface molecules which absorb a UV photon may gain sufficient energy to escape the surface. We consider secondary photons created by cosmic rays as well as the interstellar radiation field."),(0,m.kt)("h5",{id:"chemical-desorption"},"Chemical Desorption"),(0,m.kt)("p",null,"Other than H2 formation, the desorption of species due to exothermic reactions happening nearby on the grain is not treated. However, as described in the grain surface reaction section, any exothermic grain surface reaction has a probability of releasing the products into the gas phase and this is accounted for."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6aaec6ca.bcc2e4c8.js b/assets/js/6aaec6ca.bcc2e4c8.js deleted file mode 100644 index 5987fc19..00000000 --- a/assets/js/6aaec6ca.bcc2e4c8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1138],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var s=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,s)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=s.createContext({}),p=function(e){var t=s.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=p(e.components);return s.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return s.createElement(s.Fragment,{},t)}},u=s.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(a),h=n,d=u["".concat(l,".").concat(h)]||u[h]||m[h]||r;return a?s.createElement(d,i(i({ref:t},c),{},{components:a})):s.createElement(d,i({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>p,toc:()=>m});var s=a(7462),n=a(3366),r=(a(7294),a(3905)),i=["components"],o={id:"network",title:"Creating a Network"},l=void 0,p={unversionedId:"network",id:"version-v3.3.0/network",title:"Creating a Network",description:"MakeRates",source:"@site/versioned_docs/version-v3.3.0/start-network.md",sourceDirName:".",slug:"/network",permalink:"/docs/network",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"network",title:"Creating a Network"},sidebar:"docs",previous:{title:"Installation",permalink:"/docs/"},next:{title:"Model Parameters",permalink:"/docs/parameters"}},c={},m=[{value:"MakeRates",id:"makerates",level:2},{value:"Input",id:"input",level:2},{value:"Default Network",id:"default-network",level:2},{value:"Outputs",id:"outputs",level:2},{value:"What MakeRates Does",id:"what-makerates-does",level:2},{value:"Creating your own Network",id:"creating-your-own-network",level:2},{value:"Species list",id:"species-list",level:4},{value:"Reaction list",id:"reaction-list",level:4},{value:"Three Phase Chemistry",id:"three-phase-chemistry",level:2}],u={toc:m};function h(e){var t=e.components,a=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"makerates"},"MakeRates"),(0,r.kt)("p",null,"In order to make a chemical model flexible, the ability to solve a user supplied chemical network is a must. UCLCHEM uses a preprocessing python script to turn csv lists of species and reactions into fortran files for use in the main code. This script is called MakeRates and can be found in the Makerates subdirectory of the repository. It combines a gas phase reaction database with user supplied lists of species and additional reactions into the necessary Fortran code to run UCLCHEM. It also supplies a number of human readable outputs."),(0,r.kt)("p",null,"In the sections below, we discuss how to build your network and set the inputs for MakeRates but once that is done, you can run MakeRates with the following commands:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd MakeRates\npython MakeRates.py\ncd ..\npip install .\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note the pip install at the end of the process. Any output from MakeRates requires that the code be recompiled because MakeRates produces new source code for UCLCHEM!")),(0,r.kt)("h2",{id:"input"},"Input"),(0,r.kt)("p",null,"Makerates is controlled using a yaml file ",(0,r.kt)("inlineCode",{parentName:"p"},"Makerates/user_settings.yaml"),". By changing the values in this file, you can create different networks. The default values of this file are copied below."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"#Your list of all species\nspecies_file : inputFiles/default_species.csv\n\n#core reactions from gas phase database\ndatabase_reaction_file : inputFiles/umist12-ucledit.csv\ndatabase_reaction_type : UMIST\n\n#set of additional reactions: eg grain network\ncustom_reaction_file : inputFiles/default_grain_network.csv\ncustom_reaction_type : UCL\n\n#whether to automatically expand to three phase network\nthree_phase : True\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"species_file")," is a csv list of species and their properties. We provide a default list and detailed instructions below."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"database_reaction_file")," is your first reaction file, we expect most users to use UMIST12 or KIDA2014 for this but you could create your own file from an alternative database. Makerates can read files formatted in the same manner as the UMIST or KIDA databases as well as our own simple csv format, the ",(0,r.kt)("inlineCode",{parentName:"p"},"database_reaction_type")," setting lets MakeRates know which and should be set to 'UMIST', 'KIDA', or 'UCL'."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"custom_reaction_file")," is an additional reaction file. In the example file, we include all of our grain surface reactions which is the intended use of this file. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"three_phase")," is a toggle that tells MakeRates whether to automatically expand your network into a three phase model."),(0,r.kt)("h2",{id:"default-network"},"Default Network"),(0,r.kt)("p",null,"A basic version of each of the required file is supplied in the repository. The network that MakeRates produces from those files is also include in the source code so that a new user who simply installs UCLCHEM without running MakeRates will be using our default network. These default files serve largely as examples of how the files should be formatted and we also describe each one below so that the user can produce their own network."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"We do not endorse the default network"),", we have simply produced a grain surface network that was relatively up to date in 2018. It produces reasonable ice mantle abundances for major species and ignores larger COMs. We strongly suggest any published work be based on a network in which the user has confidence. However, where the user is not greatly concerned with grain surface chemistry, the default network is a good starting point."),(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("p",null,"Outputs from MakeRates are automatically moved to the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/")," directory so the user can ",(0,r.kt)("inlineCode",{parentName:"p"},"pip install .")," and update their installation of UCLCHEM to use their new network. However, by adding the parameter ",(0,r.kt)("inlineCode",{parentName:"p"},"output_directory")," to the yaml file, you can have all the files moved to a directory instead without copying them to your UCLCHEM src folder. If you do, the following files will be produced:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"network.f90 - Fortran arrays containing lists of species names and properties (mass, binding energy etc) as well as reaction reactants, products and rate coefficients."),(0,r.kt)("li",{parentName:"ul"},"odes.f90 - Code to calculate the rate of change of each species' abundance for the numerical solver"),(0,r.kt)("li",{parentName:"ul"},"species.csv - A list of all species in the network and their properties. Made for humans not UCLCHEM."),(0,r.kt)("li",{parentName:"ul"},"reactions.csv - A list of all reactions including reactants, products and coefficients. Made for humans not UCLCHEM.")),(0,r.kt)("h2",{id:"what-makerates-does"},"What MakeRates Does"),(0,r.kt)("p",null,"MakeRates does the following:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Combines the two input reaction lists"),(0,r.kt)("li",{parentName:"ul"},"Filters to remove any reactions containing species not in the input species list"),(0,r.kt)("li",{parentName:"ul"},"Adds freeze out and desorption reactions for all species"),(0,r.kt)("li",{parentName:"ul"},"Creates branching reactions for Langmuir-Hinshelwood and Eley-Rideal reactions where products chemically desorb"),(0,r.kt)("li",{parentName:"ul"},"Optionally: creates additional reactions and species needed for a three phase network"),(0,r.kt)("li",{parentName:"ul"},"Does basic network consistency checks and alerts user of problems"),(0,r.kt)("li",{parentName:"ul"},"Writes fortran files for UCLCHEM"),(0,r.kt)("li",{parentName:"ul"},"Writes other output files")),(0,r.kt)("h2",{id:"creating-your-own-network"},"Creating your own Network"),(0,r.kt)("p",null,"To create your own network you need to produce a species list and a reaction list."),(0,r.kt)("h4",{id:"species-list"},"Species list"),(0,r.kt)("p",null,"The species list should simply be a list with one row per species in the network. Each row should contain the species name, mass, binding energy and enthalpy of formation. The latter two are only used for surface species so can be set to zero for the gas phase species. MakeRates will check the mass is correct for each species and alert you of discrepancies."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"C,12,0,0,0,0,0\n#CH4,16,960,0,0.7,0.667,-15.9\n")),(0,r.kt)("p",null,"In the above example, C is a gas phase species so we have set the mass but ignored the other variables. #CH4 is methane in the ice so we have additionally set a binding energy of 960 K and enthalpy of formation of -15.9 kcal/mol. The other three values (0, 0.7, 0.667) are desorption fractions that three phase chemistry networks ignore. For two phase networks, we mimic the multiple desorption events seen in TPD experiments by setting these fractions. See ",(0,r.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2004MNRAS.354.1141V/abstract"},"Viti et al. 2004")," for more information."),(0,r.kt)("p",null,"The enthalpy of formation for essentially any species can be found in chemical databases such as the ",(0,r.kt)("a",{parentName:"p",href:"https://webbook.nist.gov/"},"NIST web book"),". They're usually in kj/mol but the conversion to kcal/mol is easy enough and NIST has an option to switch values to kcal. A fantastic resource for binding energies is ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1016/j.molap.2017.01.002"},"Wakelam et al. 2017")," but these are harder to find in general. In the absolute worse case, you can sum up the binding energies of sub-groups in your molecule but this is pretty inaccurate."),(0,r.kt)("h4",{id:"reaction-list"},"Reaction list"),(0,r.kt)("p",null,"The second reaction list is intended to contain your surface network but can also be used to augment the gas phase databases by including additional gas phase reactions. The reaction list should be a list with one row per reaction and each row should be a comma separated list of 3 reactants, 4 products, three coefficients (alpha,beta,gamma) and a minimum and maximum temperature. Any missing values such as a third reactant can be left blank. In particular, the temperatures are optional but can be useful when you include multiple versions of the same reaction. In that case, UCLCHEM will only use each one within its specified temperature range."),(0,r.kt)("p",null,"The third reactant can be used as a keyword to tell MakeRates what kind of reaction is occuring. In the absence of a keyword, MakeRates and UCLCHEM will treat any reaction as a gas-phase two body reaction. Two keywords the user may wish to use are ER and LH for Eley-Rideal and Langmuir-Hinshelwood reactions respectively (see ",(0,r.kt)("a",{parentName:"p",href:"grain/"},"Grain Chemisty"),"). If a keyword is not added, UCLCHEM will assume a reaction between two surface reactions follows a Kooji-Arrhenius equation."),(0,r.kt)("p",null,"Two other useful reactions types to include are FREEZE and DESORB. Makerates adds freeze out and desorption reactions for every species, assuming they remain unchanged by the process. For example, CO in the gas becomes #CO on the grain. If you would instead like to specify the products, you can include a reaction:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"H3O+,FREEZE,,#H2O,H,,,1,0,0,,,\n#HPN,DESORB,,HPN+,,,,1,0,0,,,\n")),(0,r.kt)("p",null,"which will override the desorption or freeze out products of a species. "),(0,r.kt)("h2",{id:"three-phase-chemistry"},"Three Phase Chemistry"),(0,r.kt)("p",null,"The input ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," controls whether the ices are treated as a single phase or the surface is treated separated to the bulk. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to true, the chemical network will have gas, grain surface, and bulk ice chemistry. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to false, the chemical network will have gas and grain surface chemistry."),(0,r.kt)("p",null,"When true, MakeRates will create the bulk ice chemistry by duplicating the surface species and reactions in your input files. The difference will be that, unless you specifically override the bulk binding energy, every species in the bulk has a binding energy equal to the H2O binding energy. It will also add terms to the ODEs to allow transfer between the bulk and the surface. See the chemistry sections for more information."),(0,r.kt)("p",null,'You can override the binding energy of material in the bulk by explicitly including the bulk species in your species file rather than allowing MakeRates to automatically add it. Bulk species are designated with an "@". For example, "H2O" is gas phase H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O, "#H2O" is surface H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O and "@H2O" is H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O in the bulk. If you set the binding energy to "Inf", the species will not leave the grains during thermal desorption. This allows you to model refractory species in the bulk.'))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/73d53c58.33bf9a8e.js b/assets/js/73d53c58.33bf9a8e.js new file mode 100644 index 00000000..b56ffc28 --- /dev/null +++ b/assets/js/73d53c58.33bf9a8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8069],{3905:(e,t,l)=>{l.d(t,{Zo:()=>d,kt:()=>m});var n=l(7294);function r(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}function a(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,n)}return l}function o(e){for(var t=1;t=0||(r[l]=e[l]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}var u=n.createContext({}),i=function(e){var t=n.useContext(u),l=t;return e&&(l="function"==typeof e?e(t):o(o({},t),e)),l},d=function(e){var t=i(e.components);return n.createElement(u.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var l=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=i(l),m=r,k=p["".concat(u,".").concat(m)]||p[m]||c[m]||a;return l?n.createElement(k,o(o({ref:t},d),{},{components:l})):n.createElement(k,o({ref:t},d))}));function m(e,t){var l=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=l.length,o=new Array(a);o[0]=p;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s.mdxType="string"==typeof e?e:r,o[1]=s;for(var i=2;i{l.r(t),l.d(t,{assets:()=>d,contentTitle:()=>u,default:()=>m,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var n=l(7462),r=l(3366),a=(l(7294),l(3905)),o=["components"],s={},u="Running a Grid",i={unversionedId:"running_a_grid",id:"version-v3.3.1/running_a_grid",title:"Running a Grid",description:"A common task is to run UCLCHEM over a grid of parameter combinations. This notebook sets up a simple approach to doing so for regular grids.",source:"@site/versioned_docs/version-v3.3.1/running_a_grid.md",sourceDirName:".",slug:"/running_a_grid",permalink:"/docs/running_a_grid",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{},sidebar:"docs",previous:{title:"Advanced Physical Modelling",permalink:"/docs/modelling_objects"},next:{title:"Chemical Analysis",permalink:"/docs/chemical_analysis"}},d={},c=[{value:"A Simple Grid",id:"a-simple-grid",level:2},{value:"Define Parameter Space",id:"define-parameter-space",level:3},{value:"Set up the model",id:"set-up-the-model",level:3},{value:"Run Grid",id:"run-grid",level:3},{value:"The Simple Way",id:"the-simple-way",level:4},{value:"The Fast Way",id:"the-fast-way",level:4},{value:"Checking Your Grid",id:"checking-your-grid",level:2},{value:"Complex Grid",id:"complex-grid",level:2},{value:"Summary",id:"summary",level:2}],p={toc:c};function m(e){var t=e.components,l=(0,r.Z)(e,o);return(0,a.kt)("wrapper",(0,n.Z)({},p,l,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-a-grid"},"Running a Grid"),(0,a.kt)("p",null,"A common task is to run UCLCHEM over a grid of parameter combinations. This notebook sets up a simple approach to doing so for regular grids."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\nimport numpy as np\nimport pandas as pd\nfrom multiprocessing import Pool\nimport os\n")),(0,a.kt)("h2",{id:"a-simple-grid"},"A Simple Grid"),(0,a.kt)("h3",{id:"define-parameter-space"},"Define Parameter Space"),(0,a.kt)("p",null,"First, we define our parameter space. We do this by using numpy and pandas to produce a table of all possible combinations of some parameters of interest."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'# This part can be substituted with any choice of grid\n#here we just vary the density, temperature and zeta \ntemperatures = np.linspace(10, 50, 3)\ndensities = np.logspace(4,6,3)\nzetas = np.logspace(1, 3, 3)\n\n#meshgrid will give all combinations, then we shape into columns and put into a table\nparameterSpace = np.asarray(np.meshgrid(temperatures,densities,zetas)).reshape(3, -1)\nmodel_table=pd.DataFrame(parameterSpace.T, columns=[\'temperature\',\'density\',\'zeta\'])\n\n#keep track of where each model output will be saved and make sure that folder exists\nmodel_table["outputFile"]=model_table.apply(lambda row: f"../grid_folder/{row.temperature}_{row.density}_{row.zeta}.csv", axis=1)\nprint(f"{model_table.shape[0]} models to run")\nif not os.path.exists("../grid_folder"):\n os.makedirs("../grid_folder")\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"27 models to run\n")),(0,a.kt)("h3",{id:"set-up-the-model"},"Set up the model"),(0,a.kt)("p",null,"Next, we need a function that will run our model. We write a quick function that takes a row from our dataframe and uses it to populate a parameter dictionary for UCLCHEM and then run a cloud model. We can then map our dataframe to that function."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'def run_model(row):\n #basic set of parameters we\'ll use for this grid. \n ParameterDictionary = {"endatfinaldensity":False,\n "freefall": False,\n "initialDens": row.density,\n "initialTemp": row.temperature,\n "zeta": row.zeta,\n "outputFile": row.outputFile,\n "finalTime":1.0e6,\n "baseAv":10}\n result = uclchem.model.cloud(param_dict=ParameterDictionary)\n return result[0]#just the integer error code\n')),(0,a.kt)("h3",{id:"run-grid"},"Run Grid"),(0,a.kt)("h4",{id:"the-simple-way"},"The Simple Way"),(0,a.kt)("p",null,"We can use pandas apply to simply pass each row to our helper function in turn. This will take some time since we're running the models one by one. I'll use the ",(0,a.kt)("inlineCode",{parentName:"p"},"head")," function just to run five rows as an example here."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"result=model_table.head().apply(run_model, axis=1)\n")),(0,a.kt)("h4",{id:"the-fast-way"},"The Fast Way"),(0,a.kt)("p",null,"Alternatively, we can use multiprocessing to run the models in parallel. That will allow us to run many models simulataneously and make use of all the cores available on our machine."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"def pool_func(x):\n i,row=x\n return run_model(row)\n\nwith Pool(processes=6) as pool:\n results = pool.map(pool_func, model_table.iterrows())\n")),(0,a.kt)("h2",{id:"checking-your-grid"},"Checking Your Grid"),(0,a.kt)("p",null,"After running, we should do two things. First, let's add ",(0,a.kt)("inlineCode",{parentName:"p"},"results")," to our dataframe as a new column. Positive results mean a successful UCLCHEM run and negative ones are unsuccessful. Then we can run each model through ",(0,a.kt)("inlineCode",{parentName:"p"},"check_element_conservation")," to check the integration was successful. We'll use both these things to flag models that failed in some way."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"def element_check(output_file):\n df=uclchem.analysis.read_output_file(output_file)\n #get conservation values\n conserves=uclchem.analysis.check_element_conservation(df)\n #check if any error is greater than 1%\n return all([float(x[:-1])<1 for x in conserves.values()])\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'model_table["run_result"]=results\nmodel_table["elements_conserved"]=model_table["outputFile"].map(element_check)\n#check both conditions are met\nmodel_table["Successful"]=(model_table.run_result>=0) & (model_table.elements_conserved)\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"model_table.head()\n")),(0,a.kt)("div",null,(0,a.kt)("table",{border:"1",class:"dataframe"},(0,a.kt)("thead",null,(0,a.kt)("tr",null,(0,a.kt)("th",null),(0,a.kt)("th",null,"temperature"),(0,a.kt)("th",null,"density"),(0,a.kt)("th",null,"zeta"),(0,a.kt)("th",null,"outputFile"),(0,a.kt)("th",null,"run_result"),(0,a.kt)("th",null,"elements_conserved"),(0,a.kt)("th",null,"Successful"))),(0,a.kt)("tbody",null,(0,a.kt)("tr",null,(0,a.kt)("th",null,"0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"../grid_folder/10.0_10000.0_10.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"1"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"100.0"),(0,a.kt)("td",null,"../grid_folder/10.0_10000.0_100.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"2"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"1000.0"),(0,a.kt)("td",null,"../grid_folder/10.0_10000.0_1000.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"3"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"../grid_folder/30.0_10000.0_10.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"4"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"100.0"),(0,a.kt)("td",null,"../grid_folder/30.0_10000.0_100.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True"))))),(0,a.kt)("h2",{id:"complex-grid"},"Complex Grid"),(0,a.kt)("p",null,"The above was straightforward enough but what about a modelling a grid of shocks? Not only do we want to loop over relevant parameters, we also need to run a few preliminary models to give ourselves starting abundances. We'll start by defining two helper functions, one to run our preliminary cloud and one to run the shock."),(0,a.kt)("p",null,"Let's further imagine that we want to obtain the abundances of several species at the end of the model. We can use the ",(0,a.kt)("inlineCode",{parentName:"p"},"out_species")," parameter to specify which species we want to track and return them to our dataframe."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'out_species=["CO","H2O","CH3OH"]\n\ndef run_prelim(density):\n #basic set of parameters we\'ll use for this grid. \n ParameterDictionary = {"endatfinaldensity":True,\n "freefall": True,\n "initialDens":1e2,\n "finalDens": density,\n "initialTemp": 10.0,\n "abundSaveFile": f"../grid_folder/starts/{density:.0f}.csv",\n "baseAv":1}\n result = uclchem.model.cloud(param_dict=ParameterDictionary)\n return result\n\ndef run_model(row):\n i,row=row # we know we\'re receiving the iterrows() tuple\n #basic set of parameters we\'ll use for this grid. \n ParameterDictionary = {"endatfinaldensity":False,\n "freefall": False,\n "initialDens": row.density,\n "initialTemp": 10.0,\n "outputFile": row.outputFile,\n "abundLoadFile": f"../grid_folder/starts/{row.density:.0f}.csv",\n "finalTime":1.0e5,\n "abstol_factor":1e-18,\n "reltol":1e-12,\n "baseAv":1}\n result = uclchem.model.cshock(row.shock_velocity,param_dict=ParameterDictionary,out_species=out_species)\n #First check UCLCHEM\'s result flag to seeif it\'s positive, if it is return the abundances\n if result[0]>0:\n return result[:]\n #if not, return NaNs because model failed\n else:\n return([np.nan]*len(out_species))\n')),(0,a.kt)("p",null,"Then we define our parameter space again. We'll create two folders, one to store a set of initial abundances for each starting density in our model and another to store our shock outputs."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'# This part can be substituted with any choice of grid\n# here we just combine various initial and final densities into an easily iterable array\nshock_velocities = np.linspace(10, 50, 3)\ndensities = np.logspace(4,6,3)\n\nparameterSpace = np.asarray(np.meshgrid(shock_velocities,densities)).reshape(2, -1)\nmodel_table=pd.DataFrame(parameterSpace.T, columns=[\'shock_velocity\',\'density\'])\nmodel_table["outputFile"]=model_table.apply(lambda row: f"../grid_folder/shocks/{row.shock_velocity}_{row.density}.csv", axis=1)\nprint(f"{model_table.shape[0]} models to run")\n\nfor folder in ["starts","shocks"]:\n if not os.path.exists(f"../grid_folder/{folder}"):\n os.makedirs(f"../grid_folder/{folder}")\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"9 models to run\n")),(0,a.kt)("p",null,"We can then run our preliminary models followed by our science models. The science models will return the abundances at the final time step of each run so we can unpack those directly to our dataframe."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"with Pool(processes=3) as pool:\n results = pool.map(run_prelim, densities)\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'with Pool(processes=6) as pool:\n results = pool.map(run_model, model_table.iterrows())\nmodel_table[["Result","Dissipation Time"]+out_species]=results\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"model_table\n")),(0,a.kt)("div",null,(0,a.kt)("table",{border:"1",class:"dataframe"},(0,a.kt)("thead",null,(0,a.kt)("tr",null,(0,a.kt)("th",null),(0,a.kt)("th",null,"shock_velocity"),(0,a.kt)("th",null,"density"),(0,a.kt)("th",null,"outputFile"),(0,a.kt)("th",null,"Result"),(0,a.kt)("th",null,"Dissipation Time"),(0,a.kt)("th",null,"CO"),(0,a.kt)("th",null,"H2O"),(0,a.kt)("th",null,"CH3OH"))),(0,a.kt)("tbody",null,(0,a.kt)("tr",null,(0,a.kt)("th",null,"0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/10.0_10000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"1171.898734"),(0,a.kt)("td",null,"7.316441e-05"),(0,a.kt)("td",null,"4.355495e-06"),(0,a.kt)("td",null,"4.624479e-07")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"1"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/30.0_10000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"1171.898734"),(0,a.kt)("td",null,"2.591790e-05"),(0,a.kt)("td",null,"2.113885e-05"),(0,a.kt)("td",null,"1.196330e-07")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"2"),(0,a.kt)("td",null,"50.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/50.0_10000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"1171.898734"),(0,a.kt)("td",null,"1.320822e-05"),(0,a.kt)("td",null,"8.126066e-06"),(0,a.kt)("td",null,"1.989081e-08")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"3"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"100000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/10.0_100000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"117.189873"),(0,a.kt)("td",null,"1.082083e-07"),(0,a.kt)("td",null,"1.158740e-09"),(0,a.kt)("td",null,"3.697607e-10")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"4"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"100000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/30.0_100000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"117.189873"),(0,a.kt)("td",null,"1.121259e-10"),(0,a.kt)("td",null,"3.789106e-10"),(0,a.kt)("td",null,"4.907284e-10")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"5"),(0,a.kt)("td",null,"50.0"),(0,a.kt)("td",null,"100000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/50.0_100000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"117.189873"),(0,a.kt)("td",null,"2.454392e-10"),(0,a.kt)("td",null,"3.443643e-10"),(0,a.kt)("td",null,"6.454671e-10")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"6"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"1000000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/10.0_1000000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"11.718987"),(0,a.kt)("td",null,"1.084005e-10"),(0,a.kt)("td",null,"3.565914e-11"),(0,a.kt)("td",null,"4.816630e-11")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"7"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"1000000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/30.0_1000000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"11.718987"),(0,a.kt)("td",null,"1.897782e-10"),(0,a.kt)("td",null,"6.498499e-11"),(0,a.kt)("td",null,"7.847277e-12")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"8"),(0,a.kt)("td",null,"50.0"),(0,a.kt)("td",null,"1000000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/50.0_1000000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"11.718987"),(0,a.kt)("td",null,"2.167651e-10"),(0,a.kt)("td",null,"6.600196e-12"),(0,a.kt)("td",null,"3.412340e-12"))))),(0,a.kt)("h2",{id:"summary"},"Summary"),(0,a.kt)("p",null,"There are many ways to run grids of models and users will naturally develop their own methods. This notebook is just a simple example of how to run UCLCHEM for many parameter combinations whilst producing a useful output (the model_table) to keep track of all the combinations that were run. In a real script, we'd save the model file to csv at the end."),(0,a.kt)("p",null,"For much larger grids, it's recommended that you find a way to make your script robust to failure. Over a huge range of parameters, it is quite likely UCLCHEM will hit integration trouble for at least a few parameter combinations. Very occasionally, UCLCHEM will get caught in a loop where it fails to integrate and cannot adjust its strategy to manage it. This isn't a problem for small grids as the model can be stopped and the tolerances adjusted. However, for very large grids, you may end up locking all threads as they each get stuck on a different model. The best solution we've found for this case is to add a check so that models in your dataframe are skipped if their file already exists, this allows you to stop and restart the grid script as needed."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/7b477ff2.45895960.js b/assets/js/7b477ff2.45895960.js new file mode 100644 index 00000000..a4eb8253 --- /dev/null +++ b/assets/js/7b477ff2.45895960.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3893],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),h=o,m=d["".concat(s,".").concat(h)]||d[h]||u[h]||r;return n?a.createElement(m,i(i({ref:t},p),{},{components:n})):a.createElement(m,i({ref:t},p))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var a=n(7462),o=n(3366),r=(n(7294),n(3905)),i=["components"],l={id:"install",title:"Installation",slug:"/"},s=void 0,c={unversionedId:"install",id:"version-v3.3.1/install",title:"Installation",description:"Prerequisites",source:"@site/versioned_docs/version-v3.3.1/start-basicuse.md",sourceDirName:".",slug:"/",permalink:"/docs/",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"install",title:"Installation",slug:"/"},sidebar:"docs",previous:{title:"Getting Started",permalink:"/docs/category/getting-started"},next:{title:"Creating a Network",permalink:"/docs/network"}},p={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Obtaining UCLCHEM",id:"obtaining-uclchem",level:3},{value:"Software Requirements",id:"software-requirements",level:3},{value:"Apple and Windows",id:"apple-and-windows",level:3},{value:"Apple silicon/M1",id:"apple-siliconm1",level:3},{value:"Apple Intel",id:"apple-intel",level:3},{value:"Installation",id:"installation",level:2},{value:"Checking Your Install",id:"checking-your-install",level:2}],d={toc:u};function h(e){var t=e.components,n=(0,o.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("h3",{id:"obtaining-uclchem"},"Obtaining UCLCHEM"),(0,r.kt)("p",null,"You can visit our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/uclchem/UCLCHEM"},"main page")," to get download links for the code, or ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/uclchem/UCLCHEM"},"our github"),". Alternatively, you can use git to clone the repo directly from terminal."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"git clone https://github.com/uclchem/UCLCHEM.git\n")),(0,r.kt)("h3",{id:"software-requirements"},"Software Requirements"),(0,r.kt)("p",null,"You need to have the following software installed on your machine:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Python 3.x"),(0,r.kt)("li",{parentName:"ul"},"GNU Make"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://gcc.gnu.org/"},"GNU compilers"))),(0,r.kt)("p",null,"You will also need various python libraries but they will be installed if you follow the installation instructions below. Please note, UCLCHEM is installed by calling the ",(0,r.kt)("inlineCode",{parentName:"p"},"python3")," command. If you have Python 3.x but your system only recognizes ",(0,r.kt)("inlineCode",{parentName:"p"},"python")," as the command to use it, you should alias ",(0,r.kt)("inlineCode",{parentName:"p"},"python")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"python3")," or update ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/Makefile")," to use ",(0,r.kt)("inlineCode",{parentName:"p"},"python")," anywhere it says ",(0,r.kt)("inlineCode",{parentName:"p"},"python3"),"."),(0,r.kt)("h3",{id:"apple-and-windows"},"Apple and Windows"),(0,r.kt)("p",null,"Mac users are encourage to use Xcode to get the GNU compilers and Windows users are most likely to have success with the Windows Subsystem for Linux. See our ",(0,r.kt)("a",{parentName:"p",href:"/docs/trouble-compile"},"troubleshooting")," page for more information if you encounter problems. For Mac users with Apple silicon special installations instructions are listed below the regular installation instructions."),(0,r.kt)("h3",{id:"apple-siliconm1"},"Apple silicon/M1"),(0,r.kt)("p",null,"For this use case we recommend the usage of the package manager conda (the installer for the minimal version can be found ",(0,r.kt)("a",{parentName:"p",href:"https://docs.conda.io/en/latest/miniconda.html"},"here"),").\nEnsure that you install the apple silicon/M1 version, together with Xcode."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If you are on MacOS Ventura (13.X), you need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"conda install -c conda-forge gfortran=12.2"),". Since at least fortran version 12 is needed for Ventura.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"conda create -n uclchem_osx\nconda activate uclchem_osx\nconda config --env --set subdir osx-arm64\nconda install python=3.10\nconda install gfortran\n")),(0,r.kt)("p",null,"After this, one can continue with the installation instructions above and install. In order to use\nUCLCHEM in a new terminal session one has to use the command ",(0,r.kt)("inlineCode",{parentName:"p"},"conda activate uclchem_osx"),"."),(0,r.kt)("h3",{id:"apple-intel"},"Apple Intel"),(0,r.kt)("p",null,"Similar instructions as for M1, but now with the x86_64 instruction set. Again this requires Xcode."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"conda create -n uclchem_osx\nconda activate uclchem_osx\nconda config --env --set subdir osx-64\nconda install python=3.9\nconda install clang\nconda install gfortran\n")),(0,r.kt)("p",null,"After this, one can continue with the installation instructions above and install. In order to use\nUCLCHEM in a new terminal session one has to use the command ",(0,r.kt)("inlineCode",{parentName:"p"},"conda activate uclchem_osx"),"."),(0,r.kt)("p",null,"If you encounter further issues please check ",(0,r.kt)("a",{parentName:"p",href:"/docs/trouble-compile"},"troubleshooting"),"."),(0,r.kt)("h2",{id:"installation"},"Installation"),(0,r.kt)("p",null,"UCLCHEM is designed to be compiled to a python library. Despite this, we cannot distribute it as a python package via pypi or similar because the user needs to be able to recompile their own version in order to change the network. The chemical network is hard coded for efficiency so it is not possible to change the network without recompiling."),(0,r.kt)("p",null,"In order to compile UCLCHEM, you will simply need to do the folowing from the main directory of the repository:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd UCLCHEM\npip install -e .\n")),(0,r.kt)("p",null,"This will install the UCLCHEM library into your python environment, you can then import it and use it in your python scripts. If you get an error at this stage, it is very likely you do not have Cmake or gfortran installed. You must do this again every time you use ",(0,r.kt)("a",{parentName:"p",href:"/docs/network"},"Makerates"),"."),(0,r.kt)("p",null,"If it completes without error then, that's it! UCLCHEM is installed. We have tutorials on how to ",(0,r.kt)("a",{parentName:"p",href:"/docs/first_model"},"run your first model")," as well as more complex use cases. The rest of the 'Getting Started' section focuses on creating a network and the various parameters the user can control. "),(0,r.kt)("h2",{id:"checking-your-install"},"Checking Your Install"),(0,r.kt)("p",null,"We provide several ways to get acquainted with the code including a series of ",(0,r.kt)("a",{parentName:"p",href:"/docs/category/tutorials"},"tutorials"),". Alternatively, there are python scripts in ",(0,r.kt)("inlineCode",{parentName:"p"},"scripts/")," that can be used as templates for running your own models and comprehensive documentation on the ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi"},"python API")," and ",(0,r.kt)("a",{parentName:"p",href:"/docs/parameters"},"parameters"),"."),(0,r.kt)("p",null,"However, if you simply want to check whether your new network is working, you can use the ",(0,r.kt)("inlineCode",{parentName:"p"},"scripts/run_uclchem_tests.py")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"scripts/plot_uclchem_tests.py")," scripts. You can find outputs in the ",(0,r.kt)("inlineCode",{parentName:"p"},"examples/")," directory along with an explanation of what this does."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/83622784.40db2821.js b/assets/js/83622784.40db2821.js deleted file mode 100644 index af1e6f87..00000000 --- a/assets/js/83622784.40db2821.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2347],{3905:(a,e,s)=>{s.d(e,{Zo:()=>i,kt:()=>k});var t=s(7294);function n(a,e,s){return e in a?Object.defineProperty(a,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[e]=s,a}function m(a,e){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),s.push.apply(s,t)}return s}function p(a){for(var e=1;e=0||(n[s]=a[s]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(a,s)&&(n[s]=a[s])}return n}var l=t.createContext({}),N=function(a){var e=t.useContext(l),s=e;return a&&(s="function"==typeof a?a(e):p(p({},e),a)),s},i=function(a){var e=N(a.components);return t.createElement(l.Provider,{value:e},a.children)},c={inlineCode:"code",wrapper:function(a){var e=a.children;return t.createElement(t.Fragment,{},e)}},o=t.forwardRef((function(a,e){var s=a.components,n=a.mdxType,m=a.originalType,l=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),o=N(s),k=n,h=o["".concat(l,".").concat(k)]||o[k]||c[k]||m;return s?t.createElement(h,p(p({ref:e},i),{},{components:s})):t.createElement(h,p({ref:e},i))}));function k(a,e){var s=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=s.length,p=new Array(m);p[0]=o;var r={};for(var l in e)hasOwnProperty.call(e,l)&&(r[l]=e[l]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var N=2;N{s.r(e),s.d(e,{assets:()=>i,contentTitle:()=>l,default:()=>k,frontMatter:()=>r,metadata:()=>N,toc:()=>c});var t=s(7462),n=s(3366),m=(s(7294),s(3905)),p=["components"],r={id:"physics-core",title:"Core Physics"},l=void 0,N={unversionedId:"physics-core",id:"version-v3.3.0/physics-core",title:"Core Physics",description:"Each of the other physics doc pages details the specifics of a particular physics model. This one gives a general overview of the physics in UCLCHEM, including the core physics routines that are called for all models.",source:"@site/versioned_docs/version-v3.3.0/physics-core.md",sourceDirName:".",slug:"/physics-core",permalink:"/docs/physics-core",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"physics-core",title:"Core Physics"},sidebar:"docs",previous:{title:"Integration",permalink:"/docs/trouble-integration"},next:{title:"Core Physics",permalink:"/docs/physics-core"}},i={},c=[{value:"Model dimensions",id:"model-dimensions",level:2},{value:"Core Physics Processes",id:"core-physics-processes",level:2},{value:"Freefall",id:"freefall",level:3},{value:"Column density",id:"column-density",level:3}],o={toc:c};function k(a){var e=a.components,s=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,t.Z)({},o,s,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("p",null,"Each of the other physics doc pages details the specifics of a particular physics model. This one gives a general overview of the physics in UCLCHEM, including the core physics routines that are called for all models."),(0,m.kt)("h2",{id:"model-dimensions"},"Model dimensions"),(0,m.kt)("p",null,"Whilst it is most often used to model a single point, UCLCHEM is a 1D model. For most models, you provide the size of some cloud of gas (",(0,m.kt)("inlineCode",{parentName:"p"},"rout"),") and the number of positions along a 1D cut through this cloud you'd like to model (",(0,m.kt)("inlineCode",{parentName:"p"},"points"),"). UCLCHEM then divides the cloud up into the required number of equally sized segments and then models a point at the inner edge of each segment. In the image below, the user has specified that they would like to model six points between some rin and rout. The cloud has been split into six segments and the dots indicate the exact position at which"),(0,m.kt)("img",{src:"/img/cloud_points.png",width:"600","margin-left":"40%"}),(0,m.kt)("p",null,'The reason we have to specify the exact position of the "point" at which UCLCHEM evaluates the abundances is that it affects the column densities. We start our calculation at the edge (hence point 1 is closest to rout) and use the width of a single segment to calculate the column densities of H2, CO, and C as well as the total column density. This affects the photo-chemistry through UV attenuation and self-shielding. However, it is unlikely a user will model enough points to properly follow the UV chemistry in the low A',(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msub"}),(0,m.kt)("mi",{parentName:"msub"},"V"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_V")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.47833099999999995em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," parts of the cloud, especially since the time dependent nature of the code means it could take some time. If a full 1D calculation becomes really important to you, you may wish to consider a more purpose built PDR solver such as ",(0,m.kt)("a",{parentName:"p",href:"https://uclchem.github.io/3dpdr"},"3D-PDR"),"."),(0,m.kt)("p",null,"A a result, we typically use UCLCHEM to model the cloud as a single point. Once we are far enough into the cloud that the A",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msub"}),(0,m.kt)("mi",{parentName:"msub"},"V"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_V")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.47833099999999995em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is very high, the entire cloud tends to become homogenous in 1D models. Effectively, you can model the entire cloud with Av greater than about 5 as a single point and assume those abundances hold for the entire UV shielded region of the cloud. However, our 1D set up is useful for things like hot cores where the temperature and chemistry is really dominated by the central heating source, for which we treat the radial dependence quite well. You can then get a radial view of the chemistry with just a few points."),(0,m.kt)("h2",{id:"core-physics-processes"},"Core Physics Processes"),(0,m.kt)("h3",{id:"freefall"},"Freefall"),(0,m.kt)("p",null,"Many, but not all, models allow you to allow the gas to increase in density as if the gas begins to collapse under freefall from being stationary at the intial density. You turn this on with the ",(0,m.kt)("inlineCode",{parentName:"p"},"freefall")," toggle and the analytical equation for this is"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"mrow"},"d"),(0,m.kt)("mi",{parentName:"mrow"},"n")),(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"mrow"},"d"),(0,m.kt)("mi",{parentName:"mrow"},"t"))),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"b"),(0,m.kt)("mi",{parentName:"msub"},"c")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("msup",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msup"},"n"),(0,m.kt)("mn",{parentName:"msup"},"4")),(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"3"))),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"["),(0,m.kt)("mn",{parentName:"mrow"},"24"),(0,m.kt)("mi",{parentName:"mrow"},"\u03c0"),(0,m.kt)("mi",{parentName:"mrow"},"G"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"m"),(0,m.kt)("mi",{parentName:"msub"},"H")),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0")),(0,m.kt)("mrow",{parentName:"mrow"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"mfrac"},"n"),(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"3"))),(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"]")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"2")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn}{dt} = b_c \\left(\\frac{n^4}{n_0}\\right)^{\\frac{1}{3}}\\left[24\\pi Gm_Hn_0\\left(\\left(\\frac{n}{n_0}\\right)^{\\frac{1}{3}}-1\\right)\\right]^{\\frac{1}{2}}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"3.3878700000000004em",verticalAlign:"-1.25003em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"b"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},"(")),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.491108em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4"))))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},")"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.8350280000000003em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-4.244008000000001em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"})))))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},"[")),(0,m.kt)("span",{parentName:"span",className:"mord"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord"},"4"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"\u03c0"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"G"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},"(")),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},"(")),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.10756em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},")"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.7939200000000002em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-4.2029000000000005em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"})))))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},")"))),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},"]"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"2.1378400000000006em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-4.54682em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"}))))))))))))))),(0,m.kt)("p",null,"this is the rate of change of the number density of H nuclei (that is our density unit) which is passed to the integrator to be intregrated over time along with the abundances. ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"b"),(0,m.kt)("mi",{parentName:"msub"},"c"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"b_c")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.84444em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"b"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is ",(0,m.kt)("inlineCode",{parentName:"p"},"freefallFactor")," in the parameters, a factor used to slow the collapse. ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_0")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the code's ",(0,m.kt)("inlineCode",{parentName:"p"},"initialDens")," parameter. We stop this collapse at ",(0,m.kt)("inlineCode",{parentName:"p"},"finalDens")," even if the model continues."),(0,m.kt)("h3",{id:"column-density"},"Column density"),(0,m.kt)("p",null,"We calculate the column density for a single point model or for the position closest to the cloud edge in 1D models, by dividing the total size of the cloud by the number of points and multiplying by density."),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"N"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"T"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"t"))),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"r"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("mi",{parentName:"mrow"},"l"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"u"),(0,m.kt)("mi",{parentName:"mrow"},"d"))),(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"N"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"p"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"n"),(0,m.kt)("mi",{parentName:"mrow"},"t"),(0,m.kt)("mi",{parentName:"mrow"},"s")))),(0,m.kt)("mi",{parentName:"mrow"},"n"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("mi",{parentName:"mrow"},"r"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_{Tot} = \\frac{r_{cloud}}{N_{points}} n(r)")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.13889em"}},"T"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.079668em",verticalAlign:"-0.972108em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.1075599999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"})))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.02778em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"u"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.972108em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r"),(0,m.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,m.kt)("p",null,"For points further in, we simply do the same calculation but then add the column density of the previous point. If we work in from the edge (point 1) to the centre (point N), then we get the cumulative column density. A similar process is followed for the column densities of CO, H2 and C."),(0,m.kt)("p",null,"We can then calculate the Av,"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("mi",{parentName:"mrow"},"v"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"v"),(0,m.kt)("mn",{parentName:"msub"},"0")),(0,m.kt)("mo",{parentName:"mrow"},"+"),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"N"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"T"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"t"))),(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mn",{parentName:"mrow"},"1.6"),(0,m.kt)("mo",{parentName:"mrow"},"\xd7"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"21")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"2")))))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"Av = Av_0 + \\frac{N_{Tot}}{1.6 \\times 10^{21} cm^{-2}}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"+"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.1296600000000003em",verticalAlign:"-0.7693300000000001em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},"."),(0,m.kt)("span",{parentName:"span",className:"mord"},"6"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"\xd7"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.740108em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.9890000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.740108em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.989em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"))))))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.13889em"}},"T"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.7693300000000001em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,m.kt)("p",null,"where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"v"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"Av_0")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the code's ",(0,m.kt)("inlineCode",{parentName:"p"},"baseAv")," parameter."))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/875220c9.ab0d4fda.js b/assets/js/875220c9.ab0d4fda.js deleted file mode 100644 index 3d79ea3e..00000000 --- a/assets/js/875220c9.ab0d4fda.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1714],{3905:(e,a,t)=>{t.d(a,{Zo:()=>l,kt:()=>k});var s=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,s)}return t}function i(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var o=s.createContext({}),p=function(e){var a=s.useContext(o),t=a;return e&&(t="function"==typeof e?e(a):i(i({},a),e)),t},l=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},c={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},h=s.forwardRef((function(e,a){var t=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,l=m(e,["components","mdxType","originalType","parentName"]),h=p(t),k=n,d=h["".concat(o,".").concat(k)]||h[k]||c[k]||r;return t?s.createElement(d,i(i({ref:a},l),{},{components:t})):s.createElement(d,i({ref:a},l))}));function k(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var r=t.length,i=new Array(r);i[0]=h;var m={};for(var o in a)hasOwnProperty.call(a,o)&&(m[o]=a[o]);m.originalType=e,m.mdxType="string"==typeof e?e:n,i[1]=m;for(var p=2;p{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>o,default:()=>k,frontMatter:()=>m,metadata:()=>p,toc:()=>c});var s=t(7462),n=t(3366),r=(t(7294),t(3905)),i=["components"],m={id:"physics-shocks",title:"Shock Models"},o=void 0,p={unversionedId:"physics-shocks",id:"version-v3.3.0/physics-shocks",title:"Shock Models",description:"Main Contributors: Izaskun Jimenez-Serra, Tom James, Jon Holdship",source:"@site/versioned_docs/version-v3.3.0/physics-shocks.md",sourceDirName:".",slug:"/physics-shocks",permalink:"/docs/physics-shocks",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"physics-shocks",title:"Shock Models"},sidebar:"docs",previous:{title:"Hot Core",permalink:"/docs/physics-hotcore"},next:{title:"Collapse Models",permalink:"/docs/physics-collapse"}},l={},c=[{value:"Shock Profiles",id:"shock-profiles",level:2},{value:"C-Shocks",id:"c-shocks",level:3},{value:"J-shocks",id:"j-shocks",level:3},{value:"Dimensions",id:"dimensions",level:2},{value:"Sputtering",id:"sputtering",level:2}],h={toc:c};function k(e){var a=e.components,t=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},h,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Main Contributors"),": Izaskun Jimenez-Serra, Tom James, Jon Holdship"),(0,r.kt)("h2",{id:"shock-profiles"},"Shock Profiles"),(0,r.kt)("p",null,"UCLCHEM uses two different shock parameterizations. These provide the physical properties of a gas through time as it is subjected to a shock. Whilst the most accurate MHD shock models solve the chemistry, MHD and radiative transfer problems simulataneously, few of these models include chemistry as detailed as UCLCHEM. We assume that the MHD models on which our parameterizations were validated used detailed enough chemistry that the shock profiles could be accurately calculated. This means that more detailed chemistry can be safely post-processed using UCLCHEM, a parameterization simply means the user can select parameters freely rather than from a preset selection of profiles from another code such as ",(0,r.kt)("a",{parentName:"p",href:"http://cdsads.u-strasbg.fr/abs/2015A&A...578A..63F"},"MHDvode"),"."),(0,r.kt)("h3",{id:"c-shocks"},"C-Shocks"),(0,r.kt)("p",null,"The C-shock is based on the parameterization by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". It parameterizes the density, temperature and velocity profiles of c-shocks as a function of shock velocity, initial gas density and magnetic field. These were validated against the results of the detailed shock modelling of ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1046/j.1365-8711.2003.06716.x"},"Flower et al. 2003"),". Details of it's use can be found in ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.cshock"},"the c-shock function docs"),"."),(0,r.kt)("p",null,"A key value in this model is the dissipation length, which is the distance over which the velocity of the ions and the neutrals equalizes. In some sense, this is the extent of the C-shock, although post-shock cooling does continue for some distance after. The C-shock function will return the dissipation time (see ",(0,r.kt)("a",{parentName:"p",href:"/docs/physics-shocks#dimensions"},"below"),") and will also uses shorter timesteps for a number of years equal to twice the dissipation time in order to fully resolve the shock. The number of these time steps is controlled by an optional parameter."),(0,r.kt)("h3",{id:"j-shocks"},"J-shocks"),(0,r.kt)("p",null,"jshock is a similar parameterization for j-shocks from ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201936536"},"James et al.")," validated against more recent results from MHDvode (",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201525740"},"Flower et al. 2015"),"). See the ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.jshock"},"j-shock function docs")," for details."),(0,r.kt)("h2",{id:"dimensions"},"Dimensions"),(0,r.kt)("p",null,"Both shock models are intended to be run as single point models only and the code will return an error for ",(0,r.kt)("inlineCode",{parentName:"p"},"points > 1"),". However, you can look at the 1D profile of a shock by converting between time and distance. If we assume the shock is stationary, that is that it's structure is unchanged as it moves through a cloud of gas, then the points that are far away in time are the same as those far away in space."),(0,r.kt)("img",{src:"/img/shock.png",width:"600","margin-left":"40%"}),(0,r.kt)("p",null,"As an illustration, as a shock front moves through a cloud and first hits a parcel of gas, this is t=0 in our shock model output. 5000 years later, the shock front has moved on, thus the output of UCLCHEM at t=5000 years is the state of a parcel of gas that was first hit 5000 years ago and is now far behind the shock front."),(0,r.kt)("p",null,"By using the shock velocity, you can translate 5000 years to the distance between the parcel that was shocked 5000 years ago and the parcel that is just being reached by the shock front,"),(0,r.kt)("div",{className:"math math-display"},(0,r.kt)("span",{parentName:"div",className:"katex-display"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("mi",{parentName:"mrow"},"z"),(0,r.kt)("mo",{parentName:"mrow"},"="),(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"v"),(0,r.kt)("mi",{parentName:"msub"},"s")),(0,r.kt)("mi",{parentName:"mrow"},"t")),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"z= v_s t")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.04398em"}},"z"),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,r.kt)("span",{parentName:"span",className:"mrel"},"="),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t")))))),(0,r.kt)("p",null,"Thus the history of a single point in a shocked cloud that is output by UCLCHEM can also be translated to a snapshot of a cloud that covers distance z."),(0,r.kt)("h2",{id:"sputtering"},"Sputtering"),(0,r.kt)("p",null,"The C-shock model uses the sputtering process described by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". Briefly, we calculate the average energy imparted on the grains from a collision between the shocked gas and the grains. We then combine this with the collision rate and average yield for a given energy to calculate the sputtering rate which we integrate through time. In practice, this sputtering is so quick that it happens almost instantaneously at ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"t"),(0,r.kt)("mrow",{parentName:"msub"},(0,r.kt)("mi",{parentName:"mrow"},"s"),(0,r.kt)("mi",{parentName:"mrow"},"a"),(0,r.kt)("mi",{parentName:"mrow"},"t")))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"t_{sat}")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.2805559999999999em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),", the saturation time. This is the time at which the silicon abundance stops increasing in more detailed models, used as a proxy for when the ices are fully sputtered. Thus it is likely that you will see a step change in the ice abundances where sputtering has not occurred yet in one time step and is complete in the second unless your timestep is very small."),(0,r.kt)("p",null,"The J-shock would begin with ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"V"),(0,r.kt)("mi",{parentName:"msub"},"s"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"V_s")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"V"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.22222em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"}))))))))))," as the initial drift velocity of the sputtering routine described above and would instantaneously sputter at t = 0 yr. Furthermore, temperatures typically reach a minimum of 1000 K meaning the thermal sublimation is almost complete. Thus, we do not need to worry about the sputtering process in the J-shock, we simply remove all grain material and add it to the gas at t = 0 yr."))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/8880c86b.d9d60a81.js b/assets/js/8880c86b.d9d60a81.js deleted file mode 100644 index 9c9cfc49..00000000 --- a/assets/js/8880c86b.d9d60a81.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8924],{3905:(e,t,o)=>{o.d(t,{Zo:()=>d,kt:()=>h});var n=o(7294);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function a(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var l=n.createContext({}),c=function(e){var t=n.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):a(a({},t),e)),o},d=function(e){var t=c(e.components);return n.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},u=n.forwardRef((function(e,t){var o=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),u=c(o),h=r,m=u["".concat(l,".").concat(h)]||u[h]||p[h]||i;return o?n.createElement(m,a(a({ref:t},d),{},{components:o})):n.createElement(m,a({ref:t},d))}));function h(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=o.length,a=new Array(i);a[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:r,a[1]=s;for(var c=2;c{o.r(t),o.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var n=o(7462),r=o(3366),i=(o(7294),o(3905)),a=["components"],s={id:"physics-cloud",title:"Cloud Model",author:"Jon Holdship"},l=void 0,c={unversionedId:"physics-cloud",id:"version-v3.3.0/physics-cloud",title:"Cloud Model",description:"Main Contributors: Serena Viti, Jon Holdship",source:"@site/versioned_docs/version-v3.3.0/physics-cloud.md",sourceDirName:".",slug:"/physics-cloud",permalink:"/docs/physics-cloud",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"physics-cloud",title:"Cloud Model",author:"Jon Holdship"},sidebar:"docs",previous:{title:"Core Physics",permalink:"/docs/physics-core"},next:{title:"Hot Core",permalink:"/docs/physics-hotcore"}},d={},p=[],u={toc:p};function h(e){var t=e.components,o=(0,r.Z)(e,a);return(0,i.kt)("wrapper",(0,n.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Main Contributors"),": Serena Viti, Jon Holdship"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Source"),": src/fortran_src/cloud.f90"),(0,i.kt)("p",null,"The cloud model is our simplest physical model and is intended to model spherical clouds of gas with constant physical conditions. The exception to this is the density which can be modified using the ",(0,i.kt)("inlineCode",{parentName:"p"},"freefall")," parameter. "),(0,i.kt)("p",null,"Cloud is a 1D model that models positions through the cloud that are evenly spaced between some inner radius ",(0,i.kt)("inlineCode",{parentName:"p"},"rin")," and the outer radius ",(0,i.kt)("inlineCode",{parentName:"p"},"rout"),". The number of positions is set by the ",(0,i.kt)("inlineCode",{parentName:"p"},"points")," parameter and each position is treated almost independently with no transfer of material between them. The one interaction they have is that positions closer to the edge of the cloud (rout) are used to calculate column densities for the positions further into the cloud. Since UCLCHEM treats self-shielding of H2, C and CO, it does a fair job of properly modelling UV processes in a 1D cloud."),(0,i.kt)("p",null,"However, we caution UCLCHEM's cloud is not a PDR model. It does not consider heating and cooling and uses a fixed temperature for all positions. Moreover, it is unlikely one will model enough positions in the low Av parts of the cloud to properly capture the self-shielding. Therefore, we recommend using ",(0,i.kt)("a",{parentName:"p",href:"https://uclchem.github.io/3dpdr"},"3D-PDR")," for your PDR modelling needs."),(0,i.kt)("p",null,"Cloud is more suitable for studing the UV shielded parts of molecular clouds. If we assume the only depth dependent effect on the chemistry in these clouds is the UV radiation, it becomes reasonable to assume the UV shielded parts of the cloud are homogeneous and can be modelled with a single point code. Thus, most users will use cloud with ",(0,i.kt)("inlineCode",{parentName:"p"},"points=1")," and some combination of ",(0,i.kt)("inlineCode",{parentName:"p"},"rout"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"baseAv"),", and density that produce a large Av."),(0,i.kt)("img",{src:"/img/dark_cloud.png",width:"600","margin-left":"40%"}),(0,i.kt)("p",null,"The other major use of cloud is to model a simple cloud of gas in order to calculate reasonable starting abundances for another model. We may wish to run a hot core or shock model for some investigation and require reasonable initial conditions for the gas. We do this by starting a cloud model with a low density gas of atoms and ions with no molecules or ices. We then allow it to collapse using the ",(0,i.kt)("inlineCode",{parentName:"p"},"freefall")," parameter to reach the density of the gas in our science model. Whatever abundances are reached are then used as the starting abundances in the science model."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9341d4f2.9ddc9faa.js b/assets/js/9341d4f2.9ddc9faa.js new file mode 100644 index 00000000..29077341 --- /dev/null +++ b/assets/js/9341d4f2.9ddc9faa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8896],{3905:(a,e,t)=>{t.d(e,{Zo:()=>o,kt:()=>h});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var i=s.createContext({}),l=function(a){var e=s.useContext(i),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},o=function(a){var e=l(a.components);return s.createElement(i.Provider,{value:e},a.children)},c={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},N=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,i=a.parentName,o=r(a,["components","mdxType","originalType","parentName"]),N=l(t),h=n,k=N["".concat(i,".").concat(h)]||N[h]||c[h]||m;return t?s.createElement(k,p(p({ref:e},o),{},{components:t})):s.createElement(k,p({ref:e},o))}));function h(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=N;var r={};for(var i in e)hasOwnProperty.call(e,i)&&(r[i]=e[i]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={id:"physics-hotcore",title:"Hot Core",author:"Jon Holdship"},i=void 0,l={unversionedId:"physics-hotcore",id:"version-v3.3.1/physics-hotcore",title:"Hot Core",description:"Main Contributors: Serena Viti, Jon Holdship",source:"@site/versioned_docs/version-v3.3.1/physics-hotcore.md",sourceDirName:".",slug:"/physics-hotcore",permalink:"/docs/physics-hotcore",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"physics-hotcore",title:"Hot Core",author:"Jon Holdship"},sidebar:"docs",previous:{title:"Cloud Model",permalink:"/docs/physics-cloud"},next:{title:"Shock Models",permalink:"/docs/physics-shocks"}},o={},c=[],N={toc:c};function h(a){var e=a.components,t=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},N,t,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("p",null,(0,m.kt)("strong",{parentName:"p"},"Main Contributors"),": Serena Viti, Jon Holdship"),(0,m.kt)("p",null,(0,m.kt)("strong",{parentName:"p"},"Source"),": src/fortran_src/hotcore.f90"),(0,m.kt)("p",null,"The hot core model can be used to model the envelopes around hot cores as a single point or a 1D line of gas parels. The temperature in this model increases following the temperature profiles given in ",(0,m.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1111/j.1365-2966.2004.08273.x"},"Viti et al. 2004")," with modifications by ",(0,m.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1111/j.1365-2966.2010.17077.x"},"Awad et al. 2010"),". These are time and radially dependent temperature profiles intended to match the heat up of the gas around a hot core."),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"T"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mn",{parentName:"mrow"},"10"),(0,m.kt)("mo",{parentName:"mrow"},"+"),(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"t"),(0,m.kt)("mi",{parentName:"msup"},"B")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"mfrac"},"r"),(0,m.kt)("mi",{parentName:"mfrac"},"R")),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"2"))),(0,m.kt)("mi",{parentName:"mrow"},"K")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"T = 10 + A t^B \\left(\\frac{r}{R}\\right)^{\\frac{1}{2}} K")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.72777em",verticalAlign:"-0.08333em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"+"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.17992em",verticalAlign:"-0.686em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8913309999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.113em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05017em"}},"B")))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size2"},"(")),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.10756em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.00773em"}},"R"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size2"},")"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.49392em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.9029em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"})))))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K")))))),(0,m.kt)("p",null,"Where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"r")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"r")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r")))))," is the distance from the centre of the core to the current point, ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"R")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"R")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.00773em"}},"R")))))," is the radius of the core (",(0,m.kt)("inlineCode",{parentName:"p"},"rout"),") and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"A")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"A")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A")))))," and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"B")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"B")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05017em"}},"B")))))," are empirically derived constants. These constants have been determined for specific protostellar masses and the user can choose from 1, 5, 10, 15, 25, and 60 solar masses using the ",(0,m.kt)("inlineCode",{parentName:"p"},"tempIndx")," variable when calling ",(0,m.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.hot_core"},"uclchem.model.hot_core")),(0,m.kt)("p",null,"A key aspect of hot cores is the sublimation of ices as the gas heats. TPD experiments have shown that this happens in multiple desorptions events per species rather than a single desorption once the temperature is enough to overcome the binding energy of a given species. In three phase models, this is achieved by the fact the binding energy of species in the bulk is assumed to be equal to the water binding energy, meaning a species will usually desorb from the surface earlier than from the bulk. In two phase networks, the hot core model uses the fixed desorption events of ",(0,m.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1111/j.1365-2966.2004.08273.x"},"Viti et al. 2004")," to mimic this."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9516cbb3.60b8f789.js b/assets/js/9516cbb3.60b8f789.js deleted file mode 100644 index 86679c15..00000000 --- a/assets/js/9516cbb3.60b8f789.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1278],{3905:(a,e,t)=>{t.d(e,{Zo:()=>i,kt:()=>o});var s=t(7294);function m(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function n(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(m[t]=a[t]);return m}(a,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(m[t]=a[t])}return m}var N=s.createContext({}),l=function(a){var e=s.useContext(N),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},i=function(a){var e=l(a.components);return s.createElement(N.Provider,{value:e},a.children)},k={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,m=a.mdxType,n=a.originalType,N=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),c=l(t),o=m,h=c["".concat(N,".").concat(o)]||c[o]||k[o]||n;return t?s.createElement(h,p(p({ref:e},i),{},{components:t})):s.createElement(h,p({ref:e},i))}));function o(a,e){var t=arguments,m=e&&e.mdxType;if("string"==typeof a||m){var n=t.length,p=new Array(n);p[0]=c;var r={};for(var N in e)hasOwnProperty.call(e,N)&&(r[N]=e[N]);r.originalType=a,r.mdxType="string"==typeof a?a:m,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>i,contentTitle:()=>N,default:()=>o,frontMatter:()=>r,metadata:()=>l,toc:()=>k});var s=t(7462),m=t(3366),n=(t(7294),t(3905)),p=["components"],r={id:"gas",title:"Gas Phase Reactions"},N=void 0,l={unversionedId:"gas",id:"version-v3.3.0/gas",title:"Gas Phase Reactions",description:"Gas phase ODEs",source:"@site/versioned_docs/version-v3.3.0/chem-gas.md",sourceDirName:".",slug:"/gas",permalink:"/docs/gas",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"gas",title:"Gas Phase Reactions"},sidebar:"docs",previous:{title:"Notation",permalink:"/docs/notation"},next:{title:"Grain Surface Reactions",permalink:"/docs/grain"}},i={},k=[{value:"Gas phase ODEs",id:"gas-phase-odes",level:2},{value:"Reaction Rates",id:"reaction-rates",level:2}],c={toc:k};function o(a){var e=a.components,t=(0,m.Z)(a,p);return(0,n.kt)("wrapper",(0,s.Z)({},c,t,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"gas-phase-odes"},"Gas phase ODEs"),(0,n.kt)("p",null,"The rate of change of the concentration of a gas phase species due to a single two body reaction is"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mi",{parentName:"mrow"},"k"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"k"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_i}{dt} = k_{jk} n_j n_k")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mi",{parentName:"mrow"},"k")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{jk}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the rate of that reaction in units of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msup"},"m"),(0,n.kt)("mn",{parentName:"msup"},"3")),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msup"},"s"),(0,n.kt)("mrow",{parentName:"msup"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mn",{parentName:"mrow"},"1")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"cm^{3} s^{-1}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))),". Since we work in fractional abundances rather than concentrations, we can remove factors of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," since ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_j=X_jn_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.716668em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mi",{parentName:"mrow"},"k"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"k")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_i}{dt} = k_{jk} X_j X_k n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("p",null,"For reactions between involving only a single body such as ionization by a cosmic ray, we have"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mi",{parentName:"msub"},"i")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_i}{dt} = k_{i} X_i")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.84444em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("p",null,"The total rate of change of the fractional abundance of a species due to gas phase reactions is then just the sum of these terms for all reactions where it is a product minus the sum of all reactions where it is a reactant."),(0,n.kt)("p",null,"As a rule, any part of a reaction ODE which does not depend on abundance (eg the rate itself) is calculated between timesteps by the subroutine ",(0,n.kt)("inlineCode",{parentName:"p"},"calculateReactionRates")," in ",(0,n.kt)("inlineCode",{parentName:"p"},"rates.f90"),". The abundances are include in the ODE calculation itself so they can be updated between steps by the solver."),(0,n.kt)("h2",{id:"reaction-rates"},"Reaction Rates"),(0,n.kt)("p",null,"Gas phase chemistry in UCLCHEM uses the UMIST12 database. This is a database listing reactants and products with up to three rate constants which we label ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"\u03b2"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"n"),(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"\u03b3")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\alpha, \\beta, and \\gamma")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8888799999999999em",verticalAlign:"-0.19444em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mpunct"},","),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05278em"}},"\u03b2"),(0,n.kt)("span",{parentName:"span",className:"mpunct"},","),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05556em"}},"\u03b3")))))," for thousands of gas phase reactions. We briefly list here the way in which the rates in the above equations are calculated for each reaction type and more information can be found in ",(0,n.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2013A&A...550A..36M/abstract"},"McElroy et al. 2013")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Two Body Reactions")," use the Kooji-Arrhenius equation."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"mfrac"},"T"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mn",{parentName:"mrow"},"300"),(0,n.kt)("mi",{parentName:"mrow"},"K"))),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mo",{parentName:"msup",stretchy:"false"},")"),(0,n.kt)("mi",{parentName:"msup"},"\u03b2")),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"x"),(0,n.kt)("mi",{parentName:"mrow"},"p"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"\u03b3"),(0,n.kt)("mi",{parentName:"mrow",mathvariant:"normal"},"/"),(0,n.kt)("mi",{parentName:"mrow"},"T"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha (\\frac{T}{300K})^\\beta exp(-\\gamma/T)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.04633em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"3"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8991079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.1130000000000004em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05278em"}},"\u03b2")))))))),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"x"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"p"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05556em"}},"\u03b3"),(0,n.kt)("span",{parentName:"span",className:"mord"},"/"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Cosmic Ray Protons")),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mi",{parentName:"mrow"},"\u03b6")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha \\zeta")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8888799999999999em",verticalAlign:"-0.19444em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07378em"}},"\u03b6")))))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Cosmic Ray induced photons")),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"mfrac"},"T"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mn",{parentName:"mrow"},"300"),(0,n.kt)("mi",{parentName:"mrow"},"K"))),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mo",{parentName:"msup",stretchy:"false"},")"),(0,n.kt)("mi",{parentName:"msup"},"\u03b2")),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"mfrac"},"E"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mn",{parentName:"mrow"},"1"),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"\u03c9"))),(0,n.kt)("mi",{parentName:"mrow"},"\u03b6")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha (\\frac{T}{300K})^\\beta \\frac{E}{1-\\omega} \\zeta")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.1296600000000003em",verticalAlign:"-0.7693300000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"3"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8991079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.1130000000000004em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05278em"}},"\u03b2")))))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"1"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,n.kt)("span",{parentName:"span",className:"mbin"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"\u03c9"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.7693300000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07378em"}},"\u03b6")))))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"UV Photons")),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"F"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"U"),(0,n.kt)("mi",{parentName:"mrow"},"V"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"A"),(0,n.kt)("mi",{parentName:"msub"},"v")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha F_{UV}\\exp(-kA_v)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"F"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.13889em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10903em"}},"U"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"v")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"\u03b6")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\zeta")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8888799999999999em",verticalAlign:"-0.19444em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07378em"}},"\u03b6")))))," is the cosmic ray ionization rate in units of 1.3 10",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"msup"}),(0,n.kt)("mo",{parentName:"msup"},"\u2212")),(0,n.kt)("mn",{parentName:"mrow"},"17")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^-17")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span"}),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mbin mtight"},"\u2212")))))))),(0,n.kt)("span",{parentName:"span",className:"mord"},"1"),(0,n.kt)("span",{parentName:"span",className:"mord"},"7")))))," s",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"msup"}),(0,n.kt)("mrow",{parentName:"msup"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mn",{parentName:"mrow"},"1")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-1}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span"}),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))),", E is the efficiency with which cosmic rays cause ionization, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"\u03c9")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\omega")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"\u03c9")))))," is the dust grain albedo, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"F"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"U"),(0,n.kt)("mi",{parentName:"mrow"},"V"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"A"),(0,n.kt)("mi",{parentName:"msub"},"v")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"F_{UV} \\exp(-kA_v)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"F"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.13889em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10903em"}},"U"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"v")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))," is the attenuated UV field."))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/95d19e51.21857b8e.js b/assets/js/95d19e51.21857b8e.js new file mode 100644 index 00000000..7c77bda6 --- /dev/null +++ b/assets/js/95d19e51.21857b8e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8405],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>u});var n=a(7294);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var o=n.createContext({}),p=function(e){var t=n.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},c=function(e){var t=p(e.components);return n.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var a=e.components,l=e.mdxType,i=e.originalType,o=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),k=p(a),u=l,d=k["".concat(o,".").concat(u)]||k[u]||m[u]||i;return a?n.createElement(d,r(r({ref:t},c),{},{components:a})):n.createElement(d,r({ref:t},c))}));function u(e,t){var a=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var i=a.length,r=new Array(i);r[0]=k;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s.mdxType="string"==typeof e?e:l,r[1]=s;for(var p=2;p{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>p,toc:()=>m});var n=a(7462),l=a(3366),i=(a(7294),a(3905)),r=["components"],s={id:"pythonapi",title:"Python Reference"},o="Python API",p={unversionedId:"pythonapi",id:"version-v3.3.1/pythonapi",title:"Python Reference",description:"* uclchem",source:"@site/versioned_docs/version-v3.3.1/start-pythonapi.md",sourceDirName:".",slug:"/pythonapi",permalink:"/docs/pythonapi",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"pythonapi",title:"Python Reference"},sidebar:"docs",previous:{title:"Model Parameters",permalink:"/docs/parameters"},next:{title:"Tutorials",permalink:"/docs/category/tutorials"}},c={},m=[{value:"read_output_file",id:"read_output_file",level:4},{value:"create_abundance_plot",id:"create_abundance_plot",level:4},{value:"plot_species",id:"plot_species",level:4},{value:"analysis",id:"analysis",level:4},{value:"total_element_abundance",id:"total_element_abundance",level:4},{value:"check_element_conservation",id:"check_element_conservation",level:4},{value:"cloud",id:"cloud",level:4},{value:"collapse",id:"collapse",level:4},{value:"hot_core",id:"hot_core",level:4},{value:"cshock",id:"cshock",level:4},{value:"jshock",id:"jshock",level:4},{value:"cshock_dissipation_time",id:"cshock_dissipation_time",level:4},{value:"check_error",id:"check_error",level:4},{value:"get_species_table",id:"get_species_table",level:4},{value:"get_reaction_table",id:"get_reaction_table",level:4},{value:"test_ode_conservation",id:"test_ode_conservation",level:4},{value:"is_number",id:"is_number",level:4},{value:"Species Objects",id:"species-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"get_name",id:"get_name",level:4},{value:"get_mass",id:"get_mass",level:4},{value:"set_desorb_products",id:"set_desorb_products",level:4},{value:"get_desorb_products",id:"get_desorb_products",level:4},{value:"set_freeze_products",id:"set_freeze_products",level:4},{value:"get_freeze_products",id:"get_freeze_products",level:4},{value:"get_freeze_products_list",id:"get_freeze_products_list",level:4},{value:"get_freeze_alpha",id:"get_freeze_alpha",level:4},{value:"is_grain_species",id:"is_grain_species",level:4},{value:"is_surface_species",id:"is_surface_species",level:4},{value:"is_bulk_species",id:"is_bulk_species",level:4},{value:"is_ion",id:"is_ion",level:4},{value:"add_default_freeze",id:"add_default_freeze",level:4},{value:"find_constituents",id:"find_constituents",level:4},{value:"get_n_atoms",id:"get_n_atoms",level:4},{value:"set_n_atoms",id:"set_n_atoms",level:4},{value:"__eq__",id:"__eq__",level:4},{value:"__lt__",id:"__lt__",level:4},{value:"__gt__",id:"__gt__",level:4},{value:"run_makerates",id:"run_makerates",level:4},{value:"get_network",id:"get_network",level:4},{value:"Network Objects",id:"network-objects",level:2},{value:"__init__",id:"__init__-1",level:4},{value:"find_similar_reactions",id:"find_similar_reactions",level:4},{value:"remove_reaction_by_index",id:"remove_reaction_by_index",level:4},{value:"remove_reaction",id:"remove_reaction",level:4},{value:"get_reaction",id:"get_reaction",level:4},{value:"set_reaction",id:"set_reaction",level:4},{value:"get_reaction_dict",id:"get_reaction_dict",level:4},{value:"set_reaction_dict",id:"set_reaction_dict",level:4},{value:"get_reaction_list",id:"get_reaction_list",level:4},{value:"sort_reactions",id:"sort_reactions",level:4},{value:"add_species",id:"add_species",level:4},{value:"remove_species",id:"remove_species",level:4},{value:"get_species_list",id:"get_species_list",level:4},{value:"get_species_dict",id:"get_species_dict",level:4},{value:"get_specie",id:"get_specie",level:4},{value:"set_specie",id:"set_specie",level:4},{value:"set_species_dict",id:"set_species_dict",level:4},{value:"sort_species",id:"sort_species",level:4},{value:"check_network",id:"check_network",level:4},{value:"check_and_filter_species",id:"check_and_filter_species",level:4},{value:"add_bulk_species",id:"add_bulk_species",level:4},{value:"check_freeze_and_desorbs",id:"check_freeze_and_desorbs",level:4},{value:"add_freeze_reactions",id:"add_freeze_reactions",level:4},{value:"add_desorb_reactions",id:"add_desorb_reactions",level:4},{value:"add_chemdes_reactions",id:"add_chemdes_reactions",level:4},{value:"check_for_excited_species",id:"check_for_excited_species",level:4},{value:"add_excited_surface_reactions",id:"add_excited_surface_reactions",level:4},{value:"add_bulk_reactions",id:"add_bulk_reactions",level:4},{value:"freeze_checks",id:"freeze_checks",level:4},{value:"duplicate_checks",id:"duplicate_checks",level:4},{value:"index_important_reactions",id:"index_important_reactions",level:4},{value:"index_important_species",id:"index_important_species",level:4},{value:"LoadedNetwork Objects",id:"loadednetwork-objects",level:2},{value:"__init__",id:"__init__-2",level:4},{value:"read_species_file",id:"read_species_file",level:4},{value:"read_reaction_file",id:"read_reaction_file",level:4},{value:"check_reaction",id:"check_reaction",level:4},{value:"kida_parser",id:"kida_parser",level:4},{value:"output_drops",id:"output_drops",level:4},{value:"write_outputs",id:"write_outputs",level:4},{value:"write_species",id:"write_species",level:4},{value:"write_reactions",id:"write_reactions",level:4},{value:"write_odes_f90",id:"write_odes_f90",level:4},{value:"write_jacobian",id:"write_jacobian",level:4},{value:"build_ode_string",id:"build_ode_string",level:4},{value:"species_ode_string",id:"species_ode_string",level:4},{value:"write_evap_lists",id:"write_evap_lists",level:4},{value:"truncate_line",id:"truncate_line",level:4},{value:"write_network_file",id:"write_network_file",level:4},{value:"find_reactant",id:"find_reactant",level:4},{value:"get_desorption_freeze_partners",id:"get_desorption_freeze_partners",level:4},{value:"array_to_string",id:"array_to_string",level:4},{value:"Reaction Objects",id:"reaction-objects",level:2},{value:"get_reactants",id:"get_reactants",level:4},{value:"get_sorted_reactants",id:"get_sorted_reactants",level:4},{value:"set_reactants",id:"set_reactants",level:4},{value:"get_products",id:"get_products",level:4},{value:"get_sorted_products",id:"get_sorted_products",level:4},{value:"set_products",id:"set_products",level:4},{value:"get_alpha",id:"get_alpha",level:4},{value:"set_alpha",id:"set_alpha",level:4},{value:"get_beta",id:"get_beta",level:4},{value:"set_beta",id:"set_beta",level:4},{value:"set_gamma",id:"set_gamma",level:4},{value:"get_gamma",id:"get_gamma",level:4},{value:"set_templow",id:"set_templow",level:4},{value:"get_templow",id:"get_templow",level:4},{value:"set_temphigh",id:"set_temphigh",level:4},{value:"get_temphigh",id:"get_temphigh",level:4},{value:"NANCheck",id:"nancheck",level:4},{value:"get_reaction_type",id:"get_reaction_type",level:4},{value:"convert_to_bulk",id:"convert_to_bulk",level:4},{value:"__eq__",id:"__eq__-1",level:4},{value:"check_temperature_collision",id:"check_temperature_collision",level:4},{value:"changes_surface_count",id:"changes_surface_count",level:4},{value:"changes_total_mantle",id:"changes_total_mantle",level:4},{value:"generate_ode_bit",id:"generate_ode_bit",level:4}],k={toc:m};function u(e){var t=e.components,a=(0,l.Z)(e,r);return(0,i.kt)("wrapper",(0,n.Z)({},k,a,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("h1",{id:"python-api"},"Python API"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem"},"uclchem"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.analysis"},"uclchem.analysis")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.read_output_file"},"read","_","output","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.create_abundance_plot"},"create","_","abundance","_","plot")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.plot_species"},"plot","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.analysis"},"analysis")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.total_element_abundance"},"total","_","element","_","abundance")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.analysis.check_element_conservation"},"check","_","element","_","conservation")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.model"},"uclchem.model")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.cloud"},"cloud")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.collapse"},"collapse")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.hot_core"},"hot","_","core")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.cshock"},"cshock")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.model.jshock"},"jshock")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.utils"},"uclchem.utils")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.cshock_dissipation_time"},"cshock","_","dissipation","_","time")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.check_error"},"check","_","error")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.get_species_table"},"get","_","species","_","table")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.utils.get_reaction_table"},"get","_","reaction","_","table")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.tests"},"uclchem.tests")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.tests.test_ode_conservation"},"test","_","ode","_","conservation")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.species"},"uclchem.makerates.species")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.is_number"},"is","_","number")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species"},"Species"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__init__"},"_","_","init","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_name"},"get","_","name")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_mass"},"get","_","mass")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.set_desorb_products"},"set","_","desorb","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_desorb_products"},"get","_","desorb","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.set_freeze_products"},"set","_","freeze","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_freeze_products"},"get","_","freeze","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_freeze_products_list"},"get","_","freeze","_","products","_","list")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_freeze_alpha"},"get","_","freeze","_","alpha")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_grain_species"},"is","_","grain","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_surface_species"},"is","_","surface","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_bulk_species"},"is","_","bulk","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.is_ion"},"is","_","ion")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.add_default_freeze"},"add","_","default","_","freeze")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.find_constituents"},"find","_","constituents")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.get_n_atoms"},"get","_","n","_","atoms")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.set_n_atoms"},"set","_","n","_","atoms")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__eq__"},"_","_","eq","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__lt__"},"_","_","lt","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.species.Species.__gt__"},"_","_","gt","_","_")))))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates"},"uclchem.makerates"))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.makerates"},"uclchem.makerates.makerates")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.makerates.run_makerates"},"run","_","makerates")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.makerates.get_network"},"get","_","network")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.network"},"uclchem.makerates.network")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network"},"Network"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.__init__"},"_","_","init","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.find_similar_reactions"},"find","_","similar","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.remove_reaction_by_index"},"remove","_","reaction","_","by","_","index")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.remove_reaction"},"remove","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_reaction"},"get","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_reaction"},"set","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_reaction_dict"},"get","_","reaction","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_reaction_dict"},"set","_","reaction","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_reaction_list"},"get","_","reaction","_","list")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.sort_reactions"},"sort","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_species"},"add","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.remove_species"},"remove","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_species_list"},"get","_","species","_","list")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_species_dict"},"get","_","species","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.get_specie"},"get","_","specie")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_specie"},"set","_","specie")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.set_species_dict"},"set","_","species","_","dict")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.sort_species"},"sort","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_network"},"check","_","network")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_and_filter_species"},"check","_","and","_","filter","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_bulk_species"},"add","_","bulk","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_freeze_and_desorbs"},"check","_","freeze","_","and","_","desorbs")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_freeze_reactions"},"add","_","freeze","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_desorb_reactions"},"add","_","desorb","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_chemdes_reactions"},"add","_","chemdes","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.check_for_excited_species"},"check","_","for","_","excited","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_excited_surface_reactions"},"add","_","excited","_","surface","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.add_bulk_reactions"},"add","_","bulk","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.freeze_checks"},"freeze","_","checks")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.duplicate_checks"},"duplicate","_","checks")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.index_important_reactions"},"index","_","important","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.Network.index_important_species"},"index","_","important","_","species")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.LoadedNetwork"},"LoadedNetwork"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.network.LoadedNetwork.__init__"},"_","_","init","_","_")))))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.io_functions"},"uclchem.makerates.io","_","functions")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.read_species_file"},"read","_","species","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.read_reaction_file"},"read","_","reaction","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.check_reaction"},"check","_","reaction")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.kida_parser"},"kida","_","parser")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.output_drops"},"output","_","drops")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_outputs"},"write","_","outputs")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_species"},"write","_","species")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_reactions"},"write","_","reactions")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_odes_f90"},"write","_","odes","_","f90")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_jacobian"},"write","_","jacobian")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.build_ode_string"},"build","_","ode","_","string")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.species_ode_string"},"species","_","ode","_","string")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_evap_lists"},"write","_","evap","_","lists")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.truncate_line"},"truncate","_","line")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.write_network_file"},"write","_","network","_","file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.find_reactant"},"find","_","reactant")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.get_desorption_freeze_partners"},"get","_","desorption","_","freeze","_","partners")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.io_functions.array_to_string"},"array","_","to","_","string")))),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("a",{parentName:"p",href:"#uclchem.makerates.reaction"},"uclchem.makerates.reaction")),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction"},"Reaction"),(0,i.kt)("ul",{parentName:"li"},(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_reactants"},"get","_","reactants")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_sorted_reactants"},"get","_","sorted","_","reactants")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_reactants"},"set","_","reactants")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_products"},"get","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_sorted_products"},"get","_","sorted","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_products"},"set","_","products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_alpha"},"get","_","alpha")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_alpha"},"set","_","alpha")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_beta"},"get","_","beta")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_beta"},"set","_","beta")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_gamma"},"set","_","gamma")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_gamma"},"get","_","gamma")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_templow"},"set","_","templow")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_templow"},"get","_","templow")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.set_temphigh"},"set","_","temphigh")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_temphigh"},"get","_","temphigh")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.NANCheck"},"NANCheck")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.get_reaction_type"},"get","_","reaction","_","type")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.convert_to_bulk"},"convert","_","to","_","bulk")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.__eq__"},"_","_","eq","_","_")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.check_temperature_collision"},"check","_","temperature","_","collision")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.changes_surface_count"},"changes","_","surface","_","count")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.changes_total_mantle"},"changes","_","total","_","mantle")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("a",{parentName:"li",href:"#uclchem.makerates.reaction.Reaction.generate_ode_bit"},"generate","_","ode","_","bit"))))))),(0,i.kt)("a",{id:"uclchem"}),(0,i.kt)("h1",{id:"uclchem"},"uclchem"),(0,i.kt)("p",null,"The UCLCHEM python module is divided into three parts.\n",(0,i.kt)("inlineCode",{parentName:"p"},"model")," contains the functions for running chemical models under different physics.\n",(0,i.kt)("inlineCode",{parentName:"p"},"analysis")," contains functions for reading and plotting output files as well as investigating the chemistry.\n",(0,i.kt)("inlineCode",{parentName:"p"},"tests")," contains functions for testing the code."),(0,i.kt)("a",{id:"uclchem.analysis"}),(0,i.kt)("h1",{id:"uclchemanalysis"},"uclchem.analysis"),(0,i.kt)("a",{id:"uclchem.analysis.read_output_file"}),(0,i.kt)("h4",{id:"read_output_file"},"read","_","output","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def read_output_file(output_file)\n")),(0,i.kt)("p",null,"Read the output of a UCLCHEM run created with the outputFile parameter into a pandas DataFrame"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_file")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to file containing a full UCLCHEM output")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.DataFrame")," - A dataframe containing the abundances and physical parameters of the model at every time step.")),(0,i.kt)("a",{id:"uclchem.analysis.create_abundance_plot"}),(0,i.kt)("h4",{id:"create_abundance_plot"},"create","_","abundance","_","plot"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def create_abundance_plot(df, species, figsize=(16, 9), plot_file=None)\n")),(0,i.kt)("p",null,"Create a plot of the abundance of a list of species through time."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pd.DataFrame")," - Pandas dataframe containing the UCLCHEM output, see ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"list")," - list of strings containing species names. Using a $ instead of # or @ will plot the sum of surface and bulk abundances."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"figsize")," ",(0,i.kt)("em",{parentName:"li"},"tuple, optional")," - Size of figure, width by height in inches. Defaults to (16, 9)."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"plot_file")," ",(0,i.kt)("em",{parentName:"li"},"str, optional")," - Path to file where figure will be saved. If None, figure is not saved. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fig,ax")," - matplotlib figure and axis objects")),(0,i.kt)("a",{id:"uclchem.analysis.plot_species"}),(0,i.kt)("h4",{id:"plot_species"},"plot","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def plot_species(ax, df, species, **plot_kwargs)\n")),(0,i.kt)("p",null,"Plot the abundance of a list of species through time directly onto an axis."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ax")," ",(0,i.kt)("em",{parentName:"li"},"pyplot.axis")," - An axis object to plot on"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pd.DataFrame")," - A dataframe created by ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"str"),' - A list of species names to be plotted. If species name starts with "$" instead of # or @, plots the sum of surface and bulk abundances')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pyplot.axis")," - Modified input axis is returned")),(0,i.kt)("a",{id:"uclchem.analysis.analysis"}),(0,i.kt)("h4",{id:"analysis"},"analysis"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def analysis(species_name, result_file, output_file, rate_threshold=0.99)\n")),(0,i.kt)("p",null,"A function which loops over every time step in an output file and finds the rate of change of a species at that time due to each of the reactions it is involved in.\nFrom this, the most important reactions are identified and printed to file. This can be used to understand the chemical reason behind a species' behaviour."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Name of species to be analysed"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"result_file")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The path to the file containing the UCLCHEM output"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_file")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The path to the file where the analysis output will be written"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"rate_threshold")," ",(0,i.kt)("em",{parentName:"li"},"float,optional")," - Analysis output will contain the only the most efficient reactions that are responsible for rate_threshold of the total production and destruction rate. Defaults to 0.99.")),(0,i.kt)("a",{id:"uclchem.analysis.total_element_abundance"}),(0,i.kt)("h4",{id:"total_element_abundance"},"total","_","element","_","abundance"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def total_element_abundance(element, df)\n")),(0,i.kt)("p",null,"Calculates that the total elemental abundance of a species as a function of time. Allows you to check conservation."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"element")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Name of element"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pandas.DataFrame")," - DataFrame from ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file()"))),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.Series")," - Total abundance of element for all time steps in df.")),(0,i.kt)("a",{id:"uclchem.analysis.check_element_conservation"}),(0,i.kt)("h4",{id:"check_element_conservation"},"check","_","element","_","conservation"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def check_element_conservation(df,\n element_list=["H", "N", "C", "O"],\n percent=True)\n')),(0,i.kt)("p",null,"Check the conservation of major element by comparing total abundance at start and end of model"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"df")," ",(0,i.kt)("em",{parentName:"li"},"pandas.DataFrame")," - UCLCHEM output in format from ",(0,i.kt)("inlineCode",{parentName:"li"},"read_output_file")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"element_list")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - List of elements to check. Defaults to ",'["H", "N", "C", "O"]',".")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"dict")," - Dictionary containing the change in the total abundance of each element as a fraction of initial value")),(0,i.kt)("a",{id:"uclchem.model"}),(0,i.kt)("h1",{id:"uclchemmodel"},"uclchem.model"),(0,i.kt)("a",{id:"uclchem.model.cloud"}),(0,i.kt)("h4",{id:"cloud"},"cloud"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def cloud(param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run cloud model from UCLCHEM"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species")," parametere is provided, the remaining elements of this list will be the final abundances of the species in out_species."),(0,i.kt)("a",{id:"uclchem.model.collapse"}),(0,i.kt)("h4",{id:"collapse"},"collapse"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def collapse(collapse, physics_output, param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run collapse model from UCLCHEM based on Priestley et al 2018 AJ 156 51 (",(0,i.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2018AJ....156...51P/abstract"},"https://ui.adsabs.harvard.edu/abs/2018AJ....156...51P/abstract"),")"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"collapse")," ",(0,i.kt)("em",{parentName:"li"},"str")," - A string containing the collapse type, options are 'BE1.1', 'BE4', 'filament', or 'ambipolar'"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"physics_output(str)")," - Filename to store physics output, only relevant for 'filament' and 'ambipolar' collapses. If None, no physics output will be saved."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species")," parametere is provided, the remaining elements of this list will be the final abundances of the species in out_species."),(0,i.kt)("a",{id:"uclchem.model.hot_core"}),(0,i.kt)("h4",{id:"hot_core"},"hot","_","core"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def hot_core(temp_indx, max_temperature, param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run hot core model from UCLCHEM, based on Viti et al. 2004 and Collings et al. 2004"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"temp_indx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Used to select the mass of hot core. 1=1Msun,2=5, 3=10, 4=15, 5=25,6=60]"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"max_temperature")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Value at which gas temperature will stop increasing."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species")," parametere is provided, the remaining elements of this list will be the final abundances of the species in out_species."),(0,i.kt)("a",{id:"uclchem.model.cshock"}),(0,i.kt)("h4",{id:"cshock"},"cshock"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def cshock(shock_vel,\n timestep_factor=0.01,\n minimum_temperature=0.0,\n param_dict=None,\n out_species=None)\n")),(0,i.kt)("p",null,"Run C-type shock model from UCLCHEM"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shock_vel")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Velocity of the shock in km/s"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"timestep_factor")," ",(0,i.kt)("em",{parentName:"li"},"float, optional")," - Whilst the time is less than 2 times the dissipation time of shock, timestep is timestep_factor*dissipation time. Essentially controls\nhow well resolved the shock is in your model. Defaults to 0.01."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"minimum_temperature")," ",(0,i.kt)("em",{parentName:"li"},"float, optional")," - Minimum post-shock temperature. Defaults to 0.0 (no minimum). The shocked gas typically cools to ",(0,i.kt)("inlineCode",{parentName:"li"},"initialTemp")," if this is not set."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the model succeeded, the second element is the dissipation time and further elements are the abundances of all species in ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species"),"."),(0,i.kt)("a",{id:"uclchem.model.jshock"}),(0,i.kt)("h4",{id:"jshock"},"jshock"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def jshock(shock_vel, param_dict=None, out_species=None)\n")),(0,i.kt)("p",null,"Run J-type shock model from UCLCHEM"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shock_vel")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Velocity of the shock"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"param_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict,optional")," - A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"out_species")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," A list where the first element is always an integer which is negative if the model failed to run and can be sent to ",(0,i.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to see more details. If the model succeeded, the second element is the dissipation time and further elements are the abundances of all species in ",(0,i.kt)("inlineCode",{parentName:"p"},"out_species"),"."),(0,i.kt)("a",{id:"uclchem.utils"}),(0,i.kt)("h1",{id:"uclchemutils"},"uclchem.utils"),(0,i.kt)("a",{id:"uclchem.utils.cshock_dissipation_time"}),(0,i.kt)("h4",{id:"cshock_dissipation_time"},"cshock","_","dissipation","_","time"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def cshock_dissipation_time(shock_vel, initial_dens)\n")),(0,i.kt)("p",null,"A simple function used to calculate the dissipation time of a C-type shock.\nUse to obtain a useful timescale for your C-shock model runs. Velocity of\nions and neutrals equalizes at dissipation time and full cooling takes a few dissipation times."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"shock_vel")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Velocity of the shock in km/s"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"initial_dens")," ",(0,i.kt)("em",{parentName:"li"},"float")," - Preshock density of the gas in cm",(0,i.kt)("span",{parentName:"li",className:"math math-inline"},(0,i.kt)("span",{parentName:"span",className:"katex"},(0,i.kt)("span",{parentName:"span",className:"katex-mathml"},(0,i.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,i.kt)("semantics",{parentName:"math"},(0,i.kt)("mrow",{parentName:"semantics"},(0,i.kt)("msup",{parentName:"mrow"},(0,i.kt)("mrow",{parentName:"msup"}),(0,i.kt)("mrow",{parentName:"msup"},(0,i.kt)("mo",{parentName:"mrow"},"\u2212"),(0,i.kt)("mn",{parentName:"mrow"},"3")))),(0,i.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,i.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,i.kt)("span",{parentName:"span",className:"base"},(0,i.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,i.kt)("span",{parentName:"span",className:"mord"},(0,i.kt)("span",{parentName:"span"}),(0,i.kt)("span",{parentName:"span",className:"msupsub"},(0,i.kt)("span",{parentName:"span",className:"vlist-t"},(0,i.kt)("span",{parentName:"span",className:"vlist-r"},(0,i.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,i.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,i.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,i.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,i.kt)("span",{parentName:"span",className:"mord mtight"},(0,i.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,i.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))))),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - The dissipation time of the shock in years")),(0,i.kt)("a",{id:"uclchem.utils.check_error"}),(0,i.kt)("h4",{id:"check_error"},"check","_","error"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_error(error_code)\n")),(0,i.kt)("p",null,'Converts the UCLCHEM integer result flag to a simple messaging explaining what went wrong"'),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"error_code")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Error code returned by UCLCHEM models, the first element of the results list.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - Error message")),(0,i.kt)("a",{id:"uclchem.utils.get_species_table"}),(0,i.kt)("h4",{id:"get_species_table"},"get","_","species","_","table"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_species_table()\n")),(0,i.kt)("p",null,"A simple function to load the list of species in the UCLCHEM network into a pandas dataframe."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.DataFrame")," - A dataframe containing the species names and their details")),(0,i.kt)("a",{id:"uclchem.utils.get_reaction_table"}),(0,i.kt)("h4",{id:"get_reaction_table"},"get","_","reaction","_","table"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_table()\n")),(0,i.kt)("p",null,"A function to load the reaction table from the UCLCHEM network into a pandas dataframe."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"pandas.DataFrame")," - A dataframe containing the reactions and their rates")),(0,i.kt)("a",{id:"uclchem.tests"}),(0,i.kt)("h1",{id:"uclchemtests"},"uclchem.tests"),(0,i.kt)("a",{id:"uclchem.tests.test_ode_conservation"}),(0,i.kt)("h4",{id:"test_ode_conservation"},"test","_","ode","_","conservation"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def test_ode_conservation(element_list=["H", "N", "C", "O"])\n')),(0,i.kt)("p",null,"Test whether the ODEs conserve elements. Useful to run each time you change network.\nIntegrator errors may still cause elements not to be conserved but they cannot be conserved\nif the ODEs are not correct."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"element_list")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - A list of elements for which to check the conservation. Defaults to ",'["H", "N", "C", "O"]',".")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"dict")," - A dictionary of the elements in element list with values representing the total rate of change of each element.")),(0,i.kt)("a",{id:"uclchem.makerates.species"}),(0,i.kt)("h1",{id:"uclchemmakeratesspecies"},"uclchem.makerates.species"),(0,i.kt)("a",{id:"uclchem.makerates.species.is_number"}),(0,i.kt)("h4",{id:"is_number"},"is","_","number"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_number(s) -> bool\n")),(0,i.kt)("p",null,"Try to convert input to a float, if it succeeds, return True."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"s")," - Input element to check for")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if a number, False if not.")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species"}),(0,i.kt)("h2",{id:"species-objects"},"Species Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class Species()\n")),(0,i.kt)("p",null,"Species is a class that holds all the information about an individual species in the\nnetwork. It also has convenience functions to check whether the species is a gas or grain\nspecies and to help compare between species."),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__init__"}),(0,i.kt)("h4",{id:"__init__"},"_","_","init","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __init__(inputRow)\n")),(0,i.kt)("p",null,"A class representing chemical species, it reads in rows which are formatted as follows:\nNAME,MASS,BINDING ENERGY,SOLID FRACTION,MONO FRACTION,VOLCANO FRACTION,ENTHALPY"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("p",null," inputRow (list):"),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_name"}),(0,i.kt)("h4",{id:"get_name"},"get","_","name"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_name() -> str\n")),(0,i.kt)("p",null,"Get the name of the chemical species."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - The name")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_mass"}),(0,i.kt)("h4",{id:"get_mass"},"get","_","mass"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_mass() -> int\n")),(0,i.kt)("p",null,"Get the molecular mass of the chemical species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"int")," - The molecular mass")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.set_desorb_products"}),(0,i.kt)("h4",{id:"set_desorb_products"},"set","_","desorb","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_desorb_products(new_desorbs: list[str]) -> None\n")),(0,i.kt)("p",null,"Set the desorption products for species on the surface or in the bulk.\nIt is assumed that there is only one desorption pathway."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_desorbs")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The new desorption products")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_desorb_products"}),(0,i.kt)("h4",{id:"get_desorb_products"},"get","_","desorb","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_desorb_products() -> list[str]\n")),(0,i.kt)("p",null,"Obtain the desorbtion products of ice species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[str]")," - The desorption products")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.set_freeze_products"}),(0,i.kt)("h4",{id:"set_freeze_products"},"set","_","freeze","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_freeze_products(product_list: list[str], freeze_alpha: float) -> None\n")),(0,i.kt)("p",null,"Add the freeze products of the species, one species can have several freeze products."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"product_list")," ",(0,i.kt)("em",{parentName:"p"},"list","[str]")," - The list of freeze out products")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("p",{parentName:"li"},(0,i.kt)("inlineCode",{parentName:"p"},"freeze_alpha")," ",(0,i.kt)("em",{parentName:"p"},"float")," - The freeze out ratio."),(0,i.kt)("p",{parentName:"li"},"It is called alpha, since it is derived from the alpha column in the UCLCHEM reaction format:\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/uclchem/UCLCHEM/blob/08d37f8c3063f8ff8a9a7aa16d9eff0ed4f99538/Makerates/src/network.py#L160"},"https://github.com/uclchem/UCLCHEM/blob/08d37f8c3063f8ff8a9a7aa16d9eff0ed4f99538/Makerates/src/network.py#L160")))),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_freeze_products"}),(0,i.kt)("h4",{id:"get_freeze_products"},"get","_","freeze","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_freeze_products() -> dict[list[str], float]\n")),(0,i.kt)("p",null,"Obtain the product to which the species freeze out"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[str, float]",": Reactions and their respective freeze out ratios."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Yields"),":"),(0,i.kt)("p",null," Iterator[dict","[str, float]","]: Iterator that returns all of the freeze out reactions with ratios"),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_freeze_products_list"}),(0,i.kt)("h4",{id:"get_freeze_products_list"},"get","_","freeze","_","products","_","list"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_freeze_products_list() -> list[list[str]]\n")),(0,i.kt)("p",null,"Returns all the freeze products without their ratios"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[list[str]]")," - List of freeze products")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_freeze_alpha"}),(0,i.kt)("h4",{id:"get_freeze_alpha"},"get","_","freeze","_","alpha"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_freeze_alpha(product_list: list[str]) -> float\n")),(0,i.kt)("p",null,"Obtain the freeze out ratio of a species for a certain reaction"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"product_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - For a specific reaction, get the freezeout ratio")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - The freezeout ratio")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_grain_species"}),(0,i.kt)("h4",{id:"is_grain_species"},"is","_","grain","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_grain_species() -> bool\n")),(0,i.kt)("p",null,"Return whether the species is a species on the grain"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if it is a grain species.")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_surface_species"}),(0,i.kt)("h4",{id:"is_surface_species"},"is","_","surface","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_surface_species() -> bool\n")),(0,i.kt)("p",null,"Checks if the species is on the surface"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if a surface species")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_bulk_species"}),(0,i.kt)("h4",{id:"is_bulk_species"},"is","_","bulk","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_bulk_species() -> bool\n")),(0,i.kt)("p",null,"Checks if the species is in the bulk"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if a bulk species")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.is_ion"}),(0,i.kt)("h4",{id:"is_ion"},"is","_","ion"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def is_ion() -> bool\n")),(0,i.kt)("p",null,"Checks if the species is ionized, either postively or negatively."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if it is an ionized")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.add_default_freeze"}),(0,i.kt)("h4",{id:"add_default_freeze"},"add","_","default","_","freeze"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_default_freeze() -> None\n")),(0,i.kt)("p",null,"Adds a defalt freezeout, which is freezing out to the species itself, but with no ionization."),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.find_constituents"}),(0,i.kt)("h4",{id:"find_constituents"},"find","_","constituents"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def find_constituents()\n")),(0,i.kt)("p",null,"Loop through the species' name and work out what its consituent\natoms are. Then calculate mass and alert user if it doesn't match\ninput mass."),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.get_n_atoms"}),(0,i.kt)("h4",{id:"get_n_atoms"},"get","_","n","_","atoms"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_n_atoms() -> int\n")),(0,i.kt)("p",null,"Obtain the number of atoms in the molecule"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"int")," - The number of atoms")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.set_n_atoms"}),(0,i.kt)("h4",{id:"set_n_atoms"},"set","_","n","_","atoms"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_n_atoms(new_n_atoms: int) -> None\n")),(0,i.kt)("p",null,"Set the number of atoms"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_n_atoms")," ",(0,i.kt)("em",{parentName:"li"},"int")," - The new number of atoms")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__eq__"}),(0,i.kt)("h4",{id:"__eq__"},"_","_","eq","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __eq__(other)\n")),(0,i.kt)("p",null,"Check for equality based on either a string or another Species instance."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," ",(0,i.kt)("em",{parentName:"li"},"str, Species")," - Another species")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"NotImplementedError")," - We can only compare between species or strings of species.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if two species are identical.")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__lt__"}),(0,i.kt)("h4",{id:"__lt__"},"_","_","lt","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __lt__(other) -> bool\n")),(0,i.kt)("p",null,"Compare the mass of the species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - Another species instance")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if less than the other species")),(0,i.kt)("a",{id:"uclchem.makerates.species.Species.__gt__"}),(0,i.kt)("h4",{id:"__gt__"},"_","_","gt","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __gt__(other) -> bool\n")),(0,i.kt)("p",null,"Compare the mass of the species"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - Another species instance")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - True if larger than than the other species")),(0,i.kt)("a",{id:"uclchem.makerates"}),(0,i.kt)("h1",{id:"uclchemmakerates"},"uclchem.makerates"),(0,i.kt)("a",{id:"uclchem.makerates.makerates"}),(0,i.kt)("h1",{id:"uclchemmakeratesmakerates"},"uclchem.makerates.makerates"),(0,i.kt)("a",{id:"uclchem.makerates.makerates.run_makerates"}),(0,i.kt)("h4",{id:"run_makerates"},"run","_","makerates"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def run_makerates(configuration_file: str = "user_settings.yaml",\n write_files: bool = True) -> Network\n')),(0,i.kt)("p",null,"The main run wrapper for makerates, it loads a configuration, parses it in Network\nand then returns the Network. It by default writes to the uclchem fortran directory, but\nthis can be skipped."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"configuration_file")," ",(0,i.kt)("em",{parentName:"li"},"str, optional"),' - A UCLCHEM Makerates configuration file. Defaults to "user_settings.yaml".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"write_files")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether to write the fortran files to the src/fortran_src. Defaults to True.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"KeyError")," - The configuration cannot be found")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Network")," - A chemical network instance.")),(0,i.kt)("a",{id:"uclchem.makerates.makerates.get_network"}),(0,i.kt)("h4",{id:"get_network"},"get","_","network"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_network(path_to_input_file: Union[str, bytes, os.PathLike] = None,\n path_to_species_file: Union[str, bytes, os.PathLike] = None,\n path_to_reaction_file: Union[str, bytes, os.PathLike] = None,\n verbosity=None)\n")),(0,i.kt)("p",null,"In memory equivalent of Makerates, can either be used on the original input files\nfor makerates, or on the output files that makerates generates. So either specify:"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"path_to_input_file ")," exclusive OR (",(0,i.kt)("inlineCode",{parentName:"p"},"path_to_species_file")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"path_to_reaction_file"),")"),(0,i.kt)("p",null,"The latter scenario allows you to reload a reaction network from a network already written by Makerates."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path_to_input_file")," ",(0,i.kt)("em",{parentName:"li"},"Union","[str, bytes, os.PathLike]",", optional")," - Path to input file. Defaults to None."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path_to_species_file")," ",(0,i.kt)("em",{parentName:"li"},"Union","[str, bytes, os.PathLike]",", optional")," - Path to a species.csv in/from the src directory. Defaults to None."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"path_to_reaction_file")," ",(0,i.kt)("em",{parentName:"li"},"Union","[str, bytes, os.PathLike]",", optional")," - Path to a reactions.csv in/from the src directory. Defaults to None."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"verbosity")," ",(0,i.kt)("em",{parentName:"li"},"LEVEL, optional")," - The verbosity level as specified in logging. Defaults to None.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError")," - You cannot specify both an input configuration and species+reaction.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Network")," - A chemical reaction network.")),(0,i.kt)("a",{id:"uclchem.makerates.network"}),(0,i.kt)("h1",{id:"uclchemmakeratesnetwork"},"uclchem.makerates.network"),(0,i.kt)("p",null,"This python file contains all functions for de-duplicating species and reaction lists,\nchecking for common errors, and automatic addition of reactions such as freeze out,\ndesorption and bulk reactions for three phase models."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network"}),(0,i.kt)("h2",{id:"network-objects"},"Network Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class Network()\n")),(0,i.kt)("p",null,"The network class stores all the information about reaction network."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.__init__"}),(0,i.kt)("h4",{id:"__init__-1"},"_","_","init","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __init__(species: list[Species],\n reactions: list[Reaction],\n three_phase: bool = False,\n user_defined_bulk: list = [])\n")),(0,i.kt)("p",null,"A class to store network information such as indices of important reactions."),(0,i.kt)("p",null,"The class fully utilizes getters and setters, which can be used to add/remove\nreactions and the species involved. Important is that you do not directly edit\nthe internal dictionaries that store the species and reactions, unless you\nknow what you are doing. The network by default checks for duplicates in species\nand identical reactions that overlap in temperature ranges, potentially causing\nproblems."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - A list of chemical species that are added to the network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactions")," ",(0,i.kt)("em",{parentName:"li"},"list","[Reaction]")," - A list of chemical reactions that are added to the network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether to use a three phase model (gas, surface, bulk). Defaults to False."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"user_defined_bulk")," ",(0,i.kt)("em",{parentName:"li"},"list, optional")," - List of user defined bulk. Defaults to [].")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.find_similar_reactions"}),(0,i.kt)("h4",{id:"find_similar_reactions"},"find","_","similar","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def find_similar_reactions(reaction: Reaction) -> dict[int, Reaction]\n")),(0,i.kt)("p",null,"Reactions are similar if the reaction has the same reactants and products,\nfind all reactions that are similar, returning their index and the reaction itself."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction")," ",(0,i.kt)("em",{parentName:"li"},"Reaction")," - Reaction with possible identical (but for temperature range) reactions in the network")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[int, Reaction]",": A dict with the identical reactions."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.remove_reaction_by_index"}),(0,i.kt)("h4",{id:"remove_reaction_by_index"},"remove","_","reaction","_","by","_","index"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def remove_reaction_by_index(reaction_idx: int) -> None\n")),(0,i.kt)("p",null,"Remove a reaction by its index in the internal _reactions_dict, this is the only way\nto remove reactions that are defined piecewise across temperature ranges."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_idx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Index of the reaction to remove")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.remove_reaction"}),(0,i.kt)("h4",{id:"remove_reaction"},"remove","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def remove_reaction(reaction: Reaction) -> None\n")),(0,i.kt)("p",null,"Remove the reaction by giving the object itself, this only works if the reaction is\nnot piecewise defined across the temperature ranges."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction")," ",(0,i.kt)("em",{parentName:"li"},"Reaction")," - The reaction you wish to delete.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_reaction"}),(0,i.kt)("h4",{id:"get_reaction"},"get","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction(reaction_idx: int) -> Reaction\n")),(0,i.kt)("p",null,"Obtain a reaction from the reaction set given an index of the internal _reactions_dict."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_idx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - The reaction index")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Reaction")," - the desired reaction")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_reaction"}),(0,i.kt)("h4",{id:"set_reaction"},"set","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_reaction(reaction_idx: int, reaction: Reaction) -> None\n")),(0,i.kt)("p",null,"This setter explicitely sets the reaction for a certain index."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_idx")," ",(0,i.kt)("em",{parentName:"li"},"int")," - The index to be written to"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction")," ",(0,i.kt)("em",{parentName:"li"},"Reaction")," - The reaction to be added to the index.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_reaction_dict"}),(0,i.kt)("h4",{id:"get_reaction_dict"},"get","_","reaction","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_dict() -> dict[int, Reaction]\n")),(0,i.kt)("p",null,"Returns the whole internal reaction dictionary."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[int, Reaction]",": A copy of the internal reactions dictionary."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_reaction_dict"}),(0,i.kt)("h4",{id:"set_reaction_dict"},"set","_","reaction","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_reaction_dict(new_dict: dict[int, Reaction]) -> None\n")),(0,i.kt)("p",null,"Override the reactions dictionary with a new dictionar."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict","[int, Reaction]")," - The new reactions_dictionary.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_reaction_list"}),(0,i.kt)("h4",{id:"get_reaction_list"},"get","_","reaction","_","list"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_list() -> list[Reaction]\n")),(0,i.kt)("p",null,"Obtain all the reactions in the Network."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[Reaction]")," - A list with all the reaction objects")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.sort_reactions"}),(0,i.kt)("h4",{id:"sort_reactions"},"sort","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def sort_reactions() -> None\n")),(0,i.kt)("p",null,"Sort the reaction dictionary by reaction type first and by the first reactant second."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_species"}),(0,i.kt)("h4",{id:"add_species"},"add","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_species(species: Union[Union[Species, str], list[Union[Species,\n str]]])\n")),(0,i.kt)("p",null,"Add species to the network, given a (list of) species. If it is a list of strings,\nit tries to instantiate a species class with it. It also checks for duplicate entries and\nfilters out attempts to add reaction types to the species."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"Union[Union","[Species, str]",", list[Union","[Species, str]","]]")," - A (list of) species or strings.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError")," - If we cannot parse the (list of) reactions"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError")," - If an ice specie with binding energy of zero is added.")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.remove_species"}),(0,i.kt)("h4",{id:"remove_species"},"remove","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def remove_species(specie_name: str) -> None\n")),(0,i.kt)("p",null,"Remove a specie from the network"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"specie_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Species to remove")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_species_list"}),(0,i.kt)("h4",{id:"get_species_list"},"get","_","species","_","list"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_species_list() -> list[Species]\n")),(0,i.kt)("p",null,"Obtain a list with all the species in the network"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[Species]")," - A list of all the species in the reaction network")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_species_dict"}),(0,i.kt)("h4",{id:"get_species_dict"},"get","_","species","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_species_dict() -> dict[str, Species]\n")),(0,i.kt)("p",null,"Get the internal dictionary that stores all the species, it consists\nof all species' names as key, with the species object as value."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," dict","[str, Species]",": A dictionary with the species"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.get_specie"}),(0,i.kt)("h4",{id:"get_specie"},"get","_","specie"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_specie(specie_name: str) -> Species\n")),(0,i.kt)("p",null,"Get the species of the reaction network (from the internal dictionary)"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"specie_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - the name of the species as a string")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Species")," - The species object")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_specie"}),(0,i.kt)("h4",{id:"set_specie"},"set","_","specie"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_specie(species_name: str, species: Species) -> None\n")),(0,i.kt)("p",null,"Set the species of the reaction network in the internal dictionary"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The name of the species as string"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - The Species object to set")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.set_species_dict"}),(0,i.kt)("h4",{id:"set_species_dict"},"set","_","species","_","dict"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_species_dict(new_species_dict: dict[str, Species]) -> None\n")),(0,i.kt)("p",null,"Set the internal species dict"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"new_species_dict")," ",(0,i.kt)("em",{parentName:"li"},"dict","[str, Species]")," - The new dictionary to set")),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.sort_species"}),(0,i.kt)("h4",{id:"sort_species"},"sort","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def sort_species() -> None\n")),(0,i.kt)("p",null,"Sort the species based on their mass in ascending order. We always make sure the Electron is last."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_network"}),(0,i.kt)("h4",{id:"check_network"},"check","_","network"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_network() -> None\n")),(0,i.kt)("p",null,"Run through the list of reactions and check for obvious errors such\nas duplicate reactions, multiple freeze out routes (to warn, not necessarily\nan error), etc."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_and_filter_species"}),(0,i.kt)("h4",{id:"check_and_filter_species"},"check","_","and","_","filter","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_and_filter_species() -> None\n")),(0,i.kt)("p",null,"Check every speces in network appears in at least one reaction.\nRemove any that do not and alert user."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_bulk_species"}),(0,i.kt)("h4",{id:"add_bulk_species"},"add","_","bulk","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_bulk_species() -> None\n")),(0,i.kt)("p",null,"For three phase models, MakeRates will produce the version of the species in the bulk\nso that the user doesn't have to endlessly relist the same species"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_freeze_and_desorbs"}),(0,i.kt)("h4",{id:"check_freeze_and_desorbs"},"check","_","freeze","_","and","_","desorbs"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_freeze_and_desorbs() -> None\n")),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"add_freeze_reactions()")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"add_desorb_reactions()")," automatically generate\nall desorption and freeze out reactions. However, user may want to change a species on freeze out\neg C+ becomes ",(0,i.kt)("inlineCode",{parentName:"p"},"C")," rather than ",(0,i.kt)("inlineCode",{parentName:"p"},"C"),"+. This function checks for that and updates species so they'll\nfreeze or desorb correctly when reactions are generated."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_freeze_reactions"}),(0,i.kt)("h4",{id:"add_freeze_reactions"},"add","_","freeze","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_freeze_reactions() -> None\n")),(0,i.kt)("p",null,"Save the user effort by automatically generating freeze out reactions"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_desorb_reactions"}),(0,i.kt)("h4",{id:"add_desorb_reactions"},"add","_","desorb","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_desorb_reactions() -> None\n")),(0,i.kt)("p",null,"Save the user effort by automatically generating desorption reactions"),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_chemdes_reactions"}),(0,i.kt)("h4",{id:"add_chemdes_reactions"},"add","_","chemdes","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_chemdes_reactions() -> None\n")),(0,i.kt)("p",null,"We have the user list all Langmuir-Hinshelwood and Eley-Rideal\nreactions once. Then we duplicate so that the reaction branches\nwith products on grain and products desorbing."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.check_for_excited_species"}),(0,i.kt)("h4",{id:"check_for_excited_species"},"check","_","for","_","excited","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_for_excited_species() -> bool\n")),(0,i.kt)("p",null,"Check if there are any exicted species in the network, true if there are any."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_excited_surface_reactions"}),(0,i.kt)("h4",{id:"add_excited_surface_reactions"},"add","_","excited","_","surface","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_excited_surface_reactions() -> None\n")),(0,i.kt)("p",null,"All excited species will relax to the ground state if they do not react\nthe vibrational frequency of the species is used as a pseudo approximation of the rate coefficient\nWe assume all grain reactions have an excited variant. For example:\n",(0,i.kt)("inlineCode",{parentName:"p"},"A"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"B")," LH ",(0,i.kt)("inlineCode",{parentName:"p"},"C")," will have the variants:\n",(0,i.kt)("inlineCode",{parentName:"p"},"A"),(0,i.kt)("em",{parentName:"p"},", ",(0,i.kt)("inlineCode",{parentName:"em"},"B")," EXSOLID ",(0,i.kt)("inlineCode",{parentName:"em"},"C")," and ",(0,i.kt)("inlineCode",{parentName:"em"},"A"),", ",(0,i.kt)("inlineCode",{parentName:"em"},"B"))," EXSOLID ",(0,i.kt)("inlineCode",{parentName:"p"},"C"),"\nIf only one of the reactants in the base reaction has an excited counterpart then\nonly one excited version of that reaction is created."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.add_bulk_reactions"}),(0,i.kt)("h4",{id:"add_bulk_reactions"},"add","_","bulk","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def add_bulk_reactions() -> None\n")),(0,i.kt)("p",null,"We assume any reaction that happens on the surface of grains can also happen\nin the bulk (just more slowly due to binding energy). The user therefore only\nlists surface reactions in their input reaction file and we duplicate here."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.freeze_checks"}),(0,i.kt)("h4",{id:"freeze_checks"},"freeze","_","checks"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def freeze_checks() -> None\n")),(0,i.kt)("p",null,"Check that every species freezes out and alert the user if a\nspecies freezes out via mutiple routes. This isn't necessarily an\nerror so best just print."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.duplicate_checks"}),(0,i.kt)("h4",{id:"duplicate_checks"},"duplicate","_","checks"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def duplicate_checks() -> None\n")),(0,i.kt)("p",null,"Check reaction network to make sure no reaction appears twice unless\nthey have different temperature ranges."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.index_important_reactions"}),(0,i.kt)("h4",{id:"index_important_reactions"},"index","_","important","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def index_important_reactions() -> None\n")),(0,i.kt)("p",null,"We have a whole bunch of important reactions and we want to store\ntheir indices. We find them all here."),(0,i.kt)("a",{id:"uclchem.makerates.network.Network.index_important_species"}),(0,i.kt)("h4",{id:"index_important_species"},"index","_","important","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def index_important_species() -> None\n")),(0,i.kt)("p",null,"Obtain the indices for all the important reactions."),(0,i.kt)("a",{id:"uclchem.makerates.network.LoadedNetwork"}),(0,i.kt)("h2",{id:"loadednetwork-objects"},"LoadedNetwork Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class LoadedNetwork(Network)\n")),(0,i.kt)("p",null,"Network version that skips all steps and just loads two lists. This is another\nhere be dragons version, use this with exceeding caution as no checks are performed for you."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"Network")," ",(0,i.kt)("strong",{parentName:"li"},"type")," - ",(0,i.kt)("em",{parentName:"li"},"description"))),(0,i.kt)("a",{id:"uclchem.makerates.network.LoadedNetwork.__init__"}),(0,i.kt)("h4",{id:"__init__-2"},"_","_","init","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __init__(species: list[Species], reactions: list[Reaction]) -> None\n")),(0,i.kt)("p",null,"A loader of networks without any checks."),(0,i.kt)("p",null,"Here be dragons."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - A list of species objects"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactions")," ",(0,i.kt)("em",{parentName:"li"},"list","[Reaction]")," - A list of reaction objects.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions"}),(0,i.kt)("h1",{id:"uclchemmakeratesio_functions"},"uclchem.makerates.io","_","functions"),(0,i.kt)("p",null,"Functions to read in the species and reaction files and write output files"),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.read_species_file"}),(0,i.kt)("h4",{id:"read_species_file"},"read","_","species","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def read_species_file(file_name: Path) -> list[Species]\n")),(0,i.kt)("p",null,"Reads in a Makerates species file"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fileName")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to file containing the species list")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list")," - List of Species objects")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.read_reaction_file"}),(0,i.kt)("h4",{id:"read_reaction_file"},"read","_","reaction","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def read_reaction_file(file_name: Path, species_list: list[Species],\n ftype: str) -> tuple[list[Reaction], list[Reaction]]\n")),(0,i.kt)("p",null,"Reads in a reaction file of any kind (user, UMIST, KIDA)\nproduces a list of reactions for the network, filtered by species_list"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - A file name for the reaction file to read."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - A list of chemical species to be used in the reading."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ftype")," ",(0,i.kt)("em",{parentName:"li"},"str")," - 'UMIST','UCL', or 'KIDA' to describe format of file_name")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list,list")," - Lists of kept and dropped reactions.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.check_reaction"}),(0,i.kt)("h4",{id:"check_reaction"},"check","_","reaction"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_reaction(reaction_row, keep_list) -> bool\n")),(0,i.kt)("p",null,"Checks a row parsed from a reaction file and checks it only contains acceptable things.\nIt checks if all species in the reaction are present, and adds the temperature range is none is specified."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_row")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List parsed from a reaction file and formatted to be able to called Reaction(reaction_row)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"keep_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - list of elements that are acceptable in the reactant or product bits of row")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - Whether the row contains acceptable entries.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.kida_parser"}),(0,i.kt)("h4",{id:"kida_parser"},"kida","_","parser"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def kida_parser(kida_file)\n")),(0,i.kt)("p",null,"KIDA used a fixed format file so we read each line in the chunks they specify\nand use python built in classes to convert to the necessary types.\nNOTE KIDA defines some of the same reaction types to UMIST but with different names\nand coefficients. We fix that by converting them here."),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.output_drops"}),(0,i.kt)("h4",{id:"output_drops"},"output","_","drops"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def output_drops(dropped_reactions: list[Reaction],\n output_dir: str,\n write_files=True)\n")),(0,i.kt)("p",null,"Writes the reactions that are dropped to disk/logs"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"dropped_reactions")," ",(0,i.kt)("em",{parentName:"li"},"list","[Reaction]")," - The reactions that were dropped"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_dir")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The directory that dropped_reactions.csv will be written to."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"write_files")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether or not to write the file. Defaults to True.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_outputs"}),(0,i.kt)("h4",{id:"write_outputs"},"write","_","outputs"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_outputs(network: Network, output_dir: str = None) -> None\n")),(0,i.kt)("p",null,"Write the ODE and Network fortran source files to the fortran source."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"network")," ",(0,i.kt)("em",{parentName:"li"},"network")," - The makerates Network class"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"output_dir")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - The directory to write to.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_species"}),(0,i.kt)("h4",{id:"write_species"},"write","_","species"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_species(file_name: Path, species_list: list[Species]) -> None\n")),(0,i.kt)("p",null,"Write the human readable species file. Note UCLCHEM doesn't use this file."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fileName")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to output file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species objects for network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_reactions"}),(0,i.kt)("h4",{id:"write_reactions"},"write","_","reactions"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_reactions(fileName, reaction_list) -> None\n")),(0,i.kt)("p",null,"Write the human readable reaction file. Note UCLCHEM doesn't use this file."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"fileName")," ",(0,i.kt)("em",{parentName:"li"},"str")," - path to output file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of reaction objects for network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_odes_f90"}),(0,i.kt)("h4",{id:"write_odes_f90"},"write","_","odes","_","f90"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_odes_f90(file_name: Path, species_list: list[Species],\n reaction_list: list[Reaction], three_phase: bool) -> None\n")),(0,i.kt)("p",null,"Write the ODEs in Modern Fortran. This is an actual code file."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Path to file where code will be written"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species describing network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of reactions describing network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - Flag for whether this is a 3 phase network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_jacobian"}),(0,i.kt)("h4",{id:"write_jacobian"},"write","_","jacobian"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_jacobian(file_name: Path, species_list: list[Species]) -> None\n")),(0,i.kt)("p",null,"Write jacobian in Modern Fortran. This has never improved UCLCHEM's speed\nand so is not used in the code as it stands.\nCurrent only works for three phase model."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Path to jacobian file"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"species_list")," - List of species AFTER being processed by build_ode_string")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.build_ode_string"}),(0,i.kt)("h4",{id:"build_ode_string"},"build","_","ode","_","string"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def build_ode_string(species_list: list[Species],\n reaction_list: list[Reaction], three_phase: bool) -> str\n")),(0,i.kt)("p",null,"A long, complex function that does the messy work of creating the actual ODE\ncode to calculate the rate of change of each species. Test any change to this code\nthoroughly because ODE mistakes are very hard to spot."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species in network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of reactions in network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - Bool denoting if this is a three phase network")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - One long string containing the entire ODE fortran code.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.species_ode_string"}),(0,i.kt)("h4",{id:"species_ode_string"},"species","_","ode","_","string"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def species_ode_string(n: int, species: Species) -> str\n")),(0,i.kt)("p",null,"Build the string of Fortran code for a species once it's loss and gains\nstrings have been produced."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"n")," ",(0,i.kt)("em",{parentName:"li"},"int")," - Index of species in python format"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species")," ",(0,i.kt)("em",{parentName:"li"},"Species")," - species object")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - the fortran code for the rate of change of the species")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_evap_lists"}),(0,i.kt)("h4",{id:"write_evap_lists"},"write","_","evap","_","lists"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_evap_lists(network_file, species_list: list[Species]) -> None\n")),(0,i.kt)("p",null,"Two phase networks mimic episodic thermal desorption seen in lab (see Viti et al. 2004)\nby desorbing fixed fractions of material at specific temperatures. Three phase networks just\nuse binding energy and that fact we set binding energies in bulk to water by default.\nThis function writes all necessary arrays to the network file so these processes work."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"network_file")," ",(0,i.kt)("em",{parentName:"li"},"file")," - Open file object to which the network code is being written"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[Species]")," - List of species in network")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.truncate_line"}),(0,i.kt)("h4",{id:"truncate_line"},"truncate","_","line"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def truncate_line(input_string: str, lineLength: int = 72) -> str\n")),(0,i.kt)("p",null,"Take a string and adds line endings at regular intervals\nkeeps us from overshooting fortran's line limits and, frankly,\nmakes for nicer ode.f90 even if human readability isn't very important"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"input_string")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Line of code to be truncated"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"lineLength")," ",(0,i.kt)("em",{parentName:"li"},"int, optional")," - rough line length. Defaults to 72.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - Code string with line endings at regular intervals")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.write_network_file"}),(0,i.kt)("h4",{id:"write_network_file"},"write","_","network","_","file"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def write_network_file(file_name: Path, network: Network)\n")),(0,i.kt)("p",null,"Write the Fortran code file that contains all network information for UCLCHEM.\nThis includes lists of reactants, products, binding energies, formationEnthalpies\nand so on."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"file_name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The file name where the code will be written."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"network")," ",(0,i.kt)("em",{parentName:"li"},"Network")," - A Network object built from lists of species and reactions.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.find_reactant"}),(0,i.kt)("h4",{id:"find_reactant"},"find","_","reactant"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def find_reactant(species_list: list[str], reactant: str) -> int\n")),(0,i.kt)("p",null,"Try to find a reactant in the species list"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_list")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - A list of species in the network"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactant")," ",(0,i.kt)("em",{parentName:"li"},"str")," - The reactant to be indexed")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"int")," - The index of the reactant, if it is not found, 9999")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.get_desorption_freeze_partners"}),(0,i.kt)("h4",{id:"get_desorption_freeze_partners"},"get","_","desorption","_","freeze","_","partners"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_desorption_freeze_partners(\n reaction_list: list[Reaction]) -> list[Reaction]\n")),(0,i.kt)("p",null,"Every desorption has a corresponding freeze out eg desorption of ",(0,i.kt)("inlineCode",{parentName:"p"},"CO")," and freeze of CO.\nThis find the corresponding freeze out for every desorb so that when desorb>>freeze\nwe can turn off freeze out in UCLCHEM."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reaction_list")," ",(0,i.kt)("em",{parentName:"li"},"list")," - Reactions in network")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list")," - list of indices of freeze out reactions matching order of desorptions.")),(0,i.kt)("a",{id:"uclchem.makerates.io_functions.array_to_string"}),(0,i.kt)("h4",{id:"array_to_string"},"array","_","to","_","string"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},'def array_to_string(name: str,\n array: np.array,\n type: str = "int",\n parameter: bool = True) -> str\n')),(0,i.kt)("p",null,"Write an array to fortran source code"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"name")," ",(0,i.kt)("em",{parentName:"li"},"str")," - Variable name of array in Fortran"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"array")," ",(0,i.kt)("em",{parentName:"li"},"iterable")," - List of values of array"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"type")," ",(0,i.kt)("em",{parentName:"li"},"str, optional"),' - The array\'s type. Must be one of "int","float", or "string".Defaults to "int".'),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"parameter")," ",(0,i.kt)("em",{parentName:"li"},"bool, optional")," - Whether the array is a Fortran PARAMETER (constant). Defaults to True.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ValueError"),' - Raises an error if type isn\'t "int","float", or "string"')),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"str")," - String containing the Fortran code to declare this array.")),(0,i.kt)("a",{id:"uclchem.makerates.reaction"}),(0,i.kt)("h1",{id:"uclchemmakeratesreaction"},"uclchem.makerates.reaction"),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction"}),(0,i.kt)("h2",{id:"reaction-objects"},"Reaction Objects"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"class Reaction()\n")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_reactants"}),(0,i.kt)("h4",{id:"get_reactants"},"get","_","reactants"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reactants() -> list[str]\n")),(0,i.kt)("p",null,"Get the four reactants present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"list[str]")," - The four reactants names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_sorted_reactants"}),(0,i.kt)("h4",{id:"get_sorted_reactants"},"get","_","sorted","_","reactants"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_sorted_reactants() -> list[str]\n")),(0,i.kt)("p",null,"Get the four reactants present in the reaction, sorted for fast comparisons"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactants")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four sorted reactant names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_reactants"}),(0,i.kt)("h4",{id:"set_reactants"},"set","_","reactants"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_reactants(reactants: list[str]) -> None\n")),(0,i.kt)("p",null,"Set the four reactants present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactants")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four reactants names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_products"}),(0,i.kt)("h4",{id:"get_products"},"get","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_products() -> list[str]\n")),(0,i.kt)("p",null,"Get the four products present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"reactants")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four products names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_sorted_products"}),(0,i.kt)("h4",{id:"get_sorted_products"},"get","_","sorted","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_sorted_products() -> list[str]\n")),(0,i.kt)("p",null,"Get the four products present in the reaction, sorted for fast comparisons"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"products")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four sorted products names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_products"}),(0,i.kt)("h4",{id:"set_products"},"set","_","products"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_products(products: list[str]) -> None\n")),(0,i.kt)("p",null,"Set the four products present in the reaction, padded with NAN for nonexistent"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"products")," ",(0,i.kt)("em",{parentName:"li"},"list","[str]")," - The four products names")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_alpha"}),(0,i.kt)("h4",{id:"get_alpha"},"get","_","alpha"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_alpha() -> float\n")),(0,i.kt)("p",null,"Get the alpha parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the alpha parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_alpha"}),(0,i.kt)("h4",{id:"set_alpha"},"set","_","alpha"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_alpha(alpha: float) -> None\n")),(0,i.kt)("p",null,"Set the alpha parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"alpha")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the alpha parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_beta"}),(0,i.kt)("h4",{id:"get_beta"},"get","_","beta"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_beta() -> float\n")),(0,i.kt)("p",null,"Get the beta parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the beta parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_beta"}),(0,i.kt)("h4",{id:"set_beta"},"set","_","beta"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_beta(beta: float) -> None\n")),(0,i.kt)("p",null,"Set the beta parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"beta")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the beta parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_gamma"}),(0,i.kt)("h4",{id:"set_gamma"},"set","_","gamma"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_gamma(gamma: float) -> None\n")),(0,i.kt)("p",null,"Set the gamma parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"gamma")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the gamma parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_gamma"}),(0,i.kt)("h4",{id:"get_gamma"},"get","_","gamma"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_gamma() -> float\n")),(0,i.kt)("p",null,"Get the gamma parameter from the Kooij-Arrhenius equation"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the gamma parameter of the reaction")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_templow"}),(0,i.kt)("h4",{id:"set_templow"},"set","_","templow"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_templow(templow: float) -> None\n")),(0,i.kt)("p",null,"Set the lower temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"templow")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the lower temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_templow"}),(0,i.kt)("h4",{id:"get_templow"},"get","_","templow"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_templow() -> float\n")),(0,i.kt)("p",null,"Get the lower temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the lower temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.set_temphigh"}),(0,i.kt)("h4",{id:"set_temphigh"},"set","_","temphigh"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def set_temphigh(temphigh: float) -> None\n")),(0,i.kt)("p",null,"Set the higher temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"templow")," ",(0,i.kt)("em",{parentName:"li"},"float")," - the higher temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_temphigh"}),(0,i.kt)("h4",{id:"get_temphigh"},"get","_","temphigh"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_temphigh() -> float\n")),(0,i.kt)("p",null,"Get the higher temperature boundary of the reaction in Kelvin"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"float")," - the higher temperature boundary")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.NANCheck"}),(0,i.kt)("h4",{id:"nancheck"},"NANCheck"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def NANCheck(a)\n")),(0,i.kt)("p",null,"Convert any Falsy statement to a NAN string"),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"a")," - thing to check for falsiness")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - input a if truthy, otherwise NAN")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.get_reaction_type"}),(0,i.kt)("h4",{id:"get_reaction_type"},"get","_","reaction","_","type"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def get_reaction_type() -> str\n")),(0,i.kt)("p",null,"Get the type of a reaction from the reactants\nFirst check the third reactant for a reaction type, then the second. If there are none\nin there, it will be regarded as a two body reaction."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("p",null," str:"),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.convert_to_bulk"}),(0,i.kt)("h4",{id:"convert_to_bulk"},"convert","_","to","_","bulk"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def convert_to_bulk() -> None\n")),(0,i.kt)("p",null,"Convert the surface species to bulk species in place for this reaction."),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.__eq__"}),(0,i.kt)("h4",{id:"__eq__-1"},"_","_","eq","_","_"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def __eq__(other) -> bool\n")),(0,i.kt)("p",null,"Check for equality against another reaction based on the products and reactants.\nNote that it does not check for the temperature ranges that the reactions might have!\nThe Reaction.check_temperature_collision can be used for this purpose."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," - Another reaction set.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - equality")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.check_temperature_collision"}),(0,i.kt)("h4",{id:"check_temperature_collision"},"check","_","temperature","_","collision"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def check_temperature_collision(other) -> bool\n")),(0,i.kt)("p",null,"Check if two reactions have overlapping temperature ranges, returning True means there is a collision."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"other")," - Another reaction")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Raises"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"NotImplementedError")," - Currently we can only compare against instantiated Reaction objects.")),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Returns"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"bool")," - Whether there is a collision (True), or not (False)")),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.changes_surface_count"}),(0,i.kt)("h4",{id:"changes_surface_count"},"changes","_","surface","_","count"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def changes_surface_count()\n")),(0,i.kt)("p",null,"This checks whether a grain reaction changes number of particles on the surface\n2 reactants to 2 products won't but two reactants combining to one will."),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.changes_total_mantle"}),(0,i.kt)("h4",{id:"changes_total_mantle"},"changes","_","total","_","mantle"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def changes_total_mantle()\n")),(0,i.kt)("p",null,"Check if the total grains on the mantle are changed by the reaction."),(0,i.kt)("a",{id:"uclchem.makerates.reaction.Reaction.generate_ode_bit"}),(0,i.kt)("h4",{id:"generate_ode_bit"},"generate","_","ode","_","bit"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-python"},"def generate_ode_bit(i: int, species_names: list, three_phase: bool)\n")),(0,i.kt)("p",null,"Every reaction contributes a fixed rate of change to whatever species it\naffects. We create the string of fortran code describing that change here."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Arguments"),":"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"i")," ",(0,i.kt)("em",{parentName:"li"},"int")," - index of reaction in network in python format (counting from 0)"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"species_names")," ",(0,i.kt)("em",{parentName:"li"},"list")," - List of species names so we can find index of reactants in species list"),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"three_phase")," ",(0,i.kt)("em",{parentName:"li"},"bool")," - Bool indicating whether this is three phase network")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a487fab1.1b65769f.js b/assets/js/a487fab1.1b65769f.js deleted file mode 100644 index d2eeceb2..00000000 --- a/assets/js/a487fab1.1b65769f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3958],{3905:(e,t,n)=>{n.d(t,{Zo:()=>l,kt:()=>h});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},l=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=p(n),h=a,m=d["".concat(c,".").concat(h)]||d[h]||u[h]||o;return n?r.createElement(m,i(i({ref:t},l),{},{components:n})):r.createElement(m,i({ref:t},l))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>p,toc:()=>u});var r=n(7462),a=n(3366),o=(n(7294),n(3905)),i=["components"],s={id:"notation",title:"Notation"},c=void 0,p={unversionedId:"notation",id:"version-v3.3.0/notation",title:"Notation",description:"UCLCHEM uses notation, which differentiates between species types. Here, we'll give an overview of this notation and associated processes.",source:"@site/versioned_docs/version-v3.3.0/chem-notation.md",sourceDirName:".",slug:"/notation",permalink:"/docs/notation",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"notation",title:"Notation"},sidebar:"docs",previous:{title:"Chemistry",permalink:"/docs/category/chemistry"},next:{title:"Gas Phase Reactions",permalink:"/docs/gas"}},l={},u=[{value:"Gas phase",id:"gas-phase",level:2},{value:"Ice",id:"ice",level:2},{value:"Surface",id:"surface",level:2},{value:"Bulk",id:"bulk",level:2}],d={toc:u};function h(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"UCLCHEM uses notation, which differentiates between species types. Here, we'll give an overview of this notation and associated processes. "),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("strong",{parentName:"th"},"Species type")),(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("strong",{parentName:"th"},"Symbol")),(0,o.kt)("th",{parentName:"tr",align:"center"},(0,o.kt)("strong",{parentName:"th"},"Example")))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Gas phase"),(0,o.kt)("td",{parentName:"tr",align:"center"}),(0,o.kt)("td",{parentName:"tr",align:"center"},"H2O")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Ice"),(0,o.kt)("td",{parentName:"tr",align:"center"},"$"),(0,o.kt)("td",{parentName:"tr",align:"center"},"$H2O")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Surface"),(0,o.kt)("td",{parentName:"tr",align:"center"},"#"),(0,o.kt)("td",{parentName:"tr",align:"center"},"#H2O")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:"center"},"Bulk"),(0,o.kt)("td",{parentName:"tr",align:"center"},"@"),(0,o.kt)("td",{parentName:"tr",align:"center"},"@H2O")))),(0,o.kt)("h2",{id:"gas-phase"},"Gas phase"),(0,o.kt)("p",null,"The gas phase, i.e., the total abundance of a given species in the gas phase, is marked without any symbol. Hence, in order to analyze a given gas phase species, we need to use the name of the species without any additions, e.g., ",(0,o.kt)("strong",{parentName:"p"},"H2O"),". You can read more on reactions occurring in the gas phase ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/gas"},"here"),"."),(0,o.kt)("h2",{id:"ice"},"Ice"),(0,o.kt)("p",null,"When we need to consider the total ice abundance of a given species, we would have to use the $ symbol in front of the molecule. Following the example from the previous section, this would be ",(0,o.kt)("strong",{parentName:"p"},"$H2O"),". However, what is the total ice abundance? If you run a three-phase model, i.e., the one considering gas, surface, and bulk: ",(0,o.kt)("em",{parentName:"p"},"ice = surface + bulk"),".\nIn the case of a simpler two-phase model, it will simply correspond to the abundance on the surface. "),(0,o.kt)("h2",{id:"surface"},"Surface"),(0,o.kt)("p",null,"The surface species starts with #, and the abundance of water on the surface of the grain would be ",(0,o.kt)("strong",{parentName:"p"},"#H2O"),". The grain surface is the outermost part of the grain, from which species get released to the gas phase but are also frozen onto. Hence, the ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/desorb"},"adsorption & desorption reactions")," only consider the surface. Details of the reactions happening on the dust grain surface are described ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/grain"},"here"),". "),(0,o.kt)("h2",{id:"bulk"},"Bulk"),(0,o.kt)("p",null,"In three-phase models, we also account for the bulk of the dust grain, which corresponds to everything below the surface. The bulk is marked with @, so we can access it through ",(0,o.kt)("strong",{parentName:"p"},"@H2O"),". The species from the bulk can diffuse into the surface but also get released into the gas phase (or destroyed) in fast shocks. Bulk ice processes are described in greater detail in a separate ",(0,o.kt)("a",{parentName:"p",href:"/docs/next/bulk"},"page"),"."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/ab4c3ea7.b6531bf1.js b/assets/js/ab4c3ea7.b6531bf1.js new file mode 100644 index 00000000..a45e2a1f --- /dev/null +++ b/assets/js/ab4c3ea7.b6531bf1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2322],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>k});var l=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=l.createContext({}),u=function(e){var t=l.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},d=function(e){var t=u(e.components);return l.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},p=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=u(n),k=a,h=p["".concat(i,".").concat(k)]||p[k]||c[k]||r;return n?l.createElement(h,o(o({ref:t},d),{},{components:n})):l.createElement(h,o({ref:t},d))}));function k(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=p;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>k,frontMatter:()=>s,metadata:()=>u,toc:()=>c});var l=n(7462),a=n(3366),r=(n(7294),n(3905)),o=["components"],s={},i="Running Your First Models",u={unversionedId:"first_model",id:"version-v3.3.1/first_model",title:"Running Your First Models",description:"In this notebook, we demonstrate the basic use of UCLCHEM's python module by running a simple model and then using the analysis functions to examine the output.",source:"@site/versioned_docs/version-v3.3.1/first_model.md",sourceDirName:".",slug:"/first_model",permalink:"/docs/first_model",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{},sidebar:"docs",previous:{title:"Tutorials",permalink:"/docs/category/tutorials"},next:{title:"Advanced Physical Modelling",permalink:"/docs/modelling_objects"}},d={},c=[{value:"A Simple Cloud",id:"a-simple-cloud",level:2},{value:"Checking the output",id:"checking-the-output",level:2},{value:"Plotting Results",id:"plotting-results",level:2}],p={toc:c};function k(e){var t=e.components,s=(0,a.Z)(e,o);return(0,r.kt)("wrapper",(0,l.Z)({},p,s,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"running-your-first-models"},"Running Your First Models"),(0,r.kt)("p",null,"In this notebook, we demonstrate the basic use of UCLCHEM's python module by running a simple model and then using the analysis functions to examine the output."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\n")),(0,r.kt)("h2",{id:"a-simple-cloud"},"A Simple Cloud"),(0,r.kt)("p",null,"UCLCHEM's ",(0,r.kt)("inlineCode",{parentName:"p"},"cloud()")," model is a spherical cloud of isothermal gas. We can keep a constant density or have it increase over time following a freefall equation. This model is generally useful whenever you want to model a homogeneous cloud of gas under constant conditions. For example, in the inner parts of a molecular cloud where Av ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("mo",{parentName:"mrow"},"\u2273")),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\gtrsim")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.95916em",verticalAlign:"-0.22958em"}}),(0,r.kt)("span",{parentName:"span",className:"mrel amsrm"},"\u2273")))))," 10 there are very few depth dependent processes. You may wish to model the whole of this UV shielded portion of the cloud with a single ",(0,r.kt)("inlineCode",{parentName:"p"},"cloud()")," model."),(0,r.kt)("p",null,"Due to the large number of parameters in a chemical model and the way fortran and python interaction, we find it is easiest to do parameter input through python dictionaries. In this block, we define param_dict which contains the parameters we wish to modify for this run. Every ",(0,r.kt)("inlineCode",{parentName:"p"},"uclchem.model")," function accepts a dictionary as an optional argument. Every parameter has a default value which is overriden if that parameter is specified in this dictionary. You can find a complete list of modifiable parameters and their default values in ",(0,r.kt)("a",{parentName:"p",href:"/docs/parameters"},"our parameter docs"),"."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'# set a parameter dictionary for phase 1 collapse model\n\nout_species = ["SO","CO"]\nparam_dict = {\n "endAtFinalDensity": False,#stop at finalTime\n "freefall": False,#don\'t increase density in freefall\n "initialDens": 1e4, #starting density\n "initialTemp": 10.0,#temperature of gas\n "finalTime": 1.0e6, #final time\n "rout":0.1, #radius of cloud in pc\n "baseAv":1.0, #visual extinction at cloud edge.\n "outputFile": "../examples/test-output/static-full.dat",#full UCLCHEM output\n "abundSaveFile": "../examples/test-output/startstatic.dat",#save final abundances to file\n}\nresult = uclchem.model.cloud(param_dict=param_dict,out_species=out_species)\nprint(result)\n\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"[1, 3.331065659699488e-11, 3.576305642378658e-05]\n")),(0,r.kt)("h2",{id:"checking-the-output"},"Checking the output"),(0,r.kt)("p",null,"At the end of the previous cell, we printed ",(0,r.kt)("inlineCode",{parentName:"p"},"result")," which is a list returned by every UCLCHEM model function. The first element is always an integer which will be positive if the code completed and negative otherwise. You can send negative values to ",(0,r.kt)("inlineCode",{parentName:"p"},"uclchem.utils.check_error()")," to get a more detailed error message."),(0,r.kt)("p",null,"The subsequent elements are the final abundances of any species listed in ",(0,r.kt)("inlineCode",{parentName:"p"},"out_species"),", in this case we have the abundance of SO and CO. This is useful when we want to use UCLCHEM as part of something like an MCMC procedure, obtaining abundances for given parameters. However, we also write the final abundances of all species to ",(0,r.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," and the abundances of all species at every time step in ",(0,r.kt)("inlineCode",{parentName:"p"},"outputFile")," so it is not necessary to acquire abundances in this way."),(0,r.kt)("p",null,"The output file is just a simple csv with some header rows, UCLCHEM has a utility function to read that file into a pandas dataframe. Let's load it up and look at it."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'result_df=uclchem.analysis.read_output_file("../examples/test-output/static-full.dat")\nresult_df.head()\n')),(0,r.kt)("div",null,(0,r.kt)("table",{border:"1",class:"dataframe"},(0,r.kt)("thead",null,(0,r.kt)("tr",null,(0,r.kt)("th",null),(0,r.kt)("th",null,"Time"),(0,r.kt)("th",null,"Density"),(0,r.kt)("th",null,"gasTemp"),(0,r.kt)("th",null,"av"),(0,r.kt)("th",null,"zeta"),(0,r.kt)("th",null,"point"),(0,r.kt)("th",null,"H"),(0,r.kt)("th",null,"#H"),(0,r.kt)("th",null,"H+"),(0,r.kt)("th",null,"@H"),(0,r.kt)("th",null,"..."),(0,r.kt)("th",null,"HS2+"),(0,r.kt)("th",null,"HSO2+"),(0,r.kt)("th",null,"H2S2+"),(0,r.kt)("th",null,"H2S2"),(0,r.kt)("th",null,"#H2S2"),(0,r.kt)("th",null,"@H2S2"),(0,r.kt)("th",null,"E-"),(0,r.kt)("th",null,"BULK"),(0,r.kt)("th",null,"SURFACE"),(0,r.kt)("th",null,"radfield"))),(0,r.kt)("tbody",null,(0,r.kt)("tr",null,(0,r.kt)("th",null,"0"),(0,r.kt)("td",null,"0.000000e+00"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"1"),(0,r.kt)("td",null,"1.000000e-07"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.680300e-13"),(0,r.kt)("td",null,"1.789040e-17"),(0,r.kt)("td",null,"4.269620e-20"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.629010e-20"),(0,r.kt)("td",null,"7.488850e-13"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"2"),(0,r.kt)("td",null,"1.000000e-06"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.646510e-12"),(0,r.kt)("td",null,"1.789080e-16"),(0,r.kt)("td",null,"4.219000e-18"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"1.631720e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000020e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.562330e-18"),(0,r.kt)("td",null,"7.444370e-12"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"3"),(0,r.kt)("td",null,"1.000000e-05"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.641430e-11"),(0,r.kt)("td",null,"1.789520e-15"),(0,r.kt)("td",null,"4.212520e-16"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"7.762720e-29"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000050e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000010e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.554260e-16"),(0,r.kt)("td",null,"7.438940e-11"),(0,r.kt)("td",null,"1.0")),(0,r.kt)("tr",null,(0,r.kt)("th",null,"4"),(0,r.kt)("td",null,"1.000000e-04"),(0,r.kt)("td",null,"10000.0"),(0,r.kt)("td",null,"10.0"),(0,r.kt)("td",null,"2.9287"),(0,r.kt)("td",null,"1.0"),(0,r.kt)("td",null,"1"),(0,r.kt)("td",null,"0.5"),(0,r.kt)("td",null,"5.480630e-10"),(0,r.kt)("td",null,"1.793810e-14"),(0,r.kt)("td",null,"4.079690e-14"),(0,r.kt)("td",null,"..."),(0,r.kt)("td",null,"7.864380e-27"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000070e-30"),(0,r.kt)("td",null,"1.000000e-30"),(0,r.kt)("td",null,"1.000150e-30"),(0,r.kt)("td",null,"0.000182"),(0,r.kt)("td",null,"5.425070e-14"),(0,r.kt)("td",null,"7.351600e-10"),(0,r.kt)("td",null,"1.0")))),(0,r.kt)("p",null,"5 rows \xd7 321 columns")),(0,r.kt)("p",null,"We can also test whether the model run went well by checking for element conservation. We do this because integrator errors often show up as a failure to conserve elemental abundances. "),(0,r.kt)("p",null,"We can use ",(0,r.kt)("inlineCode",{parentName:"p"},"check_element_conservation()")," to test whether we conserve elements in this run. This function returns a dictionary where each entry gives the change in the total abundance of an element as a percentage of the original abundance. In an ideal case, these values are 0\\% indicating the total abundance at the end of the model is exactly the same as the total at the start."),(0,r.kt)("p",null,"Changes of less than 1\\% are fine for many cases but if they are too high, you could consider changing the ",(0,r.kt)("inlineCode",{parentName:"p"},"reltol")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"abstol")," parameters that control the integrator accuracy. They are error tolerance so smaller values lead to smaller errors and (usually) longer integration times. The default values were chosen by running a large grid of models and choosing the tolerances with the lowest average run time from those that conserved elements well and rarely failed. Despite this, there are no one-size-fits-all perfect tolerances and you may run into issues with different networks or models."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'conservation=uclchem.analysis.check_element_conservation(result_df,element_list=["H","N","C","O","S"])\nprint("Percentage change in total abundances:")\nprint(conservation)\n')),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"Percentage change in total abundances:\n{'H': '0.001%', 'N': '0.000%', 'C': '0.000%', 'O': '0.000%', 'S': '0.000%'}\n")),(0,r.kt)("h2",{id:"plotting-results"},"Plotting Results"),(0,r.kt)("p",null,"Finally, you will want to plot your results. This can be done with any plotting library but UCLCHEM does provide a few functions to make quick plots. Note the use of $ symbols in the species list below, this gets the total ice abundance of a species. For two phase models, this is just the surface abudance but for three phase it is the sum of surface and bulk."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-python"},'species=["H","H2","$H","$H2","H2O","$H2O","CO","$CO","$CH3OH","CH3OH"]\nfig,ax=uclchem.analysis.create_abundance_plot(result_df,species,figsize=(10,7))\nax=ax.set(xscale="log",ylim=(1e-15,1),xlim=(1e3,1e6))\n')),(0,r.kt)("p",null,(0,r.kt)("img",{alt:"png",src:n(1671).Z,width:"712",height:"496"})),(0,r.kt)("p",null,"and that's it! You've run your first UCLCHEM model, checked that the element conservation is correct, and plotted the abundances."))}k.isMDXComponent=!0},1671:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/first_model_9_0-fff8b0e800895dbb0e755cc2b9459720.png"}}]); \ No newline at end of file diff --git a/assets/js/ade0c702.1d88833a.js b/assets/js/ade0c702.1d88833a.js new file mode 100644 index 00000000..fe1da8d5 --- /dev/null +++ b/assets/js/ade0c702.1d88833a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3796],{3905:(a,e,s)=>{s.d(e,{Zo:()=>i,kt:()=>o});var t=s(7294);function m(a,e,s){return e in a?Object.defineProperty(a,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[e]=s,a}function n(a,e){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),s.push.apply(s,t)}return s}function p(a){for(var e=1;e=0||(m[s]=a[s]);return m}(a,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(a,s)&&(m[s]=a[s])}return m}var N=t.createContext({}),l=function(a){var e=t.useContext(N),s=e;return a&&(s="function"==typeof a?a(e):p(p({},e),a)),s},i=function(a){var e=l(a.components);return t.createElement(N.Provider,{value:e},a.children)},k={inlineCode:"code",wrapper:function(a){var e=a.children;return t.createElement(t.Fragment,{},e)}},c=t.forwardRef((function(a,e){var s=a.components,m=a.mdxType,n=a.originalType,N=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),c=l(s),o=m,h=c["".concat(N,".").concat(o)]||c[o]||k[o]||n;return s?t.createElement(h,p(p({ref:e},i),{},{components:s})):t.createElement(h,p({ref:e},i))}));function o(a,e){var s=arguments,m=e&&e.mdxType;if("string"==typeof a||m){var n=s.length,p=new Array(n);p[0]=c;var r={};for(var N in e)hasOwnProperty.call(e,N)&&(r[N]=e[N]);r.originalType=a,r.mdxType="string"==typeof a?a:m,p[1]=r;for(var l=2;l{s.r(e),s.d(e,{assets:()=>i,contentTitle:()=>N,default:()=>o,frontMatter:()=>r,metadata:()=>l,toc:()=>k});var t=s(7462),m=s(3366),n=(s(7294),s(3905)),p=["components"],r={id:"grain",title:"Grain Surface Reactions"},N=void 0,l={unversionedId:"grain",id:"version-v3.3.1/grain",title:"Grain Surface Reactions",description:"Whilst the basic treatment of gas phase chemistry is well established, grain surface chemistry is more complex. There are three possible ways to treat grain surface chemistry in UCLCHEM. In general we assume that:",source:"@site/versioned_docs/version-v3.3.1/chem-grain.md",sourceDirName:".",slug:"/grain",permalink:"/docs/grain",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"grain",title:"Grain Surface Reactions"},sidebar:"docs",previous:{title:"Gas Phase Reactions",permalink:"/docs/gas"},next:{title:"Adsorption & Desorption Reactions",permalink:"/docs/desorb"}},i={},k=[{value:"Langmuir-Hinshelwood Mechanism",id:"langmuir-hinshelwood-mechanism",level:3},{value:"Eley-Rideal Mechanism",id:"eley-rideal-mechanism",level:3}],c={toc:k};function o(a){var e=a.components,s=(0,m.Z)(a,p);return(0,n.kt)("wrapper",(0,t.Z)({},c,s,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Whilst the basic treatment of gas phase chemistry is well established, grain surface chemistry is more complex. There are three possible ways to treat grain surface chemistry in UCLCHEM. In general we assume that:"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"All dust grains are well covered by the species in question so we can take a rate equation approach based on fractional abundance rather than tracking if molecule A is on the same dust grain as molecule B."),(0,n.kt)("li",{parentName:"ul"},"Grains are spherical objects of a uniform size."),(0,n.kt)("li",{parentName:"ul"},"All species are thermalized on the grains.")),(0,n.kt)("p",null,"This allows a fairly straight forward treatment of the grain chemistry. Below we list several processes that are important in UCLCHEM's treatment of the grain chemistry."),(0,n.kt)("h3",{id:"langmuir-hinshelwood-mechanism"},"Langmuir-Hinshelwood Mechanism"),(0,n.kt)("p",null,"Reactions via diffusion of reactants across the grain surface was added to UCLCHEM by ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1093/mnras/stx2960"},"Quenard et al. 2018"),", drawing their formalism from ",(0,n.kt)("a",{parentName:"p",href:"http://adsabs.harvard.edu/doi/10.1086/191713"},"Hasegawa et al. 1992"),", ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1088/0004-637X/735/1/15"},"Garrod & Pauly 2011"),", and ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1093/mnras/stw887"},"Ruaud et al. 2016"),". These reactions can be included in your grain file in the form,"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"#H,#CO,LH,#HCO,,,,alpha,0.0,gamma,,,\n")),(0,n.kt)("p",null,"where alpha is a branching ratio if you include multiple versions of the same reaction and gamma is the energy barrier to the reaction. Including this reaction in your MakeRates input will result in two reactions being created in the actual network: one with gas phase products and one with grain surface products. This is to account for the desorption of products of exothermic reactions and the branching ratio is determined within UCLCHEM using the binding energy of the products and energy released by the reaction following ",(0,n.kt)("a",{parentName:"p",href:"https://www.aanda.org/10.1051/0004-6361/201525981"},"Minissale et al. 2016"),". The equivalent reactions will also be generated for the ice bulk if you are using a three phase network so you only need to list LH reactions with surface reactants and products."),(0,n.kt)("p",null,"If we follow the rate of change of the absolute number of a species on the surface of a grain (",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"S"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_S")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05764em"}},"S")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),"), we get"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s")))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dN_s(i)}{dt} = -\\frac{k_{ij} k_{diff}}{N_{sites}} N_s(i)N_s(j)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.20744em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{ij}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the reaction rate when species i and j are in adjacent sites, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{diff}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the rate at which these species diffuse between sites and ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_{sites}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the number of binding sites on the surface. For reactions in the bulk ice, we multiply the number of sites per layer by the number of mantle layers. If we multiply both sides by the dust concentration, we get the LHS in the standard form of rate of change of concentration and convert one N on the RHS to a concentration. We can also multiply the RHS by ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_d")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),"/",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_d")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," to convert the other N."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d")))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_s(i)}{dt} = -\\frac{k_{ij} k_{diff}}{N_{sites} n_d} n_s(i)n_s(j)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.20744em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"Finally, we want a rate of change of fractional abundance so we can divide through by ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),". Since ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"d")),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"d")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_d = X_d n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))))),", we can also cancel a factor of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," in the RHS."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"N"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"d")))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_s(i)}{dt} = -\\frac{k_{ij} k_{diff}}{N_{sites} X_d} X_s(i)X_s(j)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.20744em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"This is the final rate of change which is sent to the ODE solver. See ",(0,n.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1093/mnras/stx2960"},"Quenard et al. 2018")," for a discussion of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"j")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{ij}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," and ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"K"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"f")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"K_{diff}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07153em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))))))),"."),(0,n.kt)("p",null,"Note, these reactions can become ",(0,n.kt)("em",{parentName:"p"},"very")," fast at high temperatures and will eventually break the integrator with a careful, network depedent choice of tolerances. To avoid this, we stop all grain chemistry at MAX_GRAIN_TEMP in UCLCHEM which is set by default to 150 K. By this temperature, the ice will have almost entirely sublimated and so stopping the chemistry will have a negligible effect on abundances."),(0,n.kt)("h3",{id:"eley-rideal-mechanism"},"Eley-Rideal Mechanism"),(0,n.kt)("p",null,"Reactions that occur when a species colliding with a dust grain lands on a binding site occupied by another reactant are also included in UCLCHEM. They can be included in your grain file in the form,"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"H,#CO,ER,#HCO,,,,alpha,0.0,gamma,,,\n")),(0,n.kt)("p",null,"and produce gas and grain surface products in the same way as the Langmuir-Hinshelwood reactions. These reactions have an ODE of the form"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"r"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"z"),(0,n.kt)("mi",{parentName:"mrow"},"e"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"E")),(0,n.kt)("mi",{parentName:"mfrac"},"T")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_s(i)}{dt} = -k_{i,freeze} \\exp(\\frac{-E}{T}) \\frac{n_s(j)}{n_{s}} n_s(i)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02778em"}},"r"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.04398em"}},"z"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"r"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"z"),(0,n.kt)("mi",{parentName:"mrow"},"e")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{i,freeze}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02778em"}},"r"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.04398em"}},"z"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the freeze out rate of the gas phase reactant (ie the rate at which it collides with the grains), ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"E")),(0,n.kt)("mi",{parentName:"mfrac"},"T")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\exp(\\frac{-E}{T})")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.217331em",verticalAlign:"-0.345em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.872331em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.6550000000000002em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.13889em"}},"T")))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.394em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05764em"}},"E"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.345em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))," is the probability of a reaction occuring given the energy barrier, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_s")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the total concentration of ice species, and therefore ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"s"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"o"),(0,n.kt)("mi",{parentName:"mrow"},"t"),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"l"))))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{n_s(j)}{n_{s,total}}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1.55808em",verticalAlign:"-0.5480799999999999em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.01em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.6550000000000002em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3448em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3487714285714287em",marginLeft:"0em",marginRight:"0.07142857142857144em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.5em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.29011428571428566em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.485em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.16454285714285719em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.357em",marginLeft:"0em",marginRight:"0.07142857142857144em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.5em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.143em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen mtight"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose mtight"},")"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.5480799999999999em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))," is the fraction of surface sites occupied by the surface reactant. This reduces to"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"f"),(0,n.kt)("mi",{parentName:"mrow"},"r"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"z"),(0,n.kt)("mi",{parentName:"mrow"},"e"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"E")),(0,n.kt)("mi",{parentName:"mfrac"},"T")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")"),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("msub",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"s")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mi",{parentName:"mrow"},"i"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_s(i)}{dt} = -k_{i,freeze} \\exp(\\frac{-E}{T}) \\frac{X_s(j)}{X_{s}} X_s(i)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.113em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.263em",verticalAlign:"-0.8360000000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,n.kt)("span",{parentName:"span",className:"mpunct mtight"},","),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10764em"}},"f"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.02778em"}},"r"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.04398em"}},"z"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"e"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.427em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"i"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/af160429.8610352e.js b/assets/js/af160429.8610352e.js deleted file mode 100644 index 3be33d33..00000000 --- a/assets/js/af160429.8610352e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6569],{3905:(e,t,l)=>{l.d(t,{Zo:()=>d,kt:()=>m});var n=l(7294);function r(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}function a(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,n)}return l}function o(e){for(var t=1;t=0||(r[l]=e[l]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}var u=n.createContext({}),i=function(e){var t=n.useContext(u),l=t;return e&&(l="function"==typeof e?e(t):o(o({},t),e)),l},d=function(e){var t=i(e.components);return n.createElement(u.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var l=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),p=i(l),m=r,k=p["".concat(u,".").concat(m)]||p[m]||c[m]||a;return l?n.createElement(k,o(o({ref:t},d),{},{components:l})):n.createElement(k,o({ref:t},d))}));function m(e,t){var l=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=l.length,o=new Array(a);o[0]=p;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s.mdxType="string"==typeof e?e:r,o[1]=s;for(var i=2;i{l.r(t),l.d(t,{assets:()=>d,contentTitle:()=>u,default:()=>m,frontMatter:()=>s,metadata:()=>i,toc:()=>c});var n=l(7462),r=l(3366),a=(l(7294),l(3905)),o=["components"],s={},u="Running a Grid",i={unversionedId:"running_a_grid",id:"version-v3.3.0/running_a_grid",title:"Running a Grid",description:"A common task is to run UCLCHEM over a grid of parameter combinations. This notebook sets up a simple approach to doing so for regular grids.",source:"@site/versioned_docs/version-v3.3.0/running_a_grid.md",sourceDirName:".",slug:"/running_a_grid",permalink:"/docs/running_a_grid",draft:!1,tags:[],version:"v3.3.0",frontMatter:{},sidebar:"docs",previous:{title:"Advanced Physical Modelling",permalink:"/docs/modelling_objects"},next:{title:"Chemical Analysis",permalink:"/docs/chemical_analysis"}},d={},c=[{value:"A Simple Grid",id:"a-simple-grid",level:2},{value:"Define Parameter Space",id:"define-parameter-space",level:3},{value:"Set up the model",id:"set-up-the-model",level:3},{value:"Run Grid",id:"run-grid",level:3},{value:"The Simple Way",id:"the-simple-way",level:4},{value:"The Fast Way",id:"the-fast-way",level:4},{value:"Checking Your Grid",id:"checking-your-grid",level:2},{value:"Complex Grid",id:"complex-grid",level:2},{value:"Summary",id:"summary",level:2}],p={toc:c};function m(e){var t=e.components,l=(0,r.Z)(e,o);return(0,a.kt)("wrapper",(0,n.Z)({},p,l,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"running-a-grid"},"Running a Grid"),(0,a.kt)("p",null,"A common task is to run UCLCHEM over a grid of parameter combinations. This notebook sets up a simple approach to doing so for regular grids."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\nimport numpy as np\nimport pandas as pd\nfrom multiprocessing import Pool\nimport os\n")),(0,a.kt)("h2",{id:"a-simple-grid"},"A Simple Grid"),(0,a.kt)("h3",{id:"define-parameter-space"},"Define Parameter Space"),(0,a.kt)("p",null,"First, we define our parameter space. We do this by using numpy and pandas to produce a table of all possible combinations of some parameters of interest."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'# This part can be substituted with any choice of grid\n#here we just vary the density, temperature and zeta \ntemperatures = np.linspace(10, 50, 3)\ndensities = np.logspace(4,6,3)\nzetas = np.logspace(1, 3, 3)\n\n#meshgrid will give all combinations, then we shape into columns and put into a table\nparameterSpace = np.asarray(np.meshgrid(temperatures,densities,zetas)).reshape(3, -1)\nmodel_table=pd.DataFrame(parameterSpace.T, columns=[\'temperature\',\'density\',\'zeta\'])\n\n#keep track of where each model output will be saved and make sure that folder exists\nmodel_table["outputFile"]=model_table.apply(lambda row: f"../grid_folder/{row.temperature}_{row.density}_{row.zeta}.csv", axis=1)\nprint(f"{model_table.shape[0]} models to run")\nif not os.path.exists("../grid_folder"):\n os.makedirs("../grid_folder")\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"27 models to run\n")),(0,a.kt)("h3",{id:"set-up-the-model"},"Set up the model"),(0,a.kt)("p",null,"Next, we need a function that will run our model. We write a quick function that takes a row from our dataframe and uses it to populate a parameter dictionary for UCLCHEM and then run a cloud model. We can then map our dataframe to that function."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'def run_model(row):\n #basic set of parameters we\'ll use for this grid. \n ParameterDictionary = {"endatfinaldensity":False,\n "freefall": False,\n "initialDens": row.density,\n "initialTemp": row.temperature,\n "zeta": row.zeta,\n "outputFile": row.outputFile,\n "finalTime":1.0e6,\n "baseAv":10}\n result = uclchem.model.cloud(param_dict=ParameterDictionary)\n return result[0]#just the integer error code\n')),(0,a.kt)("h3",{id:"run-grid"},"Run Grid"),(0,a.kt)("h4",{id:"the-simple-way"},"The Simple Way"),(0,a.kt)("p",null,"We can use pandas apply to simply pass each row to our helper function in turn. This will take some time since we're running the models one by one. I'll use the ",(0,a.kt)("inlineCode",{parentName:"p"},"head")," function just to run five rows as an example here."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"result=model_table.head().apply(run_model, axis=1)\n")),(0,a.kt)("h4",{id:"the-fast-way"},"The Fast Way"),(0,a.kt)("p",null,"Alternatively, we can use multiprocessing to run the models in parallel. That will allow us to run many models simulataneously and make use of all the cores available on our machine."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"def pool_func(x):\n i,row=x\n return run_model(row)\n\nwith Pool(processes=6) as pool:\n results = pool.map(pool_func, model_table.iterrows())\n")),(0,a.kt)("h2",{id:"checking-your-grid"},"Checking Your Grid"),(0,a.kt)("p",null,"After running, we should do two things. First, let's add ",(0,a.kt)("inlineCode",{parentName:"p"},"results")," to our dataframe as a new column. Positive results mean a successful UCLCHEM run and negative ones are unsuccessful. Then we can run each model through ",(0,a.kt)("inlineCode",{parentName:"p"},"check_element_conservation")," to check the integration was successful. We'll use both these things to flag models that failed in some way."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"def element_check(output_file):\n df=uclchem.analysis.read_output_file(output_file)\n #get conservation values\n conserves=uclchem.analysis.check_element_conservation(df)\n #check if any error is greater than 1%\n return all([float(x[:-1])<1 for x in conserves.values()])\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'model_table["run_result"]=results\nmodel_table["elements_conserved"]=model_table["outputFile"].map(element_check)\n#check both conditions are met\nmodel_table["Successful"]=(model_table.run_result>=0) & (model_table.elements_conserved)\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"model_table.head()\n")),(0,a.kt)("div",null,(0,a.kt)("table",{border:"1",class:"dataframe"},(0,a.kt)("thead",null,(0,a.kt)("tr",null,(0,a.kt)("th",null),(0,a.kt)("th",null,"temperature"),(0,a.kt)("th",null,"density"),(0,a.kt)("th",null,"zeta"),(0,a.kt)("th",null,"outputFile"),(0,a.kt)("th",null,"run_result"),(0,a.kt)("th",null,"elements_conserved"),(0,a.kt)("th",null,"Successful"))),(0,a.kt)("tbody",null,(0,a.kt)("tr",null,(0,a.kt)("th",null,"0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"../grid_folder/10.0_10000.0_10.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"1"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"100.0"),(0,a.kt)("td",null,"../grid_folder/10.0_10000.0_100.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"2"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"1000.0"),(0,a.kt)("td",null,"../grid_folder/10.0_10000.0_1000.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"3"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"../grid_folder/30.0_10000.0_10.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"4"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"100.0"),(0,a.kt)("td",null,"../grid_folder/30.0_10000.0_100.0.csv"),(0,a.kt)("td",null,"1"),(0,a.kt)("td",null,"True"),(0,a.kt)("td",null,"True"))))),(0,a.kt)("h2",{id:"complex-grid"},"Complex Grid"),(0,a.kt)("p",null,"The above was straightforward enough but what about a modelling a grid of shocks? Not only do we want to loop over relevant parameters, we also need to run a few preliminary models to give ourselves starting abundances. We'll start by defining two helper functions, one to run our preliminary cloud and one to run the shock."),(0,a.kt)("p",null,"Let's further imagine that we want to obtain the abundances of several species at the end of the model. We can use the ",(0,a.kt)("inlineCode",{parentName:"p"},"out_species")," parameter to specify which species we want to track and return them to our dataframe."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'out_species=["CO","H2O","CH3OH"]\n\ndef run_prelim(density):\n #basic set of parameters we\'ll use for this grid. \n ParameterDictionary = {"endatfinaldensity":True,\n "freefall": True,\n "initialDens":1e2,\n "finalDens": density,\n "initialTemp": 10.0,\n "abundSaveFile": f"../grid_folder/starts/{density:.0f}.csv",\n "baseAv":1}\n result = uclchem.model.cloud(param_dict=ParameterDictionary)\n return result\n\ndef run_model(row):\n i,row=row # we know we\'re receiving the iterrows() tuple\n #basic set of parameters we\'ll use for this grid. \n ParameterDictionary = {"endatfinaldensity":False,\n "freefall": False,\n "initialDens": row.density,\n "initialTemp": 10.0,\n "outputFile": row.outputFile,\n "abundLoadFile": f"../grid_folder/starts/{row.density:.0f}.csv",\n "finalTime":1.0e5,\n "abstol_factor":1e-18,\n "reltol":1e-12,\n "baseAv":1}\n result = uclchem.model.cshock(row.shock_velocity,param_dict=ParameterDictionary,out_species=out_species)\n #First check UCLCHEM\'s result flag to seeif it\'s positive, if it is return the abundances\n if result[0]>0:\n return result[:]\n #if not, return NaNs because model failed\n else:\n return([np.nan]*len(out_species))\n')),(0,a.kt)("p",null,"Then we define our parameter space again. We'll create two folders, one to store a set of initial abundances for each starting density in our model and another to store our shock outputs."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'# This part can be substituted with any choice of grid\n# here we just combine various initial and final densities into an easily iterable array\nshock_velocities = np.linspace(10, 50, 3)\ndensities = np.logspace(4,6,3)\n\nparameterSpace = np.asarray(np.meshgrid(shock_velocities,densities)).reshape(2, -1)\nmodel_table=pd.DataFrame(parameterSpace.T, columns=[\'shock_velocity\',\'density\'])\nmodel_table["outputFile"]=model_table.apply(lambda row: f"../grid_folder/shocks/{row.shock_velocity}_{row.density}.csv", axis=1)\nprint(f"{model_table.shape[0]} models to run")\n\nfor folder in ["starts","shocks"]:\n if not os.path.exists(f"../grid_folder/{folder}"):\n os.makedirs(f"../grid_folder/{folder}")\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"9 models to run\n")),(0,a.kt)("p",null,"We can then run our preliminary models followed by our science models. The science models will return the abundances at the final time step of each run so we can unpack those directly to our dataframe."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"with Pool(processes=3) as pool:\n results = pool.map(run_prelim, densities)\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'with Pool(processes=6) as pool:\n results = pool.map(run_model, model_table.iterrows())\nmodel_table[["Result","Dissipation Time"]+out_species]=results\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},"model_table\n")),(0,a.kt)("div",null,(0,a.kt)("table",{border:"1",class:"dataframe"},(0,a.kt)("thead",null,(0,a.kt)("tr",null,(0,a.kt)("th",null),(0,a.kt)("th",null,"shock_velocity"),(0,a.kt)("th",null,"density"),(0,a.kt)("th",null,"outputFile"),(0,a.kt)("th",null,"Result"),(0,a.kt)("th",null,"Dissipation Time"),(0,a.kt)("th",null,"CO"),(0,a.kt)("th",null,"H2O"),(0,a.kt)("th",null,"CH3OH"))),(0,a.kt)("tbody",null,(0,a.kt)("tr",null,(0,a.kt)("th",null,"0"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/10.0_10000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"1171.898734"),(0,a.kt)("td",null,"7.316441e-05"),(0,a.kt)("td",null,"4.355495e-06"),(0,a.kt)("td",null,"4.624479e-07")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"1"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/30.0_10000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"1171.898734"),(0,a.kt)("td",null,"2.591790e-05"),(0,a.kt)("td",null,"2.113885e-05"),(0,a.kt)("td",null,"1.196330e-07")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"2"),(0,a.kt)("td",null,"50.0"),(0,a.kt)("td",null,"10000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/50.0_10000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"1171.898734"),(0,a.kt)("td",null,"1.320822e-05"),(0,a.kt)("td",null,"8.126066e-06"),(0,a.kt)("td",null,"1.989081e-08")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"3"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"100000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/10.0_100000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"117.189873"),(0,a.kt)("td",null,"1.082083e-07"),(0,a.kt)("td",null,"1.158740e-09"),(0,a.kt)("td",null,"3.697607e-10")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"4"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"100000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/30.0_100000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"117.189873"),(0,a.kt)("td",null,"1.121259e-10"),(0,a.kt)("td",null,"3.789106e-10"),(0,a.kt)("td",null,"4.907284e-10")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"5"),(0,a.kt)("td",null,"50.0"),(0,a.kt)("td",null,"100000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/50.0_100000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"117.189873"),(0,a.kt)("td",null,"2.454392e-10"),(0,a.kt)("td",null,"3.443643e-10"),(0,a.kt)("td",null,"6.454671e-10")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"6"),(0,a.kt)("td",null,"10.0"),(0,a.kt)("td",null,"1000000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/10.0_1000000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"11.718987"),(0,a.kt)("td",null,"1.084005e-10"),(0,a.kt)("td",null,"3.565914e-11"),(0,a.kt)("td",null,"4.816630e-11")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"7"),(0,a.kt)("td",null,"30.0"),(0,a.kt)("td",null,"1000000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/30.0_1000000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"11.718987"),(0,a.kt)("td",null,"1.897782e-10"),(0,a.kt)("td",null,"6.498499e-11"),(0,a.kt)("td",null,"7.847277e-12")),(0,a.kt)("tr",null,(0,a.kt)("th",null,"8"),(0,a.kt)("td",null,"50.0"),(0,a.kt)("td",null,"1000000.0"),(0,a.kt)("td",null,"../grid_folder/shocks/50.0_1000000.0.csv"),(0,a.kt)("td",null,"1.0"),(0,a.kt)("td",null,"11.718987"),(0,a.kt)("td",null,"2.167651e-10"),(0,a.kt)("td",null,"6.600196e-12"),(0,a.kt)("td",null,"3.412340e-12"))))),(0,a.kt)("h2",{id:"summary"},"Summary"),(0,a.kt)("p",null,"There are many ways to run grids of models and users will naturally develop their own methods. This notebook is just a simple example of how to run UCLCHEM for many parameter combinations whilst producing a useful output (the model_table) to keep track of all the combinations that were run. In a real script, we'd save the model file to csv at the end."),(0,a.kt)("p",null,"For much larger grids, it's recommended that you find a way to make your script robust to failure. Over a huge range of parameters, it is quite likely UCLCHEM will hit integration trouble for at least a few parameter combinations. Very occasionally, UCLCHEM will get caught in a loop where it fails to integrate and cannot adjust its strategy to manage it. This isn't a problem for small grids as the model can be stopped and the tolerances adjusted. However, for very large grids, you may end up locking all threads as they each get stuck on a different model. The best solution we've found for this case is to add a check so that models in your dataframe are skipped if their file already exists, this allows you to stop and restart the grid script as needed."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b0746780.49d05f02.js b/assets/js/b0746780.49d05f02.js new file mode 100644 index 00000000..0c783e14 --- /dev/null +++ b/assets/js/b0746780.49d05f02.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3601],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),d=c(r),f=o,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||a;return r?n.createElement(m,l(l({ref:t},p),{},{components:r})):n.createElement(m,l({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,l=new Array(a);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:o,l[1]=i;for(var c=2;c{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var n=r(7462),o=r(3366),a=(r(7294),r(3905)),l=["components"],i={id:"physics-collapse",title:"Collapse Models"},s=void 0,c={unversionedId:"physics-collapse",id:"version-v3.3.1/physics-collapse",title:"Collapse Models",description:"Main Contributors: Felix Priestley",source:"@site/versioned_docs/version-v3.3.1/physics-collapse.md",sourceDirName:".",slug:"/physics-collapse",permalink:"/docs/physics-collapse",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"physics-collapse",title:"Collapse Models"},sidebar:"docs",previous:{title:"Shock Models",permalink:"/docs/physics-shocks"},next:{title:"Chemistry",permalink:"/docs/category/chemistry"}},p={},u=[],d={toc:u};function f(e){var t=e.components,r=(0,o.Z)(e,l);return(0,a.kt)("wrapper",(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Main Contributors"),": Felix Priestley"),(0,a.kt)("p",null,"The freefall collapse function used to control the density in most UCLCHEM models is fairly simplistic. ",(0,a.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.3847/1538-3881/aac957"},"Priestley et al. 2018")," created the collapse model which parameterizes the density profile of a collapsing core as a function of time and radius. The following collapse modes are possible:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},'"BE1.1": Bonnor-Ebert sphere, overdensity factor 1.1 (Aikawa+2005)'),(0,a.kt)("li",{parentName:"ul"},'"BE4": Bonnor-Ebert sphere, overdensity factor 4 (Aikawa+2005)'),(0,a.kt)("li",{parentName:"ul"},'"filament": magnetised filament, initially unstable to collapse (Nakamura+1995)'),(0,a.kt)("li",{parentName:"ul"},'"ambipolar": magnetised cloud, initially stable, collapse due to ambipolar diffusion (Fiedler+1993)')))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b1fe966c.7e92a482.js b/assets/js/b1fe966c.7e92a482.js new file mode 100644 index 00000000..8ba6cd61 --- /dev/null +++ b/assets/js/b1fe966c.7e92a482.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7406],{3905:(e,t,o)=>{o.d(t,{Zo:()=>u,kt:()=>h});var n=o(7294);function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function i(e){for(var t=1;t=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):i(i({},t),e)),o},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var o=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=c(o),h=a,m=d["".concat(s,".").concat(h)]||d[h]||p[h]||r;return o?n.createElement(m,i(i({ref:t},u),{},{components:o})):n.createElement(m,i({ref:t},u))}));function h(e,t){var o=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=o.length,i=new Array(r);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var c=2;c{o.r(t),o.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var n=o(7462),a=o(3366),r=(o(7294),o(3905)),i=["components"],l={id:"trouble-compile",title:"Compilation Issues"},s=void 0,c={unversionedId:"trouble-compile",id:"version-v3.3.1/trouble-compile",title:"Compilation Issues",description:"Given that UCLCHEM is supplied as source code, used across many machine types, and is a fairly complex model, things will occasionally go wrong. We've collected here some of the most common problems and hope they resolve most issues.",source:"@site/versioned_docs/version-v3.3.1/trouble-compile.md",sourceDirName:".",slug:"/trouble-compile",permalink:"/docs/trouble-compile",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"trouble-compile",title:"Compilation Issues"},sidebar:"docs",previous:{title:"Chemical Analysis",permalink:"/docs/chemical_analysis"},next:{title:"Integration",permalink:"/docs/trouble-integration"}},u={},p=[{value:"Pip fails",id:"pip-fails",level:2},{value:"Windows Trouble",id:"windows-trouble",level:2},{value:"Mac Trouble",id:"mac-trouble",level:2},{value:"x86 Macs",id:"x86-macs",level:3},{value:"gfortran",id:"gfortran",level:4},{value:"conda-Xcode compatibility",id:"conda-xcode-compatibility",level:4},{value:"Apple silicon Macs",id:"apple-silicon-macs",level:3},{value:"Architectures",id:"architectures",level:2}],d={toc:p};function h(e){var t=e.components,o=(0,a.Z)(e,i);return(0,r.kt)("wrapper",(0,n.Z)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Given that UCLCHEM is supplied as source code, used across many machine types, and is a fairly complex model, things will occasionally go wrong. We've collected here some of the most common problems and hope they resolve most issues."),(0,r.kt)("h2",{id:"pip-fails"},"Pip fails"),(0,r.kt)("p",null,"Pip is a package manager for Python. It is used to install and manage Python packages but we're hijacking its set up process to ask it to compile UCLCHEM. If the compilation goes wrong, the error message is often a bit useless. Please go to ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src")," in your terminal and type ",(0,r.kt)("inlineCode",{parentName:"p"},"make python"),". You will get a more useful error which you can then try to debug or send to the team."),(0,r.kt)("p",null,"Installing via pip may fail if your environment is not set up. Whilst pip will check that you have the necessary python libraries installed, it will not check that you have the necessary compilers. In order to compile you need gfortran which is packaged with the ",(0,r.kt)("a",{parentName:"p",href:"https://gcc.gnu.org/"},"gnu compiler")," suite. You also need make which is part of the GNU toolset. You can likely install these things through your operating system's package manager rather than from their websites."),(0,r.kt)("p",null,"Advanced users who do not wish to change compiler may want to check the Makefile. It can be found in ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/Makefile"),". There are variables to control the choice of compiler, compilation flags and the F2PY flags which tell numpy.f2py which fortran compiler was used. These can all be altered if you do not wish to use gfortran."),(0,r.kt)("h2",{id:"windows-trouble"},"Windows Trouble"),(0,r.kt)("p",null,"UCLCHEM was written on a GNU/Linux machine and therefore makes a lot of assumptions about how your environment is set up. Whilst these assumptions hold for basically all Linux (and most Mac) distributions, Windows users often run into trouble. You can attempt to install a GNU toolset through packages like MinGW but the most straightforward way we've found for Windows users is to use the Windows Subsystem for linux."),(0,r.kt)("p",null,"Open a powershell as an administrator and type ",(0,r.kt)("inlineCode",{parentName:"p"},"wsl --install")," to install the Windows Subsystem for Linux. It will then ask you to reboot. Once you've done this, you'll find Ubuntu in your Windows App Store. Installing this Ubuntu app will give you access to a terminal that is indistinguishable from one running on a Linux system but it will have access to all your Windows files. You can set up your linux environment with all necessary tools:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"sudo apt update\nsudo apt install make\nsudo apt install python3-pip\nsudo apt install gfortran\n")),(0,r.kt)("p",null,"and then you'll find your files in ",(0,r.kt)("inlineCode",{parentName:"p"},"/mnt"),". For example, your C: drive can be accessed via ",(0,r.kt)("inlineCode",{parentName:"p"},"cd /mnt/c"),". With the above tools installed, you'll be able to follow our basic install instructions and run UCLCHEM via your Ubuntu installation."),(0,r.kt)("h2",{id:"mac-trouble"},"Mac Trouble"),(0,r.kt)("p",null,"The troubleshooting for macbooks is divided into troubleshooting for macbooks using x86 architectures (Intel) and apple silicon ARM (M1/M2). You can see which type of chip you have via About This Mac."),(0,r.kt)("h3",{id:"x86-macs"},"x86 Macs"),(0,r.kt)("h4",{id:"gfortran"},"gfortran"),(0,r.kt)("p",null,"A problem Mac users commonly come across is that fortran codes compile but do not run because the gfortran libraries are not in the expected location. If you get an error like:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"Exception has occurred: ImportErrordlopen(/usr/local/lib/python3.9/site-packages/uclchemwrap.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/gcc/lib/gcc/10/libgfortran.5.dylib Referenced from: /usr/local/lib/python3.9/site-packages/uclchemwrap.cpython-39-darwin.so Reason: image not found\n")),(0,r.kt)("p",null,"then this is likely what has happened to you. You can fix it by following the instructions in ",(0,r.kt)("a",{parentName:"p",href:"https://stackoverflow.com/questions/57207357/dyld-library-not-loaded-usr-local-gfortran-lib-libgfortran-3-dylib-reason-im"},"this Stackoverflow post"),". "),(0,r.kt)("p",null,"However, the underlying problem is that Apple would prefer you do not use GNU compilers. As Mac OS updates come in, the exact issue may change. You will usually find many stackoverflow posts about your problem if you search for people having similar errors with gfortran on Mac. Many members of the UCLCHEM group also use Mac so do get in touch if you cannot find a solution.xit"),(0,r.kt)("h4",{id:"conda-xcode-compatibility"},"conda-Xcode compatibility"),(0,r.kt)("p",null,"Sometimes the version of the Xcode SDK is not compatible with the conda packages that are generated with\nan older version. This means you will have to downgrade the SDK you are using as seen in ",(0,r.kt)("a",{parentName:"p",href:"https://stackoverflow.com/questions/69236331/conda-macos-big-sur-ld-unsupported-tapi-file-type-tapi-tbd-in-yaml-file"},"this Stackoverflow post")),(0,r.kt)("h3",{id:"apple-silicon-macs"},"Apple silicon Macs"),(0,r.kt)("p",null,"If you by accident install any package that was meant for x86 architectures (brew, pip, conda etc.) you will encounter problems as Rosetta 2 does not seem to work well with the gfortran.\nCurrently we recommend uninstalling all packages/software that might cause interference with uclchcem, such as gfortran installed via brew and reinstalling everything using conda as listed in the ","[docs/start-basicuse]"," document."),(0,r.kt)("h2",{id:"architectures"},"Architectures"),(0,r.kt)("p",null,"F2PY defaults to x86_64 architecture. This is fine for most users, but if you are using a different architecture, you may need to specify this in the Makefile. To do so, edit ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/Makfile")," so that the line that reads"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"python3 -m numpy.f2py -c --fcompiler=${f2pyFC}\n")),(0,r.kt)("p",null,"is replaced with"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"python3 -m numpy.f2py -c --fcompiler=${f2pyFC} --arch=my_arch\n")),(0,r.kt)("p",null,"where my_arch is the architecture you are using."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b362315f.334402b1.js b/assets/js/b362315f.334402b1.js new file mode 100644 index 00000000..4995a631 --- /dev/null +++ b/assets/js/b362315f.334402b1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[18],{3905:(t,a,e)=>{e.d(a,{Zo:()=>s,kt:()=>N});var n=e(7294);function r(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}function l(t,a){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),e.push.apply(e,n)}return e}function i(t){for(var a=1;a=0||(r[e]=t[e]);return r}(t,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}var p=n.createContext({}),o=function(t){var a=n.useContext(p),e=a;return t&&(e="function"==typeof t?t(a):i(i({},a),t)),e},s=function(t){var a=o(t.components);return n.createElement(p.Provider,{value:a},t.children)},d={inlineCode:"code",wrapper:function(t){var a=t.children;return n.createElement(n.Fragment,{},a)}},u=n.forwardRef((function(t,a){var e=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,s=m(t,["components","mdxType","originalType","parentName"]),u=o(e),N=r,k=u["".concat(p,".").concat(N)]||u[N]||d[N]||l;return e?n.createElement(k,i(i({ref:a},s),{},{components:e})):n.createElement(k,i({ref:a},s))}));function N(t,a){var e=arguments,r=a&&a.mdxType;if("string"==typeof t||r){var l=e.length,i=new Array(l);i[0]=u;var m={};for(var p in a)hasOwnProperty.call(a,p)&&(m[p]=a[p]);m.originalType=t,m.mdxType="string"==typeof t?t:r,i[1]=m;for(var o=2;o{e.r(a),e.d(a,{assets:()=>s,contentTitle:()=>p,default:()=>N,frontMatter:()=>m,metadata:()=>o,toc:()=>d});var n=e(7462),r=e(3366),l=(e(7294),e(3905)),i=["components"],m={id:"parameters",title:"Model Parameters"},p=void 0,o={unversionedId:"parameters",id:"version-v3.3.1/parameters",title:"Model Parameters",description:"UCLCHEM will default to these values unless they are overridden by user. Users can override these by adding the variable name as written here in the paramdict argument of any UCLCHEM model function. paramdict is not case sensitive.",source:"@site/versioned_docs/version-v3.3.1/start-parameters.md",sourceDirName:".",slug:"/parameters",permalink:"/docs/parameters",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"parameters",title:"Model Parameters"},sidebar:"docs",previous:{title:"Creating a Network",permalink:"/docs/network"},next:{title:"Python Reference",permalink:"/docs/pythonapi"}},s={},d=[{value:"Physical Variables",id:"physical-variables",level:2},{value:"Behavioural Controls",id:"behavioural-controls",level:2},{value:"Input and Output",id:"input-and-output",level:2},{value:"Initial Abundances",id:"initial-abundances",level:2},{value:"Integration Controls",id:"integration-controls",level:2},{value:"Here be Dragons",id:"here-be-dragons",level:2}],u={toc:d};function N(t){var a=t.components,e=(0,r.Z)(t,i);return(0,l.kt)("wrapper",(0,n.Z)({},u,e,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"UCLCHEM will default to these values unless they are overridden by user. Users can override these by adding the variable name as written here in the param_dict argument of any UCLCHEM model function. param_dict is not case sensitive."),(0,l.kt)("h2",{id:"physical-variables"},"Physical Variables"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"initialTemp"),(0,l.kt)("td",{parentName:"tr",align:null},"10.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Initial gas temperature in Kelvin for all gas parcels in model.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"initialDens"),(0,l.kt)("td",{parentName:"tr",align:null},"1.00d2"),(0,l.kt)("td",{parentName:"tr",align:null},"Initial gas density in H nuclei per cm",(0,l.kt)("span",{parentName:"td",className:"math math-inline"},(0,l.kt)("span",{parentName:"span",className:"katex"},(0,l.kt)("span",{parentName:"span",className:"katex-mathml"},(0,l.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,l.kt)("semantics",{parentName:"math"},(0,l.kt)("mrow",{parentName:"semantics"},(0,l.kt)("msup",{parentName:"mrow"},(0,l.kt)("mrow",{parentName:"msup"}),(0,l.kt)("mrow",{parentName:"msup"},(0,l.kt)("mo",{parentName:"mrow"},"\u2212"),(0,l.kt)("mn",{parentName:"mrow"},"3")))),(0,l.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,l.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,l.kt)("span",{parentName:"span",className:"base"},(0,l.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,l.kt)("span",{parentName:"span",className:"mord"},(0,l.kt)("span",{parentName:"span"}),(0,l.kt)("span",{parentName:"span",className:"msupsub"},(0,l.kt)("span",{parentName:"span",className:"vlist-t"},(0,l.kt)("span",{parentName:"span",className:"vlist-r"},(0,l.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,l.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,l.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,l.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"3")))))))))))))," for all gas parcels in model.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"finalDens"),(0,l.kt)("td",{parentName:"tr",align:null},"1.00d5"),(0,l.kt)("td",{parentName:"tr",align:null},"Final gas density achieved via freefall.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"currentTime"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Time at start of model in years.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"finalTime"),(0,l.kt)("td",{parentName:"tr",align:null},"5.0d6"),(0,l.kt)("td",{parentName:"tr",align:null},"Time to stop model in years, if not using ",(0,l.kt)("inlineCode",{parentName:"td"},"endAtFinalDensity")," below.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"radfield"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Interstellar radiation field in Habing")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"zeta"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Cosmic ray ionisation rate as multiple of ",(0,l.kt)("span",{parentName:"td",className:"math math-inline"},(0,l.kt)("span",{parentName:"span",className:"katex"},(0,l.kt)("span",{parentName:"span",className:"katex-mathml"},(0,l.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,l.kt)("semantics",{parentName:"math"},(0,l.kt)("mrow",{parentName:"semantics"},(0,l.kt)("mn",{parentName:"mrow"},"1.31"),(0,l.kt)("msup",{parentName:"mrow"},(0,l.kt)("mn",{parentName:"msup"},"0"),(0,l.kt)("mrow",{parentName:"msup"},(0,l.kt)("mo",{parentName:"mrow"},"\u2212"),(0,l.kt)("mn",{parentName:"mrow"},"17"))),(0,l.kt)("msup",{parentName:"mrow"},(0,l.kt)("mi",{parentName:"msup"},"s"),(0,l.kt)("mrow",{parentName:"msup"},(0,l.kt)("mo",{parentName:"mrow"},"\u2212"),(0,l.kt)("mn",{parentName:"mrow"},"1")))),(0,l.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"1.3 10^{-17} s^{-1}")))),(0,l.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,l.kt)("span",{parentName:"span",className:"base"},(0,l.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,l.kt)("span",{parentName:"span",className:"mord"},"1"),(0,l.kt)("span",{parentName:"span",className:"mord"},"."),(0,l.kt)("span",{parentName:"span",className:"mord"},"3"),(0,l.kt)("span",{parentName:"span",className:"mord"},"1"),(0,l.kt)("span",{parentName:"span",className:"mord"},(0,l.kt)("span",{parentName:"span",className:"mord"},"0"),(0,l.kt)("span",{parentName:"span",className:"msupsub"},(0,l.kt)("span",{parentName:"span",className:"vlist-t"},(0,l.kt)("span",{parentName:"span",className:"vlist-r"},(0,l.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,l.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,l.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,l.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"1"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"7"))))))))),(0,l.kt)("span",{parentName:"span",className:"mord"},(0,l.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,l.kt)("span",{parentName:"span",className:"msupsub"},(0,l.kt)("span",{parentName:"span",className:"vlist-t"},(0,l.kt)("span",{parentName:"span",className:"vlist-r"},(0,l.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,l.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,l.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,l.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"rout"),(0,l.kt)("td",{parentName:"tr",align:null},"0.05"),(0,l.kt)("td",{parentName:"tr",align:null},"Outer radius of cloud being modelled in pc.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"rin"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Minimum radial distance from cloud centre to consider.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"baseAv"),(0,l.kt)("td",{parentName:"tr",align:null},"2.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Extinction at cloud edge, Av of a parcel at rout.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"points"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of gas parcels equally spaced between rin to rout to consider")))),(0,l.kt)("h2",{id:"behavioural-controls"},"Behavioural Controls"),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"The following parameters generally turn on or off features of the model. If a parameter is set to ",(0,l.kt)("inlineCode",{parentName:"em"},"True"),", then it is turned on. If it is set to ",(0,l.kt)("inlineCode",{parentName:"em"},"False"),", then it is turned off.")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"freezeFactor"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Modify freeze out rate of gas parcels by this factor.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"endAtFinalDensity"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Choose to end model at final density, otherwise end at final time.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"freefall"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Controls whether models density increaes following freefall equation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"freefallFactor"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Modify freefall rate by factor, usually to slow it.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"desorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Toggles all non-thermal desoprtion processes on or off.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"h2desorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Individually toggle non-thermal desorption due to H2 formation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"crdesorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Individually toggle non-thermal desorption due to cosmic rays.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"uvdesorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Individually toggle non-thermal desorption due to uv photons.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"thermdesorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Toggle continuous thermal desorption.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"instantSublimation"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Toggle instantaneous sublimation of the ices at t")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"cosmicRayAttenuation"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Use column density to attenuate cosmic ray ionisation rate following ",(0,l.kt)("a",{parentName:"td",href:"https://arxiv.org/abs/1803.09348"},"Padovani et al. 2018"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ionModel"),(0,l.kt)("td",{parentName:"tr",align:null},"'L'"),(0,l.kt)("td",{parentName:"tr",align:null},"L/H model for cosmic ray attenuation ",(0,l.kt)("a",{parentName:"td",href:"https://arxiv.org/abs/1803.09348"},"Padovani et al. 2018"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"improvedH2CRPDissociation"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Use H2 CRP dissociation rate from ",(0,l.kt)("a",{parentName:"td",href:"https://arxiv.org/abs/1809.04168"},"Padovani et al. 2018b"),".")))),(0,l.kt)("h2",{id:"input-and-output"},"Input and Output"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"outputFile"),(0,l.kt)("td",{parentName:"tr",align:null},'"output/full.dat"'),(0,l.kt)("td",{parentName:"tr",align:null},"File to write full output of UCLCHEM. This includes physical parameter values and all abundances at every time step.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"columnFile"),(0,l.kt)("td",{parentName:"tr",align:null},'"output/column.dat"'),(0,l.kt)("td",{parentName:"tr",align:null},"File to write specific species abundances, see outSpecies.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"writeStep"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"Writing to columnFile only happens every writeStep timesteps.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abundSaveFile"),(0,l.kt)("td",{parentName:"tr",align:null},"None"),(0,l.kt)("td",{parentName:"tr",align:null},"File to store final abundances at the end of the model so future models can use them as the initial abundances. If not provided, no file will be produced.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abundLoadFile"),(0,l.kt)("td",{parentName:"tr",align:null},"None"),(0,l.kt)("td",{parentName:"tr",align:null},"File from which to load initial abundances for the model, created through ",(0,l.kt)("inlineCode",{parentName:"td"},"abundSaveFile"),". If not provided, the model starts from elemental gas.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"outSpecies"),(0,l.kt)("td",{parentName:"tr",align:null},"None"),(0,l.kt)("td",{parentName:"tr",align:null},"A space separated list of species to output to columnFile. Supplied as a separate list argument to most python functions, see python API docs.")))),(0,l.kt)("h2",{id:"initial-abundances"},"Initial Abundances"),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Unless otherwise specified, we take all abundances from Jenkins et al. 2009, using the heavily depleted case from Table 4.")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"metallicity"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Scale the abundances of all elements heavier than He by this factor.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ion"),(0,l.kt)("td",{parentName:"tr",align:null},"2"),(0,l.kt)("td",{parentName:"tr",align:null},"Sets how much elemental C is initially atomic (0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fh"),(0,l.kt)("td",{parentName:"tr",align:null},"0.5"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of H is always 1 by definition because abundances are relative to number of H nuclei. Use fh to set how much to initially put in atomic H, the rest goes to H2.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fhe"),(0,l.kt)("td",{parentName:"tr",align:null},"0.1"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of He.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fc"),(0,l.kt)("td",{parentName:"tr",align:null},"1.77d-04"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of C.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fo"),(0,l.kt)("td",{parentName:"tr",align:null},"3.34d-04"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of O.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fn"),(0,l.kt)("td",{parentName:"tr",align:null},"6.18d-05"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of N.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fs"),(0,l.kt)("td",{parentName:"tr",align:null},"3.51d-6"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of S.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fmg"),(0,l.kt)("td",{parentName:"tr",align:null},"2.256d-06"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Mg.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fsi"),(0,l.kt)("td",{parentName:"tr",align:null},"1.78d-06"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Si.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fcl"),(0,l.kt)("td",{parentName:"tr",align:null},"3.39d-08"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Cl.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fp"),(0,l.kt)("td",{parentName:"tr",align:null},"7.78d-08"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of P.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ffe"),(0,l.kt)("td",{parentName:"tr",align:null},"2.01d-7"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Fe.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ff"),(0,l.kt)("td",{parentName:"tr",align:null},"3.6d-08"),(0,l.kt)("td",{parentName:"tr",align:null},"fp depleted 1/100 of solar from Asplund 2009.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fd"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"The following elements are not typically used. We do not recommend any particular value.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fli"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Li.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fna"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Na.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fpah"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of PAHs.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"f15n"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of 15N.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"f13c"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of 13C.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"f18O"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of 18O.")))),(0,l.kt)("h2",{id:"integration-controls"},"Integration Controls"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"reltol"),(0,l.kt)("td",{parentName:"tr",align:null},"1d-8"),(0,l.kt)("td",{parentName:"tr",align:null},"Relative tolerance for integration, see ",(0,l.kt)("a",{parentName:"td",href:"/docs/trouble-integration"},"integration docs")," for advice.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abstol_factor"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d-14"),(0,l.kt)("td",{parentName:"tr",align:null},"Absolute tolerance for integration is calculated by multiplying species abundance by this factor.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abstol_min"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d-25"),(0,l.kt)("td",{parentName:"tr",align:null},"Minimum value absolute tolerances can take.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"MXSTEP"),(0,l.kt)("td",{parentName:"tr",align:null},"10000"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum steps allowed in integration before warning is thrown.")))),(0,l.kt)("h2",{id:"here-be-dragons"},"Here be Dragons"),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"These are not recommended to be changed unless you know what you are doing")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ebmaxh2"),(0,l.kt)("td",{parentName:"tr",align:null},"1.21d3"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum binding energy of species desorbed by H2 formation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ebmaxcr"),(0,l.kt)("td",{parentName:"tr",align:null},"1.21d3"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum binding energy of species desorbed by cosmic ray ionisation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ebmaxuvcr"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d4"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum binding energy of species desorbed by UV photons.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"epsilon"),(0,l.kt)("td",{parentName:"tr",align:null},"0.01"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of molecules desorbed per H2 formation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"uv_yield"),(0,l.kt)("td",{parentName:"tr",align:null},"0.1"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of molecules desorbed per UV photon.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"phi"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d5"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of molecules desorbed per cosmic ray ionisation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"uvcreff"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d-3"),(0,l.kt)("td",{parentName:"tr",align:null},"Ratio of CR induced UV photons to ISRF UV photons.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"omega"),(0,l.kt)("td",{parentName:"tr",align:null},"0.5"),(0,l.kt)("td",{parentName:"tr",align:null},"Dust grain albedo.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"alpha"),(0,l.kt)("td",{parentName:"tr",align:null},"{1:0.0,2:0.0}"),(0,l.kt)("td",{parentName:"tr",align:null},"Set alpha coeffecients of reactions using a python dictionary where keys are reaction numbers and values are the coefficients. Once you do this, you cannot return to the default value in the same python script or without restarting the kernel in iPython. See the chemistry docs for how alpha is used for each reaction type.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"beta"),(0,l.kt)("td",{parentName:"tr",align:null},"{1:0.0,2:0.0}"),(0,l.kt)("td",{parentName:"tr",align:null},"Set beta coeffecients of reactions using a python dictionary where keys are reaction numbers and values are the coefficients. Once you do this, you cannot return to the default value in the same python script or without restarting the kernel in iPython. See the chemistry docs for how beta is used for each reaction type.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"gama"),(0,l.kt)("td",{parentName:"tr",align:null},"{1:0.0,2:0.0}"),(0,l.kt)("td",{parentName:"tr",align:null},"Set gama coeffecients of reactions using a python dictionary where keys are reaction numbers and values are the coefficients. Once you do this, you cannot return to the default value in the same python script or without restarting the kernel in iPython. See the chemistry docs for how gama is used for each reaction type.")))))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b67b3120.295d1dad.js b/assets/js/b67b3120.295d1dad.js new file mode 100644 index 00000000..b38409b3 --- /dev/null +++ b/assets/js/b67b3120.295d1dad.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5518],{3905:(a,e,s)=>{s.d(e,{Zo:()=>i,kt:()=>k});var t=s(7294);function n(a,e,s){return e in a?Object.defineProperty(a,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[e]=s,a}function m(a,e){var s=Object.keys(a);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(a);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),s.push.apply(s,t)}return s}function p(a){for(var e=1;e=0||(n[s]=a[s]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(a,s)&&(n[s]=a[s])}return n}var l=t.createContext({}),N=function(a){var e=t.useContext(l),s=e;return a&&(s="function"==typeof a?a(e):p(p({},e),a)),s},i=function(a){var e=N(a.components);return t.createElement(l.Provider,{value:e},a.children)},c={inlineCode:"code",wrapper:function(a){var e=a.children;return t.createElement(t.Fragment,{},e)}},o=t.forwardRef((function(a,e){var s=a.components,n=a.mdxType,m=a.originalType,l=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),o=N(s),k=n,h=o["".concat(l,".").concat(k)]||o[k]||c[k]||m;return s?t.createElement(h,p(p({ref:e},i),{},{components:s})):t.createElement(h,p({ref:e},i))}));function k(a,e){var s=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=s.length,p=new Array(m);p[0]=o;var r={};for(var l in e)hasOwnProperty.call(e,l)&&(r[l]=e[l]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var N=2;N{s.r(e),s.d(e,{assets:()=>i,contentTitle:()=>l,default:()=>k,frontMatter:()=>r,metadata:()=>N,toc:()=>c});var t=s(7462),n=s(3366),m=(s(7294),s(3905)),p=["components"],r={id:"physics-core",title:"Core Physics"},l=void 0,N={unversionedId:"physics-core",id:"version-v3.3.1/physics-core",title:"Core Physics",description:"Each of the other physics doc pages details the specifics of a particular physics model. This one gives a general overview of the physics in UCLCHEM, including the core physics routines that are called for all models.",source:"@site/versioned_docs/version-v3.3.1/physics-core.md",sourceDirName:".",slug:"/physics-core",permalink:"/docs/physics-core",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"physics-core",title:"Core Physics"},sidebar:"docs",previous:{title:"Integration",permalink:"/docs/trouble-integration"},next:{title:"Core Physics",permalink:"/docs/physics-core"}},i={},c=[{value:"Model dimensions",id:"model-dimensions",level:2},{value:"Core Physics Processes",id:"core-physics-processes",level:2},{value:"Freefall",id:"freefall",level:3},{value:"Column density",id:"column-density",level:3}],o={toc:c};function k(a){var e=a.components,s=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,t.Z)({},o,s,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("p",null,"Each of the other physics doc pages details the specifics of a particular physics model. This one gives a general overview of the physics in UCLCHEM, including the core physics routines that are called for all models."),(0,m.kt)("h2",{id:"model-dimensions"},"Model dimensions"),(0,m.kt)("p",null,"Whilst it is most often used to model a single point, UCLCHEM is a 1D model. For most models, you provide the size of some cloud of gas (",(0,m.kt)("inlineCode",{parentName:"p"},"rout"),") and the number of positions along a 1D cut through this cloud you'd like to model (",(0,m.kt)("inlineCode",{parentName:"p"},"points"),"). UCLCHEM then divides the cloud up into the required number of equally sized segments and then models a point at the inner edge of each segment. In the image below, the user has specified that they would like to model six points between some rin and rout. The cloud has been split into six segments and the dots indicate the exact position at which"),(0,m.kt)("img",{src:"/img/cloud_points.png",width:"600","margin-left":"40%"}),(0,m.kt)("p",null,'The reason we have to specify the exact position of the "point" at which UCLCHEM evaluates the abundances is that it affects the column densities. We start our calculation at the edge (hence point 1 is closest to rout) and use the width of a single segment to calculate the column densities of H2, CO, and C as well as the total column density. This affects the photo-chemistry through UV attenuation and self-shielding. However, it is unlikely a user will model enough points to properly follow the UV chemistry in the low A',(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msub"}),(0,m.kt)("mi",{parentName:"msub"},"V"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_V")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.47833099999999995em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," parts of the cloud, especially since the time dependent nature of the code means it could take some time. If a full 1D calculation becomes really important to you, you may wish to consider a more purpose built PDR solver such as ",(0,m.kt)("a",{parentName:"p",href:"https://uclchem.github.io/3dpdr"},"3D-PDR"),"."),(0,m.kt)("p",null,"A a result, we typically use UCLCHEM to model the cloud as a single point. Once we are far enough into the cloud that the A",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msub"}),(0,m.kt)("mi",{parentName:"msub"},"V"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_V")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.47833099999999995em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is very high, the entire cloud tends to become homogenous in 1D models. Effectively, you can model the entire cloud with Av greater than about 5 as a single point and assume those abundances hold for the entire UV shielded region of the cloud. However, our 1D set up is useful for things like hot cores where the temperature and chemistry is really dominated by the central heating source, for which we treat the radial dependence quite well. You can then get a radial view of the chemistry with just a few points."),(0,m.kt)("h2",{id:"core-physics-processes"},"Core Physics Processes"),(0,m.kt)("h3",{id:"freefall"},"Freefall"),(0,m.kt)("p",null,"Many, but not all, models allow you to allow the gas to increase in density as if the gas begins to collapse under freefall from being stationary at the intial density. You turn this on with the ",(0,m.kt)("inlineCode",{parentName:"p"},"freefall")," toggle and the analytical equation for this is"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"mrow"},"d"),(0,m.kt)("mi",{parentName:"mrow"},"n")),(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"mrow"},"d"),(0,m.kt)("mi",{parentName:"mrow"},"t"))),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"b"),(0,m.kt)("mi",{parentName:"msub"},"c")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("msup",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msup"},"n"),(0,m.kt)("mn",{parentName:"msup"},"4")),(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"3"))),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"["),(0,m.kt)("mn",{parentName:"mrow"},"24"),(0,m.kt)("mi",{parentName:"mrow"},"\u03c0"),(0,m.kt)("mi",{parentName:"mrow"},"G"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"m"),(0,m.kt)("mi",{parentName:"msub"},"H")),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0")),(0,m.kt)("mrow",{parentName:"mrow"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"mfrac"},"n"),(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"3"))),(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"]")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"2")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn}{dt} = b_c \\left(\\frac{n^4}{n_0}\\right)^{\\frac{1}{3}}\\left[24\\pi Gm_Hn_0\\left(\\left(\\frac{n}{n_0}\\right)^{\\frac{1}{3}}-1\\right)\\right]^{\\frac{1}{2}}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"3.3878700000000004em",verticalAlign:"-1.25003em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"b"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},"(")),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.491108em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4"))))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},")"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.8350280000000003em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-4.244008000000001em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"})))))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},"[")),(0,m.kt)("span",{parentName:"span",className:"mord"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord"},"4"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"\u03c0"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"G"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},"(")),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},"(")),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.10756em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.3139999999999996em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8360000000000001em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size3"},")"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.7939200000000002em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-4.2029000000000005em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"})))))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},")"))),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size4"},"]"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"2.1378400000000006em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-4.54682em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"}))))))))))))))),(0,m.kt)("p",null,"this is the rate of change of the number density of H nuclei (that is our density unit) which is passed to the integrator to be intregrated over time along with the abundances. ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"b"),(0,m.kt)("mi",{parentName:"msub"},"c"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"b_c")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.84444em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"b"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is ",(0,m.kt)("inlineCode",{parentName:"p"},"freefallFactor")," in the parameters, a factor used to slow the collapse. ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"n"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_0")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the code's ",(0,m.kt)("inlineCode",{parentName:"p"},"initialDens")," parameter. We stop this collapse at ",(0,m.kt)("inlineCode",{parentName:"p"},"finalDens")," even if the model continues."),(0,m.kt)("h3",{id:"column-density"},"Column density"),(0,m.kt)("p",null,"We calculate the column density for a single point model or for the position closest to the cloud edge in 1D models, by dividing the total size of the cloud by the number of points and multiplying by density."),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"N"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"T"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"t"))),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"r"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("mi",{parentName:"mrow"},"l"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"u"),(0,m.kt)("mi",{parentName:"mrow"},"d"))),(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"N"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"p"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"i"),(0,m.kt)("mi",{parentName:"mrow"},"n"),(0,m.kt)("mi",{parentName:"mrow"},"t"),(0,m.kt)("mi",{parentName:"mrow"},"s")))),(0,m.kt)("mi",{parentName:"mrow"},"n"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,m.kt)("mi",{parentName:"mrow"},"r"),(0,m.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"N_{Tot} = \\frac{r_{cloud}}{N_{points}} n(r)")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.13889em"}},"T"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.079668em",verticalAlign:"-0.972108em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.1075599999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"p"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"n"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,m.kt)("span",{parentName:"span"})))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.02778em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.01968em"}},"l"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"u"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"d"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.972108em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,m.kt)("span",{parentName:"span",className:"mopen"},"("),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r"),(0,m.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,m.kt)("p",null,"For points further in, we simply do the same calculation but then add the column density of the previous point. If we work in from the edge (point 1) to the centre (point N), then we get the cumulative column density. A similar process is followed for the column densities of CO, H2 and C."),(0,m.kt)("p",null,"We can then calculate the Av,"),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("mi",{parentName:"mrow"},"v"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"v"),(0,m.kt)("mn",{parentName:"msub"},"0")),(0,m.kt)("mo",{parentName:"mrow"},"+"),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("msub",{parentName:"mfrac"},(0,m.kt)("mi",{parentName:"msub"},"N"),(0,m.kt)("mrow",{parentName:"msub"},(0,m.kt)("mi",{parentName:"mrow"},"T"),(0,m.kt)("mi",{parentName:"mrow"},"o"),(0,m.kt)("mi",{parentName:"mrow"},"t"))),(0,m.kt)("mrow",{parentName:"mfrac"},(0,m.kt)("mn",{parentName:"mrow"},"1.6"),(0,m.kt)("mo",{parentName:"mrow"},"\xd7"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"21")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"2")))))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"Av = Av_0 + \\frac{N_{Tot}}{1.6 \\times 10^{21} cm^{-2}}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"})))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"+"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.1296600000000003em",verticalAlign:"-0.7693300000000001em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},"."),(0,m.kt)("span",{parentName:"span",className:"mord"},"6"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"\xd7"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.740108em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.9890000000000003em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.740108em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.989em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2"))))))))))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.10903em"}},"N"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.10903em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.13889em"}},"T"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"o"),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.7693300000000001em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"}))))))),(0,m.kt)("p",null,"where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("msub",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msub"},"v"),(0,m.kt)("mn",{parentName:"msub"},"0"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"Av_0")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"0")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,m.kt)("span",{parentName:"span"}))))))))))," is the code's ",(0,m.kt)("inlineCode",{parentName:"p"},"baseAv")," parameter."))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b7364548.cd8f8324.js b/assets/js/b7364548.cd8f8324.js deleted file mode 100644 index 417f40db..00000000 --- a/assets/js/b7364548.cd8f8324.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6742],{3905:(e,t,o)=>{o.d(t,{Zo:()=>u,kt:()=>d});var n=o(7294);function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function i(e){for(var t=1;t=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):i(i({},t),e)),o},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var o=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),h=c(o),d=a,m=h["".concat(s,".").concat(d)]||h[d]||p[d]||r;return o?n.createElement(m,i(i({ref:t},u),{},{components:o})):n.createElement(m,i({ref:t},u))}));function d(e,t){var o=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=o.length,i=new Array(r);i[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var c=2;c{o.r(t),o.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>d,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var n=o(7462),a=o(3366),r=(o(7294),o(3905)),i=["components"],l={id:"trouble-compile",title:"Compilation Issues"},s=void 0,c={unversionedId:"trouble-compile",id:"version-v3.3.0/trouble-compile",title:"Compilation Issues",description:"Given that UCLCHEM is supplied as source code, used across many machine types, and is a fairly complex model, things will occasionally go wrong. We've collected here some of the most common problems and hope they resolve most issues.",source:"@site/versioned_docs/version-v3.3.0/trouble-compile.md",sourceDirName:".",slug:"/trouble-compile",permalink:"/docs/trouble-compile",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"trouble-compile",title:"Compilation Issues"},sidebar:"docs",previous:{title:"Chemical Analysis",permalink:"/docs/chemical_analysis"},next:{title:"Integration",permalink:"/docs/trouble-integration"}},u={},p=[{value:"Pip fails",id:"pip-fails",level:2},{value:"Windows Trouble",id:"windows-trouble",level:2},{value:"Mac Trouble",id:"mac-trouble",level:2},{value:"x86 Macs",id:"x86-macs",level:3},{value:"gfortran",id:"gfortran",level:4},{value:"conda-Xcode compatibility",id:"conda-xcode-compatibility",level:4},{value:"Apple silicon Macs",id:"apple-silicon-macs",level:3},{value:"Architectures",id:"architectures",level:2}],h={toc:p};function d(e){var t=e.components,o=(0,a.Z)(e,i);return(0,r.kt)("wrapper",(0,n.Z)({},h,o,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Given that UCLCHEM is supplied as source code, used across many machine types, and is a fairly complex model, things will occasionally go wrong. We've collected here some of the most common problems and hope they resolve most issues."),(0,r.kt)("h2",{id:"pip-fails"},"Pip fails"),(0,r.kt)("p",null,"Pip is a package manager for Python. It is used to install and manage Python packages but we're hijacking its set up process to ask it to compile UCLCHEM. If the compilation goes wrong, the error message is often a bit useless. Please go to ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src")," in your terminal and type ",(0,r.kt)("inlineCode",{parentName:"p"},"make python"),". You will get a more useful error which you can then try to debug or send to the team."),(0,r.kt)("p",null,"Installing via pip may fail if your environment is not set up. Whilst pip will check that you have the necessary python libraries installed, it will not check that you have the necessary compilers. In order to compile you need gfortran which is packaged with the ",(0,r.kt)("a",{parentName:"p",href:"https://gcc.gnu.org/"},"gnu compiler")," suite. You also need make which is part of the GNU toolset. You can likely install these things through your operating system's package manager rather than from their websites."),(0,r.kt)("p",null,"Advanced users who do not wish to change compiler may want to check the Makefile. It can be found in ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/Makefile"),". There are variables to control the choice of compiler, compilation flags and the F2PY flags which tell numpy.f2py which fortran compiler was used. These can all be altered if you do not wish to use gfortran."),(0,r.kt)("h2",{id:"windows-trouble"},"Windows Trouble"),(0,r.kt)("p",null,"UCLCHEM was written on a GNU/Linux machine and therefore makes a lot of assumptions about how your environment is set up. Whilst these assumptions hold for basically all Linux (and most Mac) distributions, Windows users often run into trouble. You can attempt to install a GNU toolset through packages like MinGW but the most straightforward way we've found for Windows users is to use the Windows Subsystem for linux."),(0,r.kt)("p",null,"Open a powershell as an administrator and type ",(0,r.kt)("inlineCode",{parentName:"p"},"wsl --install")," to install the Windows Subsystem for Linux. It will then ask you to reboot. Once you've done this, you'll find Ubuntu in your Windows App Store. Installing this Ubuntu app will give you access to a terminal that is indistinguishable from one running on a Linux system but it will have access to all your Windows files. You can set up your linux environment with all necessary tools:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"sudo apt update\nsudo apt install make\nsudo apt install python3-pip\nsudo apt install gfortran\n")),(0,r.kt)("p",null,"and then you'll find your files in ",(0,r.kt)("inlineCode",{parentName:"p"},"/mnt"),". For example, your C: drive can be accessed via ",(0,r.kt)("inlineCode",{parentName:"p"},"cd /mnt/c"),". With the above tools installed, you'll be able to follow our basic install instructions and run UCLCHEM via your Ubuntu installation."),(0,r.kt)("h2",{id:"mac-trouble"},"Mac Trouble"),(0,r.kt)("p",null,"The troubleshooting for macbooks is divided into troubleshooting for macbooks using x86 architectures (Intel) and apple silicon ARM (M1/M2). You can see which type of chip you have via About This Mac."),(0,r.kt)("h3",{id:"x86-macs"},"x86 Macs"),(0,r.kt)("h4",{id:"gfortran"},"gfortran"),(0,r.kt)("p",null,"A problem Mac users commonly come across is that fortran codes compile but do not run because the gfortran libraries are not in the expected location. If you get an error like:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"Exception has occurred: ImportErrordlopen(/usr/local/lib/python3.9/site-packages/uclchemwrap.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/gcc/lib/gcc/10/libgfortran.5.dylib Referenced from: /usr/local/lib/python3.9/site-packages/uclchemwrap.cpython-39-darwin.so Reason: image not found\n")),(0,r.kt)("p",null,"then this is likely what has happened to you. You can fix it by following the instructions in ",(0,r.kt)("a",{parentName:"p",href:"https://stackoverflow.com/questions/57207357/dyld-library-not-loaded-usr-local-gfortran-lib-libgfortran-3-dylib-reason-im"},"this Stackoverflow post"),". "),(0,r.kt)("p",null,"However, the underlying problem is that Apple would prefer you do not use GNU compilers. As Mac OS updates come in, the exact issue may change. You will usually find many stackoverflow posts about your problem if you search for people having similar errors with gfortran on Mac. Many members of the UCLCHEM group also use Mac so do get in touch if you cannot find a solution.xit"),(0,r.kt)("h4",{id:"conda-xcode-compatibility"},"conda-Xcode compatibility"),(0,r.kt)("p",null,"Sometimes the version of the Xcode SDK is not compatible with the conda packages that are generated with\nan older version. This means you will have to downgrade the SDK you are using as seen in ",(0,r.kt)("a",{parentName:"p",href:"https://stackoverflow.com/questions/69236331/conda-macos-big-sur-ld-unsupported-tapi-file-type-tapi-tbd-in-yaml-file"},"this Stackoverflow post")),(0,r.kt)("h3",{id:"apple-silicon-macs"},"Apple silicon Macs"),(0,r.kt)("p",null,"If you by accident install any package that was meant for x86 architectures (brew, pip, conda etc.) you will encounter problems as Rosetta 2 does not seem to work well with the gfortran.\nCurrently we recommend uninstalling all packages/software that might cause interference with uclchcem, such as gfortran installed via brew and reinstalling everything using conda as listed in the ","[docs/start-basicuse]"," document."),(0,r.kt)("h2",{id:"architectures"},"Architectures"),(0,r.kt)("p",null,"F2PY defaults to x86_64 architecture. This is fine for most users, but if you are using a different architecture, you may need to specify this in the Makefile. To do so, edit ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/Makfile")," so that the line that reads"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"python3 -m numpy.f2py -c --fcompiler=${f2pyFC}\n")),(0,r.kt)("p",null,"is replaced with"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"python3 -m numpy.f2py -c --fcompiler=${f2pyFC} --arch=my_arch\n")),(0,r.kt)("p",null,"where my_arch is the architecture you are using."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b7893f8f.667ce999.js b/assets/js/b7893f8f.667ce999.js new file mode 100644 index 00000000..908fa7b6 --- /dev/null +++ b/assets/js/b7893f8f.667ce999.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2762],{3905:(a,e,t)=>{t.d(e,{Zo:()=>o,kt:()=>N});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var l=s.createContext({}),i=function(a){var e=s.useContext(l),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},o=function(a){var e=i(a.components);return s.createElement(l.Provider,{value:e},a.children)},c={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},h=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,l=a.parentName,o=r(a,["components","mdxType","originalType","parentName"]),h=i(t),N=n,k=h["".concat(l,".").concat(N)]||h[N]||c[N]||m;return t?s.createElement(k,p(p({ref:e},o),{},{components:t})):s.createElement(k,p({ref:e},o))}));function N(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=h;var r={};for(var l in e)hasOwnProperty.call(e,l)&&(r[l]=e[l]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var i=2;i{t.r(e),t.d(e,{assets:()=>o,contentTitle:()=>l,default:()=>N,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={},l="Advanced Physical Modelling",i={unversionedId:"modelling_objects",id:"version-v3.3.1/modelling_objects",title:"Advanced Physical Modelling",description:"In the previous tutorial, we simply modelled the chemistry of a static cloud for 1 Myr. This is unlikely to meet everybody's modelling needs and UCLCHEM is capable of modelling much more complex environments such as hot cores and shocks. In this tutorial, we model both a hot core and a shock to explore how these models work and to demonstrate the workflow that the UCLCHEM team normally follow.",source:"@site/versioned_docs/version-v3.3.1/modelling_objects.md",sourceDirName:".",slug:"/modelling_objects",permalink:"/docs/modelling_objects",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{},sidebar:"docs",previous:{title:"Running Your First Models",permalink:"/docs/first_model"},next:{title:"Running a Grid",permalink:"/docs/running_a_grid"}},o={},c=[{value:"The Hot Core",id:"the-hot-core",level:2},{value:"Initial Conditions (Phase 1)",id:"initial-conditions-phase-1",level:3},{value:"Running the Science Model (Phase 2)",id:"running-the-science-model-phase-2",level:3},{value:"Checking the Result",id:"checking-the-result",level:3},{value:"Shocks",id:"shocks",level:2},{value:"C-shock",id:"c-shock",level:3},{value:"J-shock",id:"j-shock",level:3}],h={toc:c};function N(a){var e=a.components,r=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},h,r,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("h1",{id:"advanced-physical-modelling"},"Advanced Physical Modelling"),(0,m.kt)("p",null,"In the previous tutorial, we simply modelled the chemistry of a static cloud for 1 Myr. This is unlikely to meet everybody's modelling needs and UCLCHEM is capable of modelling much more complex environments such as hot cores and shocks. In this tutorial, we model both a hot core and a shock to explore how these models work and to demonstrate the workflow that the UCLCHEM team normally follow."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\nimport matplotlib.pyplot as plt\n")),(0,m.kt)("h2",{id:"the-hot-core"},"The Hot Core"),(0,m.kt)("h3",{id:"initial-conditions-phase-1"},"Initial Conditions (Phase 1)"),(0,m.kt)("p",null,"UCLCHEM typically starts with the gas in atomic/ionic form with no molecules. However, this clearly is not appropriate when modelling an object such as a hot core. In these objects, the gas is already evolved and there should be molecules in the gas phase as well as ice mantles on the dust. To allow for this, one must provide some initial abundances to the model. There are many ways to do this but we typically chose to run a preliminary model to produce our abundances. In many UCLCHEM papers, we refer to the preliminary model as ",(0,m.kt)("em",{parentName:"p"},"phase 1")," and the science model as ",(0,m.kt)("em",{parentName:"p"},"phase 2"),". Phase 1 simply models a collapsing cloud and phase 2 models the object in question."),(0,m.kt)("p",null,"To do this, we will use ",(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.model.cloud()")," to run a model where a cloud of gas collapses from a density of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"2")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^2 cm^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))))))))))))," to our hot core density of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"6")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^6 cm^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"6")))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))),", keeping all other parameters constant. During this collapse, chemistry will occur and we can assume the final abundances of this model will be reasonable starting abundances for the hot core. "),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'# set a parameter dictionary for cloud collapse model\nparam_dict = {\n "endAtFinalDensity": False,#stop at finalTime\n "freefall": True,#increase density in freefall\n "initialDens": 1e2, #starting density\n "finalDens":1e6, #final density\n "initialTemp": 10.0,#temperature of gas\n "finalTime": 6.0e6, #final time\n "rout":0.1, #radius of cloud in pc\n "baseAv":1.0, #visual extinction at cloud edge.\n "abundSaveFile": "../examples/test-output/startcollapse.dat",#save final abundances to file\n "outputFile":"../examples/test-output/phase1-full.dat"\n\n}\nresult = uclchem.model.cloud(param_dict=param_dict)\nprint(result)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"[1]\n")),(0,m.kt)("p",null,"With that done, we now have a file containing the final abundances of a cloud of gas after this collapse: ",(0,m.kt)("inlineCode",{parentName:"p"},'param_dict["abundSaveFile"]')," we can pass this to our hot core model to use those abundances as our initial abundances."),(0,m.kt)("h3",{id:"running-the-science-model-phase-2"},"Running the Science Model (Phase 2)"),(0,m.kt)("p",null,"We need to change just a few things in ",(0,m.kt)("inlineCode",{parentName:"p"},"param_dict")," to set up the hot core model. The key one is that UCLCHEM saves final abundances to ",(0,m.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," but loads them from ",(0,m.kt)("inlineCode",{parentName:"p"},"abundLoadFile")," so we need to swap that key over to make the abundances we just produced our initial abundances. "),(0,m.kt)("p",null,"We also want to turn off freefall and change how long the model runs for."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'#change other bits of input to set up phase 2\nparam_dict["initialDens"]=1e6\nparam_dict["finalTime"]=1e6\nparam_dict["freefall"]=False\n\n#freeze out is completely overwhelmed by thermal desorption\n#so turning it off has no effect on abundances but speeds up integrator.\nparam_dict["freezeFactor"]=0.0\n\nparam_dict["abstol_factor"]=1e-18\nparam_dict["reltol"]=1e-12\n\n#pop is dangerous, it removes the original key so you can\'t rerun this cell.\nparam_dict["abundLoadFile"]=param_dict.pop("abundSaveFile") \nparam_dict["outputFile"]="../examples/test-output/phase2-full.dat"\n\nresult=uclchem.model.hot_core(temp_indx=3,max_temperature=300.0,param_dict=param_dict)\n')),(0,m.kt)("p",null,"Note that we've changed made two changes to the parameters here which aren't strictly necessary but can be helpful in certain situations."),(0,m.kt)("p",null,"Since the gas temperature increases throughout a hot core model, freeze out is much slower than thermal desorption for all but the first few time steps. Turning it off doesn't affect the abundances but will speed up the solution."),(0,m.kt)("p",null,"We also change abstol and reltol here, largely to demonstrate their use. They control the integrator accuracy and whilst making them smaller does slow down successful runs, it can make runs complete that stall completely otherwise or give correct solutions where lower tolerances allow issues like element conservation failure to sneak in. If your code does not complete or element conservation fails, you can change them."),(0,m.kt)("h3",{id:"checking-the-result"},"Checking the Result"),(0,m.kt)("p",null,"With a successful run, we can check the output. We first load the file and check the abundance conservation, then we can plot it up."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'phase2_df=uclchem.analysis.read_output_file("../examples/test-output/phase2-full.dat")\nuclchem.analysis.check_element_conservation(phase2_df)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"{'H': '0.002%', 'N': '0.000%', 'C': '0.000%', 'O': '0.000%'}\n")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'species=["CO","H2O","CH3OH","#CO","#H2O","#CH3OH","@H2O","@CO","@CH3OH"]\n\nfig,[ax,ax2]=plt.subplots(1,2,figsize=(16,9))\nax=uclchem.analysis.plot_species(ax,phase2_df,species)\nsettings=ax.set(yscale="log",xlim=(1e2,1e6),ylim=(1e-10,1e-2),\n xlabel="Time / years", \n ylabel="Fractional Abundance",xscale="log")\n\nax2.plot(phase2_df["Time"],phase2_df["Density"],color="black")\nax2.set(xscale="log")\nax3=ax2.twinx()\nax3.plot(phase2_df["Time"],phase2_df["gasTemp"],color="red")\nax2.set(xlabel="Time / year",ylabel="Density")\nax3.set(ylabel="Temperature",facecolor="red",xlim=(1e2,1e6))\nax3.tick_params(axis=\'y\', colors=\'red\')\n')),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"png",src:t(7384).Z,width:"997",height:"549"})),(0,m.kt)("p",null,"Here, we see the value of running a collapse phase before the science run. Having run a collapse, we start this model with well developed ices and having material in the surface and bulk allows us to properly model the effect of warm up in a hot core. For example, the @CO abundance is ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mo",{parentName:"mrow"},"\u223c"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"4")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\sim10^{-4}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.36687em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"\u223c"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4")))))))))))))," and #CO is ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mo",{parentName:"mrow"},"\u223c"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"6")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\sim10^{-6}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.36687em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"\u223c"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"6"))))))))))))),". As the gas warms to around 30K, the #CO abundance drops drastically as CO's binding energy is such that it is efficiently desorbed from the surface at this temperature. However, the rest of the CO is trapped in the bulk, surrounded by more strongly bound H2O molecules. Thus, the @CO abundance stays high until the gas reaches around 130K, when the H2O molecules are released along with the entire bulk."),(0,m.kt)("h2",{id:"shocks"},"Shocks"),(0,m.kt)("p",null,"Essentially the same process should be followed for shocks. Let's run a C-type and J-type shock through a gas of density ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"4")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^4 cm^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4")))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))),". Again, we first run a simple cloud model to obtain some reasonable starting abundances, then we can run the shocks."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'# set a parameter dictionary for phase 1 collapse model\n\nparam_dict = {\n "endAtFinalDensity": False,#stop at finalTime\n "freefall": True,#increase density in freefall\n "initialDens": 1e2, #starting density\n "finalDens":1e4, #final density\n "initialTemp": 10.0,#temperature of gas\n "finalTime": 6.0e6, #final time\n "rout":0.1, #radius of cloud in pc\n "baseAv":1.0, #visual extinction at cloud edge.\n "abundSaveFile": "../examples/test-output/shockstart.dat",\n}\nresult = uclchem.model.cloud(param_dict=param_dict)\n')),(0,m.kt)("h3",{id:"c-shock"},"C-shock"),(0,m.kt)("p",null,"We'll first run a c-shock. We'll run a 40 km s ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1")))))))))))))," shock through a gas of density ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"4"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^4")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4"))))))))))))," cm ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))),", using the abundances we just produced. Note that c-shock is the only model which returns an additional output in its result list. Not only is the first element the success flag indicating whether UCLCHEM completed, the second element is the dissipation time of the shock. We'll use that time to make our plots look nicer, cutting to a reasonable time. You can also obtain it from ",(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.utils.cshock_dissipation_time()"),"."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'#change other bits of input to set up phase 2\nparam_dict["initialDens"]=1e4\nparam_dict["finalTime"]=1e6\nif "abundSaveFile" in param_dict:\n param_dict.pop("abundSaveFile")\nparam_dict["abundLoadFile"]="../examples/test-output/shockstart.dat"\nparam_dict["outputFile"]="../examples/test-output/cshock.dat"\n\n\nresult=uclchem.model.cshock(shock_vel=40,param_dict=param_dict)\nresult,dissipation_time=result\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"}," Cannot have freefall on during cshock\n setting freefall=0 and continuing\n")),(0,m.kt)("p",null,"The code completes fine. We do get a couple of warnings though. First, we're informed that ",(0,m.kt)("inlineCode",{parentName:"p"},"freefall")," must be set to False for the C-shock model. Then we get a few integrator warnings. These are not important and can be ignored as long as the element conservation looks ok. However, it is an indication that the integrator did struggle with these ODEs under these conditions."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'phase2_df=uclchem.analysis.read_output_file("../examples/test-output/cshock.dat")\nuclchem.analysis.check_element_conservation(phase2_df)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"{'H': '0.005%', 'N': '1.167%', 'C': '1.394%', 'O': '1.326%'}\n")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'species=["CO","H2O","CH3OH","NH3","$CO","$H2O","$CH3OH","$NH3"]\n\nfig,[ax,ax2]=plt.subplots(1,2,figsize=(16,9))\nax=uclchem.analysis.plot_species(ax,phase2_df,species)\nsettings=ax.set(yscale="log",xlim=(1,20*dissipation_time),ylim=(1e-10,1e-2),\n xlabel="Time / years", \n ylabel="Fractional Abundance",xscale="log")\n\nax2.plot(phase2_df["Time"],phase2_df["Density"],color="black")\nax2.set(xscale="log")\nax3=ax2.twinx()\nax3.plot(phase2_df["Time"],phase2_df["gasTemp"],color="red")\nax2.set(xlabel="Time / year",ylabel="Density")\nax3.set(ylabel="Temperature",facecolor="red",xlim=(1,20*dissipation_time))\nax3.tick_params(axis=\'y\', colors=\'red\')\n')),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"png",src:t(4490).Z,width:"1003",height:"544"})),(0,m.kt)("h3",{id:"j-shock"},"J-shock"),(0,m.kt)("p",null,"Running a j-shock is a simple case of changing function. We'll run a 10 km s ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1")))))))))))))," shock through a gas of density ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"3"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^3")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))," cm ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))))))))))))," gas this time. Note that nothing stops us using the intial abundances we produced for the c-shock. UCLCHEM will not check that the initial density matches the density of the ",(0,m.kt)("inlineCode",{parentName:"p"},"abundLoadFile"),". It may not always be a good idea to do this but we should remember the intial abundances really are just a rough approximation."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'param_dict["initialDens"]=1e3\nparam_dict["freefall"]=False #lets remember to turn it off this time\nparam_dict["reltol"]=1e-12\n\nshock_vel=10.0\n\nif "abundSaveFile" in param_dict:\n param_dict.pop("abundSaveFile")\nparam_dict["abundLoadFile"]="../examples/test-output/shockstart.dat"\nparam_dict["outputFile"]="../examples/test-output/jshock.dat"\n\n\nresult=uclchem.model.jshock(shock_vel=shock_vel,param_dict=param_dict)\n')),(0,m.kt)("p",null,"This time, we've turned off the freefall option and made reltol a little more stringent. The j-shock ends up running a bit slower but we get no warnings on this run."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'phase2_df=uclchem.analysis.read_output_file(param_dict["outputFile"])\nuclchem.analysis.check_element_conservation(phase2_df)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"{'H': '0.003%', 'N': '0.000%', 'C': '0.000%', 'O': '0.000%'}\n")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'species=["CO","H2O","CH3OH","NH3","$CO","$H2O","$CH3OH","$NH3"]\n\nfig,[ax,ax2]=plt.subplots(1,2,figsize=(16,9))\nax=uclchem.analysis.plot_species(ax,phase2_df,species)\nsettings=ax.set(yscale="log",xlim=(1e-7,1e6),ylim=(1e-10,1e-2),\n xlabel="Time / years", \n ylabel="Fractional Abundance",xscale="log")\n\nax2.plot(phase2_df["Time"],phase2_df["Density"],color="black")\nax2.set(xscale="log",yscale="log")\nax3=ax2.twinx()\nax3.plot(phase2_df["Time"],phase2_df["gasTemp"],color="red")\nax2.set(xlabel="Time / year",ylabel="Density")\nax3.set(ylabel="Temperature",facecolor="red",xlim=(1e-7,1e6))\nax3.tick_params(axis=\'y\', colors=\'red\')\n')),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"png",src:t(9187).Z,width:"1003",height:"544"})),(0,m.kt)("p",null,"That's everything! We've run various science models using reasonable starting abundances that we produced by running a simple UCLCHEM model beforehand. One benefit of this method is that the abundances are consistent with the network. If we start with arbitrary, perhaps observationally motivated, abundances, it would be possible to initiate the model in a state our network could never produce. "),(0,m.kt)("p",null,"However, one should be aware of the limitations of this method. A freefall collapse from low density to high is not really how a molecular cloud forms and so the abundances are only approximately similar to values they'd truly have in a real cloud. Testing whether your results are sensitive to things like the time you run the preliminary for or the exact density is a good way to make sure these approximations are not problematic."),(0,m.kt)("p",null,"Bear in mind that you can use ",(0,m.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," and ",(0,m.kt)("inlineCode",{parentName:"p"},"abundLoadFile")," in the same model run. This lets you chain model runs together. For example, you could run a c-shock from a cloud model as we did here and then a j-shock with the c-shock's abundances as the initial abundances."))}N.isMDXComponent=!0},4490:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/modelling_objects_16_0-9cbaa39ecfd8914850efea6f9894f3c9.png"},9187:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/modelling_objects_21_0-9d690606580c74f3f2490e2e8b1ce4b4.png"},7384:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/modelling_objects_8_0-cb8bd1ad21dbba5c26281d2a988b2cfa.png"}}]); \ No newline at end of file diff --git a/assets/js/bad762d9.569937ab.js b/assets/js/bad762d9.569937ab.js deleted file mode 100644 index bc7f30c8..00000000 --- a/assets/js/bad762d9.569937ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7042],{3905:(t,a,e)=>{e.d(a,{Zo:()=>s,kt:()=>N});var n=e(7294);function r(t,a,e){return a in t?Object.defineProperty(t,a,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[a]=e,t}function l(t,a){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),e.push.apply(e,n)}return e}function i(t){for(var a=1;a=0||(r[e]=t[e]);return r}(t,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}var p=n.createContext({}),o=function(t){var a=n.useContext(p),e=a;return t&&(e="function"==typeof t?t(a):i(i({},a),t)),e},s=function(t){var a=o(t.components);return n.createElement(p.Provider,{value:a},t.children)},d={inlineCode:"code",wrapper:function(t){var a=t.children;return n.createElement(n.Fragment,{},a)}},u=n.forwardRef((function(t,a){var e=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,s=m(t,["components","mdxType","originalType","parentName"]),u=o(e),N=r,k=u["".concat(p,".").concat(N)]||u[N]||d[N]||l;return e?n.createElement(k,i(i({ref:a},s),{},{components:e})):n.createElement(k,i({ref:a},s))}));function N(t,a){var e=arguments,r=a&&a.mdxType;if("string"==typeof t||r){var l=e.length,i=new Array(l);i[0]=u;var m={};for(var p in a)hasOwnProperty.call(a,p)&&(m[p]=a[p]);m.originalType=t,m.mdxType="string"==typeof t?t:r,i[1]=m;for(var o=2;o{e.r(a),e.d(a,{assets:()=>s,contentTitle:()=>p,default:()=>N,frontMatter:()=>m,metadata:()=>o,toc:()=>d});var n=e(7462),r=e(3366),l=(e(7294),e(3905)),i=["components"],m={id:"parameters",title:"Model Parameters"},p=void 0,o={unversionedId:"parameters",id:"version-v3.3.0/parameters",title:"Model Parameters",description:"UCLCHEM will default to these values unless they are overridden by user. Users can override these by adding the variable name as written here in the paramdict argument of any UCLCHEM model function. paramdict is not case sensitive.",source:"@site/versioned_docs/version-v3.3.0/start-parameters.md",sourceDirName:".",slug:"/parameters",permalink:"/docs/parameters",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"parameters",title:"Model Parameters"},sidebar:"docs",previous:{title:"Creating a Network",permalink:"/docs/network"},next:{title:"Python Reference",permalink:"/docs/pythonapi"}},s={},d=[{value:"Physical Variables",id:"physical-variables",level:2},{value:"Behavioural Controls",id:"behavioural-controls",level:2},{value:"Input and Output",id:"input-and-output",level:2},{value:"Initial Abundances",id:"initial-abundances",level:2},{value:"Integration Controls",id:"integration-controls",level:2},{value:"Here be Dragons",id:"here-be-dragons",level:2}],u={toc:d};function N(t){var a=t.components,e=(0,r.Z)(t,i);return(0,l.kt)("wrapper",(0,n.Z)({},u,e,{components:a,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"UCLCHEM will default to these values unless they are overridden by user. Users can override these by adding the variable name as written here in the param_dict argument of any UCLCHEM model function. param_dict is not case sensitive."),(0,l.kt)("h2",{id:"physical-variables"},"Physical Variables"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"initialTemp"),(0,l.kt)("td",{parentName:"tr",align:null},"10.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Initial gas temperature in Kelvin for all gas parcels in model.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"initialDens"),(0,l.kt)("td",{parentName:"tr",align:null},"1.00d2"),(0,l.kt)("td",{parentName:"tr",align:null},"Initial gas density in H nuclei per cm",(0,l.kt)("span",{parentName:"td",className:"math math-inline"},(0,l.kt)("span",{parentName:"span",className:"katex"},(0,l.kt)("span",{parentName:"span",className:"katex-mathml"},(0,l.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,l.kt)("semantics",{parentName:"math"},(0,l.kt)("mrow",{parentName:"semantics"},(0,l.kt)("msup",{parentName:"mrow"},(0,l.kt)("mrow",{parentName:"msup"}),(0,l.kt)("mrow",{parentName:"msup"},(0,l.kt)("mo",{parentName:"mrow"},"\u2212"),(0,l.kt)("mn",{parentName:"mrow"},"3")))),(0,l.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,l.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,l.kt)("span",{parentName:"span",className:"base"},(0,l.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,l.kt)("span",{parentName:"span",className:"mord"},(0,l.kt)("span",{parentName:"span"}),(0,l.kt)("span",{parentName:"span",className:"msupsub"},(0,l.kt)("span",{parentName:"span",className:"vlist-t"},(0,l.kt)("span",{parentName:"span",className:"vlist-r"},(0,l.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,l.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,l.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,l.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"3")))))))))))))," for all gas parcels in model.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"finalDens"),(0,l.kt)("td",{parentName:"tr",align:null},"1.00d5"),(0,l.kt)("td",{parentName:"tr",align:null},"Final gas density achieved via freefall.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"currentTime"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Time at start of model in years.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"finalTime"),(0,l.kt)("td",{parentName:"tr",align:null},"5.0d6"),(0,l.kt)("td",{parentName:"tr",align:null},"Time to stop model in years, if not using ",(0,l.kt)("inlineCode",{parentName:"td"},"endAtFinalDensity")," below.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"radfield"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Interstellar radiation field in Habing")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"zeta"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Cosmic ray ionisation rate as multiple of ",(0,l.kt)("span",{parentName:"td",className:"math math-inline"},(0,l.kt)("span",{parentName:"span",className:"katex"},(0,l.kt)("span",{parentName:"span",className:"katex-mathml"},(0,l.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,l.kt)("semantics",{parentName:"math"},(0,l.kt)("mrow",{parentName:"semantics"},(0,l.kt)("mn",{parentName:"mrow"},"1.31"),(0,l.kt)("msup",{parentName:"mrow"},(0,l.kt)("mn",{parentName:"msup"},"0"),(0,l.kt)("mrow",{parentName:"msup"},(0,l.kt)("mo",{parentName:"mrow"},"\u2212"),(0,l.kt)("mn",{parentName:"mrow"},"17"))),(0,l.kt)("msup",{parentName:"mrow"},(0,l.kt)("mi",{parentName:"msup"},"s"),(0,l.kt)("mrow",{parentName:"msup"},(0,l.kt)("mo",{parentName:"mrow"},"\u2212"),(0,l.kt)("mn",{parentName:"mrow"},"1")))),(0,l.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"1.3 10^{-17} s^{-1}")))),(0,l.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,l.kt)("span",{parentName:"span",className:"base"},(0,l.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,l.kt)("span",{parentName:"span",className:"mord"},"1"),(0,l.kt)("span",{parentName:"span",className:"mord"},"."),(0,l.kt)("span",{parentName:"span",className:"mord"},"3"),(0,l.kt)("span",{parentName:"span",className:"mord"},"1"),(0,l.kt)("span",{parentName:"span",className:"mord"},(0,l.kt)("span",{parentName:"span",className:"mord"},"0"),(0,l.kt)("span",{parentName:"span",className:"msupsub"},(0,l.kt)("span",{parentName:"span",className:"vlist-t"},(0,l.kt)("span",{parentName:"span",className:"vlist-r"},(0,l.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,l.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,l.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,l.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"1"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"7"))))))))),(0,l.kt)("span",{parentName:"span",className:"mord"},(0,l.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,l.kt)("span",{parentName:"span",className:"msupsub"},(0,l.kt)("span",{parentName:"span",className:"vlist-t"},(0,l.kt)("span",{parentName:"span",className:"vlist-r"},(0,l.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,l.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,l.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,l.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,l.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))))),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"rout"),(0,l.kt)("td",{parentName:"tr",align:null},"0.05"),(0,l.kt)("td",{parentName:"tr",align:null},"Outer radius of cloud being modelled in pc.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"rin"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Minimum radial distance from cloud centre to consider.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"baseAv"),(0,l.kt)("td",{parentName:"tr",align:null},"2.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Extinction at cloud edge, Av of a parcel at rout.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"points"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of gas parcels equally spaced between rin to rout to consider")))),(0,l.kt)("h2",{id:"behavioural-controls"},"Behavioural Controls"),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"The following parameters generally turn on or off features of the model. If a parameter is set to ",(0,l.kt)("inlineCode",{parentName:"em"},"True"),", then it is turned on. If it is set to ",(0,l.kt)("inlineCode",{parentName:"em"},"False"),", then it is turned off.")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"freezeFactor"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Modify freeze out rate of gas parcels by this factor.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"endAtFinalDensity"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Choose to end model at final density, otherwise end at final time.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"freefall"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Controls whether models density increaes following freefall equation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"freefallFactor"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Modify freefall rate by factor, usually to slow it.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"desorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Toggles all non-thermal desoprtion processes on or off.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"h2desorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Individually toggle non-thermal desorption due to H2 formation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"crdesorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Individually toggle non-thermal desorption due to cosmic rays.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"uvdesorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Individually toggle non-thermal desorption due to uv photons.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"thermdesorb"),(0,l.kt)("td",{parentName:"tr",align:null},".True."),(0,l.kt)("td",{parentName:"tr",align:null},"Toggle continuous thermal desorption.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"instantSublimation"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Toggle instantaneous sublimation of the ices at t")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"cosmicRayAttenuation"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Use column density to attenuate cosmic ray ionisation rate following ",(0,l.kt)("a",{parentName:"td",href:"https://arxiv.org/abs/1803.09348"},"Padovani et al. 2018"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ionModel"),(0,l.kt)("td",{parentName:"tr",align:null},"'L'"),(0,l.kt)("td",{parentName:"tr",align:null},"L/H model for cosmic ray attenuation ",(0,l.kt)("a",{parentName:"td",href:"https://arxiv.org/abs/1803.09348"},"Padovani et al. 2018"),".")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"improvedH2CRPDissociation"),(0,l.kt)("td",{parentName:"tr",align:null},".False."),(0,l.kt)("td",{parentName:"tr",align:null},"Use H2 CRP dissociation rate from ",(0,l.kt)("a",{parentName:"td",href:"https://arxiv.org/abs/1809.04168"},"Padovani et al. 2018b"),".")))),(0,l.kt)("h2",{id:"input-and-output"},"Input and Output"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"outputFile"),(0,l.kt)("td",{parentName:"tr",align:null},'"output/full.dat"'),(0,l.kt)("td",{parentName:"tr",align:null},"File to write full output of UCLCHEM. This includes physical parameter values and all abundances at every time step.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"columnFile"),(0,l.kt)("td",{parentName:"tr",align:null},'"output/column.dat"'),(0,l.kt)("td",{parentName:"tr",align:null},"File to write specific species abundances, see outSpecies.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"writeStep"),(0,l.kt)("td",{parentName:"tr",align:null},"1"),(0,l.kt)("td",{parentName:"tr",align:null},"Writing to columnFile only happens every writeStep timesteps.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abundSaveFile"),(0,l.kt)("td",{parentName:"tr",align:null},"None"),(0,l.kt)("td",{parentName:"tr",align:null},"File to store final abundances at the end of the model so future models can use them as the initial abundances. If not provided, no file will be produced.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abundLoadFile"),(0,l.kt)("td",{parentName:"tr",align:null},"None"),(0,l.kt)("td",{parentName:"tr",align:null},"File from which to load initial abundances for the model, created through ",(0,l.kt)("inlineCode",{parentName:"td"},"abundSaveFile"),". If not provided, the model starts from elemental gas.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"outSpecies"),(0,l.kt)("td",{parentName:"tr",align:null},"None"),(0,l.kt)("td",{parentName:"tr",align:null},"A space separated list of species to output to columnFile. Supplied as a separate list argument to most python functions, see python API docs.")))),(0,l.kt)("h2",{id:"initial-abundances"},"Initial Abundances"),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"Unless otherwise specified, we take all abundances from Jenkins et al. 2009, using the heavily depleted case from Table 4.")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"metallicity"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Scale the abundances of all elements heavier than He by this factor.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ion"),(0,l.kt)("td",{parentName:"tr",align:null},"2"),(0,l.kt)("td",{parentName:"tr",align:null},"Sets how much elemental C is initially atomic (0")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fh"),(0,l.kt)("td",{parentName:"tr",align:null},"0.5"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of H is always 1 by definition because abundances are relative to number of H nuclei. Use fh to set how much to initially put in atomic H, the rest goes to H2.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fhe"),(0,l.kt)("td",{parentName:"tr",align:null},"0.1"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of He.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fc"),(0,l.kt)("td",{parentName:"tr",align:null},"1.77d-04"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of C.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fo"),(0,l.kt)("td",{parentName:"tr",align:null},"3.34d-04"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of O.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fn"),(0,l.kt)("td",{parentName:"tr",align:null},"6.18d-05"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of N.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fs"),(0,l.kt)("td",{parentName:"tr",align:null},"3.51d-6"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of S.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fmg"),(0,l.kt)("td",{parentName:"tr",align:null},"2.256d-06"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Mg.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fsi"),(0,l.kt)("td",{parentName:"tr",align:null},"1.78d-06"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Si.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fcl"),(0,l.kt)("td",{parentName:"tr",align:null},"3.39d-08"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Cl.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fp"),(0,l.kt)("td",{parentName:"tr",align:null},"7.78d-08"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of P.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ffe"),(0,l.kt)("td",{parentName:"tr",align:null},"2.01d-7"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Fe.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ff"),(0,l.kt)("td",{parentName:"tr",align:null},"3.6d-08"),(0,l.kt)("td",{parentName:"tr",align:null},"fp depleted 1/100 of solar from Asplund 2009.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fd"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"The following elements are not typically used. We do not recommend any particular value.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fli"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Li.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fna"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total elemental abundance of Na.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fpah"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of PAHs.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"f15n"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of 15N.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"f13c"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of 13C.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"f18O"),(0,l.kt)("td",{parentName:"tr",align:null},"0.0"),(0,l.kt)("td",{parentName:"tr",align:null},"Total initial abundance of 18O.")))),(0,l.kt)("h2",{id:"integration-controls"},"Integration Controls"),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"reltol"),(0,l.kt)("td",{parentName:"tr",align:null},"1d-8"),(0,l.kt)("td",{parentName:"tr",align:null},"Relative tolerance for integration, see ",(0,l.kt)("a",{parentName:"td",href:"/docs/trouble-integration"},"integration docs")," for advice.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abstol_factor"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d-14"),(0,l.kt)("td",{parentName:"tr",align:null},"Absolute tolerance for integration is calculated by multiplying species abundance by this factor.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"abstol_min"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d-25"),(0,l.kt)("td",{parentName:"tr",align:null},"Minimum value absolute tolerances can take.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"MXSTEP"),(0,l.kt)("td",{parentName:"tr",align:null},"10000"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum steps allowed in integration before warning is thrown.")))),(0,l.kt)("h2",{id:"here-be-dragons"},"Here be Dragons"),(0,l.kt)("p",null,(0,l.kt)("em",{parentName:"p"},"These are not recommended to be changed unless you know what you are doing")),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,l.kt)("th",{parentName:"tr",align:null},"Default Value"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ebmaxh2"),(0,l.kt)("td",{parentName:"tr",align:null},"1.21d3"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum binding energy of species desorbed by H2 formation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ebmaxcr"),(0,l.kt)("td",{parentName:"tr",align:null},"1.21d3"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum binding energy of species desorbed by cosmic ray ionisation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"ebmaxuvcr"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d4"),(0,l.kt)("td",{parentName:"tr",align:null},"Maximum binding energy of species desorbed by UV photons.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"epsilon"),(0,l.kt)("td",{parentName:"tr",align:null},"0.01"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of molecules desorbed per H2 formation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"uv_yield"),(0,l.kt)("td",{parentName:"tr",align:null},"0.1"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of molecules desorbed per UV photon.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"phi"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d5"),(0,l.kt)("td",{parentName:"tr",align:null},"Number of molecules desorbed per cosmic ray ionisation.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"uvcreff"),(0,l.kt)("td",{parentName:"tr",align:null},"1.0d-3"),(0,l.kt)("td",{parentName:"tr",align:null},"Ratio of CR induced UV photons to ISRF UV photons.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"omega"),(0,l.kt)("td",{parentName:"tr",align:null},"0.5"),(0,l.kt)("td",{parentName:"tr",align:null},"Dust grain albedo.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"alpha"),(0,l.kt)("td",{parentName:"tr",align:null},"{1:0.0,2:0.0}"),(0,l.kt)("td",{parentName:"tr",align:null},"Set alpha coeffecients of reactions using a python dictionary where keys are reaction numbers and values are the coefficients. Once you do this, you cannot return to the default value in the same python script or without restarting the kernel in iPython. See the chemistry docs for how alpha is used for each reaction type.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"beta"),(0,l.kt)("td",{parentName:"tr",align:null},"{1:0.0,2:0.0}"),(0,l.kt)("td",{parentName:"tr",align:null},"Set beta coeffecients of reactions using a python dictionary where keys are reaction numbers and values are the coefficients. Once you do this, you cannot return to the default value in the same python script or without restarting the kernel in iPython. See the chemistry docs for how beta is used for each reaction type.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"gama"),(0,l.kt)("td",{parentName:"tr",align:null},"{1:0.0,2:0.0}"),(0,l.kt)("td",{parentName:"tr",align:null},"Set gama coeffecients of reactions using a python dictionary where keys are reaction numbers and values are the coefficients. Once you do this, you cannot return to the default value in the same python script or without restarting the kernel in iPython. See the chemistry docs for how gama is used for each reaction type.")))))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/bc72a998.96156dda.js b/assets/js/bc72a998.96156dda.js deleted file mode 100644 index cf3954af..00000000 --- a/assets/js/bc72a998.96156dda.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9926],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var i=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=i.createContext({}),c=function(e){var t=i.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return i.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},u=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),h=a,m=u["".concat(s,".").concat(h)]||u[h]||d[h]||r;return n?i.createElement(m,o(o({ref:t},p),{},{components:n})):i.createElement(m,o({ref:t},p))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=u;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var i=n(7462),a=n(3366),r=(n(7294),n(3905)),o=["components"],l={id:"dev-overview",title:"Overview of the Code"},s=void 0,c={unversionedId:"dev-overview",id:"version-v3.3.0/dev-overview",title:"Overview of the Code",description:"The page is designed to give a brief overview of the code's structure. It's less about the scientific justification for the various treatments in the code and more about how the code is segmented and where to look for things.",source:"@site/versioned_docs/version-v3.3.0/dev-overview.md",sourceDirName:".",slug:"/dev-overview",permalink:"/docs/dev-overview",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"dev-overview",title:"Overview of the Code"},sidebar:"docs",previous:{title:"Developer",permalink:"/docs/category/developer"},next:{title:"Writing The Python Interface",permalink:"/docs/dev-python-wrap"}},p={},d=[{value:"Basic Algorithm",id:"basic-algorithm",level:2},{value:"Physics",id:"physics",level:2},{value:"Chemistry",id:"chemistry",level:2},{value:"Constants",id:"constants",level:2}],u={toc:d};function h(e){var t=e.components,n=(0,a.Z)(e,o);return(0,r.kt)("wrapper",(0,i.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The page is designed to give a brief overview of the code's structure. It's less about the scientific justification for the various treatments in the code and more about how the code is segmented and where to look for things."),(0,r.kt)("h2",{id:"basic-algorithm"},"Basic Algorithm"),(0,r.kt)("p",null,"Centering the code on the python wrap has made the underlying algorithm more difficult to follow than in older versions of the code. However, you can more or less see the whole procedure of solving the chemical model in ",(0,r.kt)("inlineCode",{parentName:"p"},"solveAbundances")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/wrap.f90"),". The steps are:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Set all parameters to defaultparameters.f90 values")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Read parameters from the dictionary input")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Initialize physics variables such as column density and model specific values")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Initialize chemical variables like initial abundances")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"While ",(0,r.kt)("inlineCode",{parentName:"p"},"time < finalTime")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"density")," < ",(0,r.kt)("inlineCode",{parentName:"p"},"finalDens")),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"get a new target time"),(0,r.kt)("li",{parentName:"ul"},"update abundances from current time to target time"),(0,r.kt)("li",{parentName:"ul"},"update physics variables to new time"),(0,r.kt)("li",{parentName:"ul"},"Allow physics modules to affect abundances directly (eg to sputter ices)"),(0,r.kt)("li",{parentName:"ul"},"output parameters"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"output final abundances if ",(0,r.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," set."))),(0,r.kt)("p",null,"Exactly what happens in the initialize physics and update physics sections depends on the physical model in question."),(0,r.kt)("h2",{id:"physics"},"Physics"),(0,r.kt)("p",null,"There are a number of physics modules which all implement the same subroutines in different ways. They also all pull from core-physics.f90, a module that contains all the non-optional physics variables. When we initialize or update physics, we first call the initialize/update subroutine from core-physics.f90 and then call it from the physics module. This is achieved by passing the relevant physics module's subroutines to ",(0,r.kt)("inlineCode",{parentName:"p"},"solveAbundances")," from each of the various subroutines in wrap.f90."),(0,r.kt)("p",null,"If you'd like to implement your own physics model, you should try as closely as possible to follow this structure. Since core-physics is always updated first, you can override it with your module. For example, core-physics will calculate the Av and column density in the standard way but you could recalculate your column density in your updatePhysics subroutine to get new behaviour."),(0,r.kt)("h2",{id:"chemistry"},"Chemistry"),(0,r.kt)("p",null,"A large number of the fortran files make up the chemistry module. There's:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"chemistry.f90")," which contains the core chemistry routines and variables."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"rates.f90")," which is actually directly included in ",(0,r.kt)("inlineCode",{parentName:"li"},"chemistry.f90")," and just contains most of the reaction rate calculations"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"surfacereactions.f90")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"photoreactions.f90")," which each contain a lot of the surface or photon chemistry related variables and subroutines. These are often so involved that we just separated them out to avoid overfilling ",(0,r.kt)("inlineCode",{parentName:"li"},"rates.f90"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"odes.f90")," which is generated by MakeRates and is a huge file of ordinary differential equations."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"network.f90")," is also generated by MakeRates and contains lists of things like species names, reaction types, the index of the species that is the nth reactant of each reaction, etc. ",(0,r.kt)("strong",{parentName:"li"},"If you want to store something like the index of a species or reaction, consider having MakeRates add to this file."))),(0,r.kt)("h2",{id:"constants"},"Constants"),(0,r.kt)("p",null,"All constants are defined in ",(0,r.kt)("inlineCode",{parentName:"p"},"constants.f90")," and are accessed by the ",(0,r.kt)("inlineCode",{parentName:"p"},"constants")," module. If you need a physical constant, it's best check if it's here before defining it. There should be no harm at all in importing this module into any other code as it compiles first and nothing is modifiable (eg you can't overwrite the value of ",(0,r.kt)("inlineCode",{parentName:"p"},"PI")," defined in constants.f90)."),(0,r.kt)("p",null,"It's also where we declare ",(0,r.kt)("inlineCode",{parentName:"p"},"dp"),", which allows us to declare real64 variables in the iso standard way. All the ",(0,r.kt)("inlineCode",{parentName:"p"},"real(dp)")," variables you see declared in the code come from this."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c2e3305b.4ec555b7.js b/assets/js/c2e3305b.4ec555b7.js new file mode 100644 index 00000000..71335cc9 --- /dev/null +++ b/assets/js/c2e3305b.4ec555b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4836],{3905:(a,e,t)=>{t.d(e,{Zo:()=>i,kt:()=>o});var s=t(7294);function m(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function n(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(m[t]=a[t]);return m}(a,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(m[t]=a[t])}return m}var N=s.createContext({}),l=function(a){var e=s.useContext(N),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},i=function(a){var e=l(a.components);return s.createElement(N.Provider,{value:e},a.children)},k={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},c=s.forwardRef((function(a,e){var t=a.components,m=a.mdxType,n=a.originalType,N=a.parentName,i=r(a,["components","mdxType","originalType","parentName"]),c=l(t),o=m,h=c["".concat(N,".").concat(o)]||c[o]||k[o]||n;return t?s.createElement(h,p(p({ref:e},i),{},{components:t})):s.createElement(h,p({ref:e},i))}));function o(a,e){var t=arguments,m=e&&e.mdxType;if("string"==typeof a||m){var n=t.length,p=new Array(n);p[0]=c;var r={};for(var N in e)hasOwnProperty.call(e,N)&&(r[N]=e[N]);r.originalType=a,r.mdxType="string"==typeof a?a:m,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>i,contentTitle:()=>N,default:()=>o,frontMatter:()=>r,metadata:()=>l,toc:()=>k});var s=t(7462),m=t(3366),n=(t(7294),t(3905)),p=["components"],r={id:"gas",title:"Gas Phase Reactions"},N=void 0,l={unversionedId:"gas",id:"version-v3.3.1/gas",title:"Gas Phase Reactions",description:"Gas phase ODEs",source:"@site/versioned_docs/version-v3.3.1/chem-gas.md",sourceDirName:".",slug:"/gas",permalink:"/docs/gas",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"gas",title:"Gas Phase Reactions"},sidebar:"docs",previous:{title:"Notation",permalink:"/docs/notation"},next:{title:"Grain Surface Reactions",permalink:"/docs/grain"}},i={},k=[{value:"Gas phase ODEs",id:"gas-phase-odes",level:2},{value:"Reaction Rates",id:"reaction-rates",level:2}],c={toc:k};function o(a){var e=a.components,t=(0,m.Z)(a,p);return(0,n.kt)("wrapper",(0,s.Z)({},c,t,{components:e,mdxType:"MDXLayout"}),(0,n.kt)("h2",{id:"gas-phase-odes"},"Gas phase ODEs"),(0,n.kt)("p",null,"The rate of change of the concentration of a gas phase species due to a single two body reaction is"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mi",{parentName:"mrow"},"k"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"k"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dn_i}{dt} = k_{jk} n_j n_k")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mi",{parentName:"mrow"},"k")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k_{jk}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," is the rate of that reaction in units of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"c"),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msup"},"m"),(0,n.kt)("mn",{parentName:"msup"},"3")),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msup"},"s"),(0,n.kt)("mrow",{parentName:"msup"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mn",{parentName:"mrow"},"1")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"cm^{3} s^{-1}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"s"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))),". Since we work in fractional abundances rather than concentrations, we can remove factors of ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.58056em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))," since ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"n_j=X_jn_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.716668em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.969438em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"j"),(0,n.kt)("mi",{parentName:"mrow"},"k"))),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"j")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"k")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"n"),(0,n.kt)("mi",{parentName:"msub"},"H"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_i}{dt} = k_{jk} X_j X_k n_H")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.980548em",verticalAlign:"-0.286108em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.3361079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.311664em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05724em"}},"j")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.286108em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.33610799999999996em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03148em"}},"k")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.08125em"}},"H")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("p",null,"For reactions between involving only a single body such as ionization by a cosmic ray, we have"),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"t"))),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"k"),(0,n.kt)("mi",{parentName:"msub"},"i")),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"X"),(0,n.kt)("mi",{parentName:"msub"},"i"))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\frac{dX_i}{dt} = k_{i} X_i")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.05744em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.37144em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.84444em",verticalAlign:"-0.15em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03148em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07847em"}},"X"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.31166399999999994em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.07847em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"i")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"}))))))))))),(0,n.kt)("p",null,"The total rate of change of the fractional abundance of a species due to gas phase reactions is then just the sum of these terms for all reactions where it is a product minus the sum of all reactions where it is a reactant."),(0,n.kt)("p",null,"As a rule, any part of a reaction ODE which does not depend on abundance (eg the rate itself) is calculated between timesteps by the subroutine ",(0,n.kt)("inlineCode",{parentName:"p"},"calculateReactionRates")," in ",(0,n.kt)("inlineCode",{parentName:"p"},"rates.f90"),". The abundances are include in the ODE calculation itself so they can be updated between steps by the solver."),(0,n.kt)("h2",{id:"reaction-rates"},"Reaction Rates"),(0,n.kt)("p",null,"Gas phase chemistry in UCLCHEM uses the UMIST12 database. This is a database listing reactants and products with up to three rate constants which we label ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"\u03b2"),(0,n.kt)("mo",{parentName:"mrow",separator:"true"},","),(0,n.kt)("mi",{parentName:"mrow"},"a"),(0,n.kt)("mi",{parentName:"mrow"},"n"),(0,n.kt)("mi",{parentName:"mrow"},"d"),(0,n.kt)("mi",{parentName:"mrow"},"\u03b3")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\alpha, \\beta, and \\gamma")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8888799999999999em",verticalAlign:"-0.19444em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mpunct"},","),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05278em"}},"\u03b2"),(0,n.kt)("span",{parentName:"span",className:"mpunct"},","),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"a"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"n"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"d"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05556em"}},"\u03b3")))))," for thousands of gas phase reactions. We briefly list here the way in which the rates in the above equations are calculated for each reaction type and more information can be found in ",(0,n.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2013A&A...550A..36M/abstract"},"McElroy et al. 2013")),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Two Body Reactions")," use the Kooji-Arrhenius equation."),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"mfrac"},"T"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mn",{parentName:"mrow"},"300"),(0,n.kt)("mi",{parentName:"mrow"},"K"))),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mo",{parentName:"msup",stretchy:"false"},")"),(0,n.kt)("mi",{parentName:"msup"},"\u03b2")),(0,n.kt)("mi",{parentName:"mrow"},"e"),(0,n.kt)("mi",{parentName:"mrow"},"x"),(0,n.kt)("mi",{parentName:"mrow"},"p"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"\u03b3"),(0,n.kt)("mi",{parentName:"mrow",mathvariant:"normal"},"/"),(0,n.kt)("mi",{parentName:"mrow"},"T"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha (\\frac{T}{300K})^\\beta exp(-\\gamma/T)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.04633em",verticalAlign:"-0.686em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"3"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8991079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.1130000000000004em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05278em"}},"\u03b2")))))))),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"e"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"x"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"p"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05556em"}},"\u03b3"),(0,n.kt)("span",{parentName:"span",className:"mord"},"/"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Cosmic Ray Protons")),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mi",{parentName:"mrow"},"\u03b6")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha \\zeta")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8888799999999999em",verticalAlign:"-0.19444em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07378em"}},"\u03b6")))))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"Cosmic Ray induced photons")),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"mfrac"},"T"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mn",{parentName:"mrow"},"300"),(0,n.kt)("mi",{parentName:"mrow"},"K"))),(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mo",{parentName:"msup",stretchy:"false"},")"),(0,n.kt)("mi",{parentName:"msup"},"\u03b2")),(0,n.kt)("mfrac",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"mfrac"},"E"),(0,n.kt)("mrow",{parentName:"mfrac"},(0,n.kt)("mn",{parentName:"mrow"},"1"),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"\u03c9"))),(0,n.kt)("mi",{parentName:"mrow"},"\u03b6")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha (\\frac{T}{300K})^\\beta \\frac{E}{1-\\omega} \\zeta")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"2.1296600000000003em",verticalAlign:"-0.7693300000000001em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"3"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord"},"0"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mclose"},(0,n.kt)("span",{parentName:"span",className:"mclose"},")"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8991079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.1130000000000004em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05278em"}},"\u03b2")))))))),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,n.kt)("span",{parentName:"span",className:"mfrac"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.36033em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord"},"1"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,n.kt)("span",{parentName:"span",className:"mbin"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"\u03c9"))),(0,n.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,n.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05764em"}},"E")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.7693300000000001em"}},(0,n.kt)("span",{parentName:"span"}))))),(0,n.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07378em"}},"\u03b6")))))),(0,n.kt)("p",null,(0,n.kt)("strong",{parentName:"p"},"UV Photons")),(0,n.kt)("div",{className:"math math-display"},(0,n.kt)("span",{parentName:"div",className:"katex-display"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("mo",{parentName:"mrow"},"="),(0,n.kt)("mi",{parentName:"mrow"},"\u03b1"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"F"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"U"),(0,n.kt)("mi",{parentName:"mrow"},"V"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"A"),(0,n.kt)("mi",{parentName:"msub"},"v")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"k = \\alpha F_{UV}\\exp(-kA_v)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.69444em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,n.kt)("span",{parentName:"span",className:"mrel"},"="),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.0037em"}},"\u03b1"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"F"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.13889em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10903em"}},"U"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"v")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))),(0,n.kt)("p",null,"where ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"\u03b6")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\zeta")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8888799999999999em",verticalAlign:"-0.19444em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07378em"}},"\u03b6")))))," is the cosmic ray ionization rate in units of 1.3 10",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"msup"}),(0,n.kt)("mo",{parentName:"msup"},"\u2212")),(0,n.kt)("mn",{parentName:"mrow"},"17")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^-17")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.771331em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span"}),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.771331em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mbin mtight"},"\u2212")))))))),(0,n.kt)("span",{parentName:"span",className:"mord"},"1"),(0,n.kt)("span",{parentName:"span",className:"mord"},"7")))))," s",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msup",{parentName:"mrow"},(0,n.kt)("mrow",{parentName:"msup"}),(0,n.kt)("mrow",{parentName:"msup"},(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mn",{parentName:"mrow"},"1")))),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-1}")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span"}),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))))))))))),", E is the efficiency with which cosmic rays cause ionization, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("mi",{parentName:"mrow"},"\u03c9")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\omega")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"\u03c9")))))," is the dust grain albedo, ",(0,n.kt)("span",{parentName:"p",className:"math math-inline"},(0,n.kt)("span",{parentName:"span",className:"katex"},(0,n.kt)("span",{parentName:"span",className:"katex-mathml"},(0,n.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,n.kt)("semantics",{parentName:"math"},(0,n.kt)("mrow",{parentName:"semantics"},(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"F"),(0,n.kt)("mrow",{parentName:"msub"},(0,n.kt)("mi",{parentName:"mrow"},"U"),(0,n.kt)("mi",{parentName:"mrow"},"V"))),(0,n.kt)("mi",{parentName:"mrow"},"exp"),(0,n.kt)("mo",{parentName:"mrow"},"\u2061"),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},"("),(0,n.kt)("mo",{parentName:"mrow"},"\u2212"),(0,n.kt)("mi",{parentName:"mrow"},"k"),(0,n.kt)("msub",{parentName:"mrow"},(0,n.kt)("mi",{parentName:"msub"},"A"),(0,n.kt)("mi",{parentName:"msub"},"v")),(0,n.kt)("mo",{parentName:"mrow",stretchy:"false"},")")),(0,n.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"F_{UV} \\exp(-kA_v)")))),(0,n.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,n.kt)("span",{parentName:"span",className:"base"},(0,n.kt)("span",{parentName:"span",className:"strut",style:{height:"1em",verticalAlign:"-0.25em"}}),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"F"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.32833099999999993em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.13889em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.10903em"}},"U"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.22222em"}},"V"))))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,n.kt)("span",{parentName:"span",className:"mop"},"exp"),(0,n.kt)("span",{parentName:"span",className:"mopen"},"("),(0,n.kt)("span",{parentName:"span",className:"mord"},"\u2212"),(0,n.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03148em"}},"k"),(0,n.kt)("span",{parentName:"span",className:"mord"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,n.kt)("span",{parentName:"span",className:"msupsub"},(0,n.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,n.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,n.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,n.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,n.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.03588em"}},"v")))),(0,n.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,n.kt)("span",{parentName:"span",className:"vlist-r"},(0,n.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,n.kt)("span",{parentName:"span"})))))),(0,n.kt)("span",{parentName:"span",className:"mclose"},")")))))," is the attenuated UV field."))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/c610bb95.9496d178.js b/assets/js/c610bb95.9496d178.js deleted file mode 100644 index e16af9d0..00000000 --- a/assets/js/c610bb95.9496d178.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2106],{3905:(a,e,t)=>{t.d(e,{Zo:()=>o,kt:()=>N});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var l=s.createContext({}),i=function(a){var e=s.useContext(l),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},o=function(a){var e=i(a.components);return s.createElement(l.Provider,{value:e},a.children)},c={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},h=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,l=a.parentName,o=r(a,["components","mdxType","originalType","parentName"]),h=i(t),N=n,k=h["".concat(l,".").concat(N)]||h[N]||c[N]||m;return t?s.createElement(k,p(p({ref:e},o),{},{components:t})):s.createElement(k,p({ref:e},o))}));function N(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=h;var r={};for(var l in e)hasOwnProperty.call(e,l)&&(r[l]=e[l]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var i=2;i{t.r(e),t.d(e,{assets:()=>o,contentTitle:()=>l,default:()=>N,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={},l="Advanced Physical Modelling",i={unversionedId:"modelling_objects",id:"version-v3.3.0/modelling_objects",title:"Advanced Physical Modelling",description:"In the previous tutorial, we simply modelled the chemistry of a static cloud for 1 Myr. This is unlikely to meet everybody's modelling needs and UCLCHEM is capable of modelling much more complex environments such as hot cores and shocks. In this tutorial, we model both a hot core and a shock to explore how these models work and to demonstrate the workflow that the UCLCHEM team normally follow.",source:"@site/versioned_docs/version-v3.3.0/modelling_objects.md",sourceDirName:".",slug:"/modelling_objects",permalink:"/docs/modelling_objects",draft:!1,tags:[],version:"v3.3.0",frontMatter:{},sidebar:"docs",previous:{title:"Running Your First Models",permalink:"/docs/first_model"},next:{title:"Running a Grid",permalink:"/docs/running_a_grid"}},o={},c=[{value:"The Hot Core",id:"the-hot-core",level:2},{value:"Initial Conditions (Phase 1)",id:"initial-conditions-phase-1",level:3},{value:"Running the Science Model (Phase 2)",id:"running-the-science-model-phase-2",level:3},{value:"Checking the Result",id:"checking-the-result",level:3},{value:"Shocks",id:"shocks",level:2},{value:"C-shock",id:"c-shock",level:3},{value:"J-shock",id:"j-shock",level:3}],h={toc:c};function N(a){var e=a.components,r=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},h,r,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("h1",{id:"advanced-physical-modelling"},"Advanced Physical Modelling"),(0,m.kt)("p",null,"In the previous tutorial, we simply modelled the chemistry of a static cloud for 1 Myr. This is unlikely to meet everybody's modelling needs and UCLCHEM is capable of modelling much more complex environments such as hot cores and shocks. In this tutorial, we model both a hot core and a shock to explore how these models work and to demonstrate the workflow that the UCLCHEM team normally follow."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},"import uclchem\nimport matplotlib.pyplot as plt\n")),(0,m.kt)("h2",{id:"the-hot-core"},"The Hot Core"),(0,m.kt)("h3",{id:"initial-conditions-phase-1"},"Initial Conditions (Phase 1)"),(0,m.kt)("p",null,"UCLCHEM typically starts with the gas in atomic/ionic form with no molecules. However, this clearly is not appropriate when modelling an object such as a hot core. In these objects, the gas is already evolved and there should be molecules in the gas phase as well as ice mantles on the dust. To allow for this, one must provide some initial abundances to the model. There are many ways to do this but we typically chose to run a preliminary model to produce our abundances. In many UCLCHEM papers, we refer to the preliminary model as ",(0,m.kt)("em",{parentName:"p"},"phase 1")," and the science model as ",(0,m.kt)("em",{parentName:"p"},"phase 2"),". Phase 1 simply models a collapsing cloud and phase 2 models the object in question."),(0,m.kt)("p",null,"To do this, we will use ",(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.model.cloud()")," to run a model where a cloud of gas collapses from a density of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"2")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^2 cm^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))))))))))))," to our hot core density of ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"6")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^6 cm^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"6")))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))),", keeping all other parameters constant. During this collapse, chemistry will occur and we can assume the final abundances of this model will be reasonable starting abundances for the hot core. "),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'# set a parameter dictionary for cloud collapse model\nparam_dict = {\n "endAtFinalDensity": False,#stop at finalTime\n "freefall": True,#increase density in freefall\n "initialDens": 1e2, #starting density\n "finalDens":1e6, #final density\n "initialTemp": 10.0,#temperature of gas\n "finalTime": 6.0e6, #final time\n "rout":0.1, #radius of cloud in pc\n "baseAv":1.0, #visual extinction at cloud edge.\n "abundSaveFile": "../examples/test-output/startcollapse.dat",#save final abundances to file\n "outputFile":"../examples/test-output/phase1-full.dat"\n\n}\nresult = uclchem.model.cloud(param_dict=param_dict)\nprint(result)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"[1]\n")),(0,m.kt)("p",null,"With that done, we now have a file containing the final abundances of a cloud of gas after this collapse: ",(0,m.kt)("inlineCode",{parentName:"p"},'param_dict["abundSaveFile"]')," we can pass this to our hot core model to use those abundances as our initial abundances."),(0,m.kt)("h3",{id:"running-the-science-model-phase-2"},"Running the Science Model (Phase 2)"),(0,m.kt)("p",null,"We need to change just a few things in ",(0,m.kt)("inlineCode",{parentName:"p"},"param_dict")," to set up the hot core model. The key one is that UCLCHEM saves final abundances to ",(0,m.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," but loads them from ",(0,m.kt)("inlineCode",{parentName:"p"},"abundLoadFile")," so we need to swap that key over to make the abundances we just produced our initial abundances. "),(0,m.kt)("p",null,"We also want to turn off freefall and change how long the model runs for."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'#change other bits of input to set up phase 2\nparam_dict["initialDens"]=1e6\nparam_dict["finalTime"]=1e6\nparam_dict["freefall"]=False\n\n#freeze out is completely overwhelmed by thermal desorption\n#so turning it off has no effect on abundances but speeds up integrator.\nparam_dict["freezeFactor"]=0.0\n\nparam_dict["abstol_factor"]=1e-18\nparam_dict["reltol"]=1e-12\n\n#pop is dangerous, it removes the original key so you can\'t rerun this cell.\nparam_dict["abundLoadFile"]=param_dict.pop("abundSaveFile") \nparam_dict["outputFile"]="../examples/test-output/phase2-full.dat"\n\nresult=uclchem.model.hot_core(temp_indx=3,max_temperature=300.0,param_dict=param_dict)\n')),(0,m.kt)("p",null,"Note that we've changed made two changes to the parameters here which aren't strictly necessary but can be helpful in certain situations."),(0,m.kt)("p",null,"Since the gas temperature increases throughout a hot core model, freeze out is much slower than thermal desorption for all but the first few time steps. Turning it off doesn't affect the abundances but will speed up the solution."),(0,m.kt)("p",null,"We also change abstol and reltol here, largely to demonstrate their use. They control the integrator accuracy and whilst making them smaller does slow down successful runs, it can make runs complete that stall completely otherwise or give correct solutions where lower tolerances allow issues like element conservation failure to sneak in. If your code does not complete or element conservation fails, you can change them."),(0,m.kt)("h3",{id:"checking-the-result"},"Checking the Result"),(0,m.kt)("p",null,"With a successful run, we can check the output. We first load the file and check the abundance conservation, then we can plot it up."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'phase2_df=uclchem.analysis.read_output_file("../examples/test-output/phase2-full.dat")\nuclchem.analysis.check_element_conservation(phase2_df)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"{'H': '0.002%', 'N': '0.000%', 'C': '0.000%', 'O': '0.000%'}\n")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'species=["CO","H2O","CH3OH","#CO","#H2O","#CH3OH","@H2O","@CO","@CH3OH"]\n\nfig,[ax,ax2]=plt.subplots(1,2,figsize=(16,9))\nax=uclchem.analysis.plot_species(ax,phase2_df,species)\nsettings=ax.set(yscale="log",xlim=(1e2,1e6),ylim=(1e-10,1e-2),\n xlabel="Time / years", \n ylabel="Fractional Abundance",xscale="log")\n\nax2.plot(phase2_df["Time"],phase2_df["Density"],color="black")\nax2.set(xscale="log")\nax3=ax2.twinx()\nax3.plot(phase2_df["Time"],phase2_df["gasTemp"],color="red")\nax2.set(xlabel="Time / year",ylabel="Density")\nax3.set(ylabel="Temperature",facecolor="red",xlim=(1e2,1e6))\nax3.tick_params(axis=\'y\', colors=\'red\')\n')),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"png",src:t(921).Z,width:"997",height:"549"})),(0,m.kt)("p",null,"Here, we see the value of running a collapse phase before the science run. Having run a collapse, we start this model with well developed ices and having material in the surface and bulk allows us to properly model the effect of warm up in a hot core. For example, the @CO abundance is ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mo",{parentName:"mrow"},"\u223c"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"4")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\sim10^{-4}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.36687em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"\u223c"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4")))))))))))))," and #CO is ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mo",{parentName:"mrow"},"\u223c"),(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"6")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"\\sim10^{-6}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.36687em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"\u223c"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"6"))))))))))))),". As the gas warms to around 30K, the #CO abundance drops drastically as CO's binding energy is such that it is efficiently desorbed from the surface at this temperature. However, the rest of the CO is trapped in the bulk, surrounded by more strongly bound H2O molecules. Thus, the @CO abundance stays high until the gas reaches around 130K, when the H2O molecules are released along with the entire bulk."),(0,m.kt)("h2",{id:"shocks"},"Shocks"),(0,m.kt)("p",null,"Essentially the same process should be followed for shocks. Let's run a C-type and J-type shock through a gas of density ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"4")),(0,m.kt)("mi",{parentName:"mrow"},"c"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"m"),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^4 cm^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4")))))))),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"c"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"m"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))),". Again, we first run a simple cloud model to obtain some reasonable starting abundances, then we can run the shocks."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'# set a parameter dictionary for phase 1 collapse model\n\nparam_dict = {\n "endAtFinalDensity": False,#stop at finalTime\n "freefall": True,#increase density in freefall\n "initialDens": 1e2, #starting density\n "finalDens":1e4, #final density\n "initialTemp": 10.0,#temperature of gas\n "finalTime": 6.0e6, #final time\n "rout":0.1, #radius of cloud in pc\n "baseAv":1.0, #visual extinction at cloud edge.\n "abundSaveFile": "../examples/test-output/shockstart.dat",\n}\nresult = uclchem.model.cloud(param_dict=param_dict)\n')),(0,m.kt)("h3",{id:"c-shock"},"C-shock"),(0,m.kt)("p",null,"We'll first run a c-shock. We'll run a 40 km s ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1")))))))))))))," shock through a gas of density ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"4"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^4")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"4"))))))))))))," cm ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))),", using the abundances we just produced. Note that c-shock is the only model which returns an additional output in its result list. Not only is the first element the success flag indicating whether UCLCHEM completed, the second element is the dissipation time of the shock. We'll use that time to make our plots look nicer, cutting to a reasonable time. You can also obtain it from ",(0,m.kt)("inlineCode",{parentName:"p"},"uclchem.utils.cshock_dissipation_time()"),"."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'#change other bits of input to set up phase 2\nparam_dict["initialDens"]=1e4\nparam_dict["finalTime"]=1e6\nif "abundSaveFile" in param_dict:\n param_dict.pop("abundSaveFile")\nparam_dict["abundLoadFile"]="../examples/test-output/shockstart.dat"\nparam_dict["outputFile"]="../examples/test-output/cshock.dat"\n\n\nresult=uclchem.model.cshock(shock_vel=40,param_dict=param_dict)\nresult,dissipation_time=result\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"}," Cannot have freefall on during cshock\n setting freefall=0 and continuing\n")),(0,m.kt)("p",null,"The code completes fine. We do get a couple of warnings though. First, we're informed that ",(0,m.kt)("inlineCode",{parentName:"p"},"freefall")," must be set to False for the C-shock model. Then we get a few integrator warnings. These are not important and can be ignored as long as the element conservation looks ok. However, it is an indication that the integrator did struggle with these ODEs under these conditions."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'phase2_df=uclchem.analysis.read_output_file("../examples/test-output/cshock.dat")\nuclchem.analysis.check_element_conservation(phase2_df)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"{'H': '0.005%', 'N': '1.167%', 'C': '1.394%', 'O': '1.326%'}\n")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'species=["CO","H2O","CH3OH","NH3","$CO","$H2O","$CH3OH","$NH3"]\n\nfig,[ax,ax2]=plt.subplots(1,2,figsize=(16,9))\nax=uclchem.analysis.plot_species(ax,phase2_df,species)\nsettings=ax.set(yscale="log",xlim=(1,20*dissipation_time),ylim=(1e-10,1e-2),\n xlabel="Time / years", \n ylabel="Fractional Abundance",xscale="log")\n\nax2.plot(phase2_df["Time"],phase2_df["Density"],color="black")\nax2.set(xscale="log")\nax3=ax2.twinx()\nax3.plot(phase2_df["Time"],phase2_df["gasTemp"],color="red")\nax2.set(xlabel="Time / year",ylabel="Density")\nax3.set(ylabel="Temperature",facecolor="red",xlim=(1,20*dissipation_time))\nax3.tick_params(axis=\'y\', colors=\'red\')\n')),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"png",src:t(6669).Z,width:"1003",height:"544"})),(0,m.kt)("h3",{id:"j-shock"},"J-shock"),(0,m.kt)("p",null,"Running a j-shock is a simple case of changing function. We'll run a 10 km s ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"1")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-1}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1")))))))))))))," shock through a gas of density ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mn",{parentName:"mrow"},"1"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mn",{parentName:"msup"},"0"),(0,m.kt)("mn",{parentName:"msup"},"3"))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"10^3")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3"))))))))))))," cm ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"}),(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow"},"\u2212"),(0,m.kt)("mn",{parentName:"mrow"},"3")))),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"^{-3}")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.8141079999999999em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span"}),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8141079999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.063em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"\u2212"),(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"3")))))))))))))," gas this time. Note that nothing stops us using the intial abundances we produced for the c-shock. UCLCHEM will not check that the initial density matches the density of the ",(0,m.kt)("inlineCode",{parentName:"p"},"abundLoadFile"),". It may not always be a good idea to do this but we should remember the intial abundances really are just a rough approximation."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'param_dict["initialDens"]=1e3\nparam_dict["freefall"]=False #lets remember to turn it off this time\nparam_dict["reltol"]=1e-12\n\nshock_vel=10.0\n\nif "abundSaveFile" in param_dict:\n param_dict.pop("abundSaveFile")\nparam_dict["abundLoadFile"]="../examples/test-output/shockstart.dat"\nparam_dict["outputFile"]="../examples/test-output/jshock.dat"\n\n\nresult=uclchem.model.jshock(shock_vel=shock_vel,param_dict=param_dict)\n')),(0,m.kt)("p",null,"This time, we've turned off the freefall option and made reltol a little more stringent. The j-shock ends up running a bit slower but we get no warnings on this run."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'phase2_df=uclchem.analysis.read_output_file(param_dict["outputFile"])\nuclchem.analysis.check_element_conservation(phase2_df)\n')),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre"},"{'H': '0.003%', 'N': '0.000%', 'C': '0.000%', 'O': '0.000%'}\n")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-python"},'species=["CO","H2O","CH3OH","NH3","$CO","$H2O","$CH3OH","$NH3"]\n\nfig,[ax,ax2]=plt.subplots(1,2,figsize=(16,9))\nax=uclchem.analysis.plot_species(ax,phase2_df,species)\nsettings=ax.set(yscale="log",xlim=(1e-7,1e6),ylim=(1e-10,1e-2),\n xlabel="Time / years", \n ylabel="Fractional Abundance",xscale="log")\n\nax2.plot(phase2_df["Time"],phase2_df["Density"],color="black")\nax2.set(xscale="log",yscale="log")\nax3=ax2.twinx()\nax3.plot(phase2_df["Time"],phase2_df["gasTemp"],color="red")\nax2.set(xlabel="Time / year",ylabel="Density")\nax3.set(ylabel="Temperature",facecolor="red",xlim=(1e-7,1e6))\nax3.tick_params(axis=\'y\', colors=\'red\')\n')),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"png",src:t(5786).Z,width:"1003",height:"544"})),(0,m.kt)("p",null,"That's everything! We've run various science models using reasonable starting abundances that we produced by running a simple UCLCHEM model beforehand. One benefit of this method is that the abundances are consistent with the network. If we start with arbitrary, perhaps observationally motivated, abundances, it would be possible to initiate the model in a state our network could never produce. "),(0,m.kt)("p",null,"However, one should be aware of the limitations of this method. A freefall collapse from low density to high is not really how a molecular cloud forms and so the abundances are only approximately similar to values they'd truly have in a real cloud. Testing whether your results are sensitive to things like the time you run the preliminary for or the exact density is a good way to make sure these approximations are not problematic."),(0,m.kt)("p",null,"Bear in mind that you can use ",(0,m.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," and ",(0,m.kt)("inlineCode",{parentName:"p"},"abundLoadFile")," in the same model run. This lets you chain model runs together. For example, you could run a c-shock from a cloud model as we did here and then a j-shock with the c-shock's abundances as the initial abundances."))}N.isMDXComponent=!0},6669:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/modelling_objects_16_0-9cbaa39ecfd8914850efea6f9894f3c9.png"},5786:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/modelling_objects_21_0-9d690606580c74f3f2490e2e8b1ce4b4.png"},921:(a,e,t)=>{t.d(e,{Z:()=>s});const s=t.p+"assets/images/modelling_objects_8_0-cb8bd1ad21dbba5c26281d2a988b2cfa.png"}}]); \ No newline at end of file diff --git a/assets/js/c8dbf7c8.86115ef1.js b/assets/js/c8dbf7c8.86115ef1.js new file mode 100644 index 00000000..f20dd43e --- /dev/null +++ b/assets/js/c8dbf7c8.86115ef1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[231],{3905:(e,a,t)=>{t.d(a,{Zo:()=>l,kt:()=>d});var s=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,s)}return t}function i(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var o=s.createContext({}),p=function(e){var a=s.useContext(o),t=a;return e&&(t="function"==typeof e?e(a):i(i({},a),e)),t},l=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},c={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},h=s.forwardRef((function(e,a){var t=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,l=m(e,["components","mdxType","originalType","parentName"]),h=p(t),d=n,k=h["".concat(o,".").concat(d)]||h[d]||c[d]||r;return t?s.createElement(k,i(i({ref:a},l),{},{components:t})):s.createElement(k,i({ref:a},l))}));function d(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var r=t.length,i=new Array(r);i[0]=h;var m={};for(var o in a)hasOwnProperty.call(a,o)&&(m[o]=a[o]);m.originalType=e,m.mdxType="string"==typeof e?e:n,i[1]=m;for(var p=2;p{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>m,metadata:()=>p,toc:()=>c});var s=t(7462),n=t(3366),r=(t(7294),t(3905)),i=["components"],m={id:"physics-shocks",title:"Shock Models"},o=void 0,p={unversionedId:"physics-shocks",id:"version-v3.3.1/physics-shocks",title:"Shock Models",description:"Main Contributors: Izaskun Jimenez-Serra, Tom James, Jon Holdship",source:"@site/versioned_docs/version-v3.3.1/physics-shocks.md",sourceDirName:".",slug:"/physics-shocks",permalink:"/docs/physics-shocks",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"physics-shocks",title:"Shock Models"},sidebar:"docs",previous:{title:"Hot Core",permalink:"/docs/physics-hotcore"},next:{title:"Collapse Models",permalink:"/docs/physics-collapse"}},l={},c=[{value:"Shock Profiles",id:"shock-profiles",level:2},{value:"C-Shocks",id:"c-shocks",level:3},{value:"J-shocks",id:"j-shocks",level:3},{value:"Dimensions",id:"dimensions",level:2},{value:"Sputtering",id:"sputtering",level:2}],h={toc:c};function d(e){var a=e.components,t=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},h,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Main Contributors"),": Izaskun Jimenez-Serra, Tom James, Jon Holdship"),(0,r.kt)("h2",{id:"shock-profiles"},"Shock Profiles"),(0,r.kt)("p",null,"UCLCHEM uses two different shock parameterizations. These provide the physical properties of a gas through time as it is subjected to a shock. Whilst the most accurate MHD shock models solve the chemistry, MHD and radiative transfer problems simulataneously, few of these models include chemistry as detailed as UCLCHEM. We assume that the MHD models on which our parameterizations were validated used detailed enough chemistry that the shock profiles could be accurately calculated. This means that more detailed chemistry can be safely post-processed using UCLCHEM, a parameterization simply means the user can select parameters freely rather than from a preset selection of profiles from another code such as ",(0,r.kt)("a",{parentName:"p",href:"http://cdsads.u-strasbg.fr/abs/2015A&A...578A..63F"},"MHDvode"),"."),(0,r.kt)("h3",{id:"c-shocks"},"C-Shocks"),(0,r.kt)("p",null,"The C-shock is based on the parameterization by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". It parameterizes the density, temperature and velocity profiles of c-shocks as a function of shock velocity, initial gas density and magnetic field. These were validated against the results of the detailed shock modelling of ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1046/j.1365-8711.2003.06716.x"},"Flower et al. 2003"),". Details of it's use can be found in ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.cshock"},"the c-shock function docs"),"."),(0,r.kt)("p",null,"A key value in this model is the dissipation length, which is the distance over which the velocity of the ions and the neutrals equalizes. In some sense, this is the extent of the C-shock, although post-shock cooling does continue for some distance after. The C-shock function will return the dissipation time (see ",(0,r.kt)("a",{parentName:"p",href:"/docs/physics-shocks#dimensions"},"below"),") and will also uses shorter timesteps for a number of years equal to twice the dissipation time in order to fully resolve the shock. The number of these time steps is controlled by an optional parameter."),(0,r.kt)("h3",{id:"j-shocks"},"J-shocks"),(0,r.kt)("p",null,"jshock is a similar parameterization for j-shocks from ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201936536"},"James et al.")," validated against more recent results from MHDvode (",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201525740"},"Flower et al. 2015"),"). See the ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.jshock"},"j-shock function docs")," for details."),(0,r.kt)("h2",{id:"dimensions"},"Dimensions"),(0,r.kt)("p",null,"Both shock models are intended to be run as single point models only and the code will return an error for ",(0,r.kt)("inlineCode",{parentName:"p"},"points > 1"),". However, you can look at the 1D profile of a shock by converting between time and distance. If we assume the shock is stationary, that is that it's structure is unchanged as it moves through a cloud of gas, then the points that are far away in time are the same as those far away in space."),(0,r.kt)("img",{src:"/img/shock.png",width:"600","margin-left":"40%"}),(0,r.kt)("p",null,"As an illustration, as a shock front moves through a cloud and first hits a parcel of gas, this is t=0 in our shock model output. 5000 years later, the shock front has moved on, thus the output of UCLCHEM at t=5000 years is the state of a parcel of gas that was first hit 5000 years ago and is now far behind the shock front."),(0,r.kt)("p",null,"By using the shock velocity, you can translate 5000 years to the distance between the parcel that was shocked 5000 years ago and the parcel that is just being reached by the shock front,"),(0,r.kt)("div",{className:"math math-display"},(0,r.kt)("span",{parentName:"div",className:"katex-display"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("mi",{parentName:"mrow"},"z"),(0,r.kt)("mo",{parentName:"mrow"},"="),(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"v"),(0,r.kt)("mi",{parentName:"msub"},"s")),(0,r.kt)("mi",{parentName:"mrow"},"t")),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"z= v_s t")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.04398em"}},"z"),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,r.kt)("span",{parentName:"span",className:"mrel"},"="),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t")))))),(0,r.kt)("p",null,"Thus the history of a single point in a shocked cloud that is output by UCLCHEM can also be translated to a snapshot of a cloud that covers distance z."),(0,r.kt)("h2",{id:"sputtering"},"Sputtering"),(0,r.kt)("p",null,"The C-shock model uses the sputtering process described by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". Briefly, we calculate the average energy imparted on the grains from a collision between the shocked gas and the grains. We then combine this with the collision rate and average yield for a given energy to calculate the sputtering rate which we integrate through time. In practice, this sputtering is so quick that it happens almost instantaneously at ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"t"),(0,r.kt)("mrow",{parentName:"msub"},(0,r.kt)("mi",{parentName:"mrow"},"s"),(0,r.kt)("mi",{parentName:"mrow"},"a"),(0,r.kt)("mi",{parentName:"mrow"},"t")))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"t_{sat}")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.2805559999999999em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),", the saturation time. This is the time at which the silicon abundance stops increasing in more detailed models, used as a proxy for when the ices are fully sputtered. Thus it is likely that you will see a step change in the ice abundances where sputtering has not occurred yet in one time step and is complete in the second unless your timestep is very small."),(0,r.kt)("p",null,"The J-shock would begin with ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"V"),(0,r.kt)("mi",{parentName:"msub"},"s"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"V_s")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"V"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.22222em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"}))))))))))," as the initial drift velocity of the sputtering routine described above and would instantaneously sputter at t = 0 yr. Furthermore, temperatures typically reach a minimum of 1000 K meaning the thermal sublimation is almost complete. Thus, we do not need to worry about the sputtering process in the J-shock, we simply remove all grain material and add it to the gas at t = 0 yr."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/cf6a431d.aeb14cb1.js b/assets/js/cf6a431d.aeb14cb1.js deleted file mode 100644 index dbaa1f83..00000000 --- a/assets/js/cf6a431d.aeb14cb1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7831],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var o=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=o.createContext({}),c=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return o.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),h=a,m=d["".concat(s,".").concat(h)]||d[h]||u[h]||r;return n?o.createElement(m,i(i({ref:t},p),{},{components:n})):o.createElement(m,i({ref:t},p))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>u});var o=n(7462),a=n(3366),r=(n(7294),n(3905)),i=["components"],l={id:"install",title:"Installation",slug:"/"},s=void 0,c={unversionedId:"install",id:"version-v3.3.0/install",title:"Installation",description:"Prerequisites",source:"@site/versioned_docs/version-v3.3.0/start-basicuse.md",sourceDirName:".",slug:"/",permalink:"/docs/",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"install",title:"Installation",slug:"/"},sidebar:"docs",previous:{title:"Getting Started",permalink:"/docs/category/getting-started"},next:{title:"Creating a Network",permalink:"/docs/network"}},p={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Obtaining UCLCHEM",id:"obtaining-uclchem",level:3},{value:"Software Requirements",id:"software-requirements",level:3},{value:"Apple and Windows",id:"apple-and-windows",level:3},{value:"Apple silicon/M1",id:"apple-siliconm1",level:3},{value:"Apple Intel",id:"apple-intel",level:3},{value:"Installation",id:"installation",level:2},{value:"Checking Your Install",id:"checking-your-install",level:2}],d={toc:u};function h(e){var t=e.components,n=(0,a.Z)(e,i);return(0,r.kt)("wrapper",(0,o.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"prerequisites"},"Prerequisites"),(0,r.kt)("h3",{id:"obtaining-uclchem"},"Obtaining UCLCHEM"),(0,r.kt)("p",null,"You can visit our ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/uclchem/UCLCHEM"},"main page")," to get download links for the code, or ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/uclchem/UCLCHEM"},"our github"),". Alternatively, you can use git to clone the repo directly from terminal."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"git clone https://github.com/uclchem/UCLCHEM.git\n")),(0,r.kt)("h3",{id:"software-requirements"},"Software Requirements"),(0,r.kt)("p",null,"You need to have the following software installed on your machine:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Python 3.x"),(0,r.kt)("li",{parentName:"ul"},"GNU Make"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("a",{parentName:"li",href:"https://gcc.gnu.org/"},"GNU compilers"))),(0,r.kt)("p",null,"You will also need various python libraries but they will be installed if you follow the installation instructions below. Please note, UCLCHEM is installed by calling the ",(0,r.kt)("inlineCode",{parentName:"p"},"python3")," command. If you have Python 3.x but your system only recognizes ",(0,r.kt)("inlineCode",{parentName:"p"},"python")," as the command to use it, you should alias ",(0,r.kt)("inlineCode",{parentName:"p"},"python")," to ",(0,r.kt)("inlineCode",{parentName:"p"},"python3")," or update ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/Makefile")," to use ",(0,r.kt)("inlineCode",{parentName:"p"},"python")," anywhere it says ",(0,r.kt)("inlineCode",{parentName:"p"},"python3"),"."),(0,r.kt)("h3",{id:"apple-and-windows"},"Apple and Windows"),(0,r.kt)("p",null,"Mac users are encourage to use Xcode to get the GNU compilers and Windows users are most likely to have success with the Windows Subsystem for Linux. See our ",(0,r.kt)("a",{parentName:"p",href:"/docs/trouble-compile"},"troubleshooting")," page for more information if you encounter problems. For Mac users with Apple silicon special installations instructions are listed below the regular installation instructions."),(0,r.kt)("h3",{id:"apple-siliconm1"},"Apple silicon/M1"),(0,r.kt)("p",null,"For this use case we recommend the usage of the package manager conda (the installer for the minimal version can be found ",(0,r.kt)("a",{parentName:"p",href:"https://docs.conda.io/en/latest/miniconda.html"},"here"),").\nEnsure that you install the apple silicon/M1 version, together with Xcode."),(0,r.kt)("admonition",{type:"caution"},(0,r.kt)("p",{parentName:"admonition"},"If you are on MacOS Ventura (13.X), you need to use ",(0,r.kt)("inlineCode",{parentName:"p"},"conda install -c conda-forge gfortran=12.2"),". Since at least fortran version 12 is needed for Ventura.")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"conda create -n uclchem_osx\nconda activate uclchem_osx\nconda config --env --set subdir osx-arm64\nconda install python=3.10\nconda install gfortran\n")),(0,r.kt)("p",null,"After this, one can continue with the installation instructions above and install. In order to use\nUCLCHEM in a new terminal session one has to use the command ",(0,r.kt)("inlineCode",{parentName:"p"},"conda activate uclchem_osx"),"."),(0,r.kt)("h3",{id:"apple-intel"},"Apple Intel"),(0,r.kt)("p",null,"Similar instructions as for M1, but now with the x86_64 instruction set. Again this requires Xcode."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"conda create -n uclchem_osx\nconda activate uclchem_osx\nconda config --env --set subdir osx-64\nconda install python=3.9\nconda install clang\nconda install gfortran\n")),(0,r.kt)("p",null,"After this, one can continue with the installation instructions above and install. In order to use\nUCLCHEM in a new terminal session one has to use the command ",(0,r.kt)("inlineCode",{parentName:"p"},"conda activate uclchem_osx"),"."),(0,r.kt)("p",null,"If you encounter further issues please check ",(0,r.kt)("a",{parentName:"p",href:"/docs/trouble-compile"},"troubleshooting"),"."),(0,r.kt)("h2",{id:"installation"},"Installation"),(0,r.kt)("p",null,"UCLCHEM is designed to be compiled to a python library. Despite this, we cannot distribute it as a python package via pypi or similar because the user needs to be able to recompile their own version in order to change the network. The chemical network is hard coded for efficiency so it is not possible to change the network without recompiling."),(0,r.kt)("p",null,"In order to compile UCLCHEM, you will simply need to do the folowing from the main directory of the repository:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd UCLCHEM\npip install -e .\n")),(0,r.kt)("p",null,"This will install the UCLCHEM library into your python environment, you can then import it and use it in your python scripts. If you get an error at this stage, it is very likely you do not have Cmake or gfortran installed. You must do this again every time you use ",(0,r.kt)("a",{parentName:"p",href:"/docs/network"},"Makerates"),"."),(0,r.kt)("p",null,"If it completes without error then, that's it! UCLCHEM is installed. We have tutorials on how to ",(0,r.kt)("a",{parentName:"p",href:"/docs/first_model"},"run your first model")," as well as more complex use cases. The rest of the 'Getting Started' section focuses on creating a network and the various parameters the user can control. "),(0,r.kt)("h2",{id:"checking-your-install"},"Checking Your Install"),(0,r.kt)("p",null,"We provide several ways to get acquainted with the code including a series of ",(0,r.kt)("a",{parentName:"p",href:"/docs/category/tutorials"},"tutorials"),". Alternatively, there are python scripts in ",(0,r.kt)("inlineCode",{parentName:"p"},"scripts/")," that can be used as templates for running your own models and comprehensive documentation on the ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi"},"python API")," and ",(0,r.kt)("a",{parentName:"p",href:"/docs/parameters"},"parameters"),"."),(0,r.kt)("p",null,"However, if you simply want to check whether your new network is working, you can use the ",(0,r.kt)("inlineCode",{parentName:"p"},"scripts/run_uclchem_tests.py")," and ",(0,r.kt)("inlineCode",{parentName:"p"},"scripts/plot_uclchem_tests.py")," scripts. You can find outputs in the ",(0,r.kt)("inlineCode",{parentName:"p"},"examples/")," directory along with an explanation of what this does."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d226c097.a7367494.js b/assets/js/d226c097.32badf8f.js similarity index 99% rename from assets/js/d226c097.a7367494.js rename to assets/js/d226c097.32badf8f.js index b88551b4..f13c8386 100644 --- a/assets/js/d226c097.a7367494.js +++ b/assets/js/d226c097.32badf8f.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8151],{3905:(e,a,t)=>{t.d(a,{Zo:()=>l,kt:()=>d});var s=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,s)}return t}function i(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var o=s.createContext({}),p=function(e){var a=s.useContext(o),t=a;return e&&(t="function"==typeof e?e(a):i(i({},a),e)),t},l=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},c={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},h=s.forwardRef((function(e,a){var t=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,l=m(e,["components","mdxType","originalType","parentName"]),h=p(t),d=n,k=h["".concat(o,".").concat(d)]||h[d]||c[d]||r;return t?s.createElement(k,i(i({ref:a},l),{},{components:t})):s.createElement(k,i({ref:a},l))}));function d(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var r=t.length,i=new Array(r);i[0]=h;var m={};for(var o in a)hasOwnProperty.call(a,o)&&(m[o]=a[o]);m.originalType=e,m.mdxType="string"==typeof e?e:n,i[1]=m;for(var p=2;p{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>m,metadata:()=>p,toc:()=>c});var s=t(7462),n=t(3366),r=(t(7294),t(3905)),i=["components"],m={id:"physics-shocks",title:"Shock Models"},o=void 0,p={unversionedId:"physics-shocks",id:"version-v3.2.0/physics-shocks",title:"Shock Models",description:"Main Contributors: Izaskun Jimenez-Serra, Tom James, Jon Holdship",source:"@site/versioned_docs/version-v3.2.0/physics-shocks.md",sourceDirName:".",slug:"/physics-shocks",permalink:"/docs/v3.2.0/physics-shocks",draft:!1,tags:[],version:"v3.2.0",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1679910175,formattedLastUpdatedAt:"Mar 27, 2023",frontMatter:{id:"physics-shocks",title:"Shock Models"},sidebar:"docs",previous:{title:"Hot Core",permalink:"/docs/v3.2.0/physics-hotcore"},next:{title:"Collapse Models",permalink:"/docs/v3.2.0/physics-collapse"}},l={},c=[{value:"Shock Profiles",id:"shock-profiles",level:2},{value:"C-Shocks",id:"c-shocks",level:3},{value:"J-shocks",id:"j-shocks",level:3},{value:"Dimensions",id:"dimensions",level:2},{value:"Sputtering",id:"sputtering",level:2}],h={toc:c};function d(e){var a=e.components,t=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},h,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Main Contributors"),": Izaskun Jimenez-Serra, Tom James, Jon Holdship"),(0,r.kt)("h2",{id:"shock-profiles"},"Shock Profiles"),(0,r.kt)("p",null,"UCLCHEM uses two different shock parameterizations. These provide the physical properties of a gas through time as it is subjected to a shock. Whilst the most accurate MHD shock models solve the chemistry, MHD and radiative transfer problems simulataneously, few of these models include chemistry as detailed as UCLCHEM. We assume that the MHD models on which our parameterizations were validated used detailed enough chemistry that the shock profiles could be accurately calculated. This means that more detailed chemistry can be safely post-processed using UCLCHEM, a parameterization simply means the user can select parameters freely rather than from a preset selection of profiles from another code such as ",(0,r.kt)("a",{parentName:"p",href:"http://cdsads.u-strasbg.fr/abs/2015A&A...578A..63F"},"MHDvode"),"."),(0,r.kt)("h3",{id:"c-shocks"},"C-Shocks"),(0,r.kt)("p",null,"The C-shock is based on the parameterization by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". It parameterizes the density, temperature and velocity profiles of c-shocks as a function of shock velocity, initial gas density and magnetic field. These were validated against the results of the detailed shock modelling of ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1046/j.1365-8711.2003.06716.x"},"Flower et al. 2003"),". Details of it's use can be found in ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.cshock"},"the c-shock function docs"),"."),(0,r.kt)("p",null,"A key value in this model is the dissipation length, which is the distance over which the velocity of the ions and the neutrals equalizes. In some sense, this is the extent of the C-shock, although post-shock cooling does continue for some distance after. The C-shock function will return the dissipation time (see ",(0,r.kt)("a",{parentName:"p",href:"/docs/physics-shocks#dimensions"},"below"),") and will also uses shorter timesteps for a number of years equal to twice the dissipation time in order to fully resolve the shock. The number of these time steps is controlled by an optional parameter."),(0,r.kt)("h3",{id:"j-shocks"},"J-shocks"),(0,r.kt)("p",null,"jshock is a similar parameterization for j-shocks from ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201936536"},"James et al.")," validated against more recent results from MHDvode (",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201525740"},"Flower et al. 2015"),"). See the ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.jshock"},"j-shock function docs")," for details."),(0,r.kt)("h2",{id:"dimensions"},"Dimensions"),(0,r.kt)("p",null,"Both shock models are intended to be run as single point models only and the code will return an error for ",(0,r.kt)("inlineCode",{parentName:"p"},"points > 1"),". However, you can look at the 1D profile of a shock by converting between time and distance. If we assume the shock is stationary, that is that it's structure is unchanged as it moves through a cloud of gas, then the points that are far away in time are the same as those far away in space."),(0,r.kt)("img",{src:"/img/shock.png",width:"600","margin-left":"40%"}),(0,r.kt)("p",null,"As an illustration, as a shock front moves through a cloud and first hits a parcel of gas, this is t=0 in our shock model output. 5000 years later, the shock front has moved on, thus the output of UCLCHEM at t=5000 years is the state of a parcel of gas that was first hit 5000 years ago and is now far behind the shock front."),(0,r.kt)("p",null,"By using the shock velocity, you can translate 5000 years to the distance between the parcel that was shocked 5000 years ago and the parcel that is just being reached by the shock front,"),(0,r.kt)("div",{className:"math math-display"},(0,r.kt)("span",{parentName:"div",className:"katex-display"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("mi",{parentName:"mrow"},"z"),(0,r.kt)("mo",{parentName:"mrow"},"="),(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"v"),(0,r.kt)("mi",{parentName:"msub"},"s")),(0,r.kt)("mi",{parentName:"mrow"},"t")),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"z= v_s t")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.04398em"}},"z"),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,r.kt)("span",{parentName:"span",className:"mrel"},"="),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t")))))),(0,r.kt)("p",null,"Thus the history of a single point in a shocked cloud that is output by UCLCHEM can also be translated to a snapshot of a cloud that covers distance z."),(0,r.kt)("h2",{id:"sputtering"},"Sputtering"),(0,r.kt)("p",null,"The C-shock model uses the sputtering process described by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". Briefly, we calculate the average energy imparted on the grains from a collision between the shocked gas and the grains. We then combine this with the collision rate and average yield for a given energy to calculate the sputtering rate which we integrate through time. In practice, this sputtering is so quick that it happens almost instantaneously at ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"t"),(0,r.kt)("mrow",{parentName:"msub"},(0,r.kt)("mi",{parentName:"mrow"},"s"),(0,r.kt)("mi",{parentName:"mrow"},"a"),(0,r.kt)("mi",{parentName:"mrow"},"t")))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"t_{sat}")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.2805559999999999em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),", the saturation time. This is the time at which the silicon abundance stops increasing in more detailed models, used as a proxy for when the ices are fully sputtered. Thus it is likely that you will see a step change in the ice abundances where sputtering has not occurred yet in one time step and is complete in the second unless your timestep is very small."),(0,r.kt)("p",null,"The J-shock would begin with ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"V"),(0,r.kt)("mi",{parentName:"msub"},"s"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"V_s")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"V"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.22222em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"}))))))))))," as the initial drift velocity of the sputtering routine described above and would instantaneously sputter at t = 0 yr. Furthermore, temperatures typically reach a minimum of 1000 K meaning the thermal sublimation is almost complete. Thus, we do not need to worry about the sputtering process in the J-shock, we simply remove all grain material and add it to the gas at t = 0 yr."))}d.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6742],{3905:(e,a,t)=>{t.d(a,{Zo:()=>l,kt:()=>d});var s=t(7294);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function r(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);a&&(s=s.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,s)}return t}function i(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var o=s.createContext({}),p=function(e){var a=s.useContext(o),t=a;return e&&(t="function"==typeof e?e(a):i(i({},a),e)),t},l=function(e){var a=p(e.components);return s.createElement(o.Provider,{value:a},e.children)},c={inlineCode:"code",wrapper:function(e){var a=e.children;return s.createElement(s.Fragment,{},a)}},h=s.forwardRef((function(e,a){var t=e.components,n=e.mdxType,r=e.originalType,o=e.parentName,l=m(e,["components","mdxType","originalType","parentName"]),h=p(t),d=n,k=h["".concat(o,".").concat(d)]||h[d]||c[d]||r;return t?s.createElement(k,i(i({ref:a},l),{},{components:t})):s.createElement(k,i({ref:a},l))}));function d(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var r=t.length,i=new Array(r);i[0]=h;var m={};for(var o in a)hasOwnProperty.call(a,o)&&(m[o]=a[o]);m.originalType=e,m.mdxType="string"==typeof e?e:n,i[1]=m;for(var p=2;p{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>m,metadata:()=>p,toc:()=>c});var s=t(7462),n=t(3366),r=(t(7294),t(3905)),i=["components"],m={id:"physics-shocks",title:"Shock Models"},o=void 0,p={unversionedId:"physics-shocks",id:"version-v3.2.0/physics-shocks",title:"Shock Models",description:"Main Contributors: Izaskun Jimenez-Serra, Tom James, Jon Holdship",source:"@site/versioned_docs/version-v3.2.0/physics-shocks.md",sourceDirName:".",slug:"/physics-shocks",permalink:"/docs/v3.2.0/physics-shocks",draft:!1,tags:[],version:"v3.2.0",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1679910175,formattedLastUpdatedAt:"Mar 27, 2023",frontMatter:{id:"physics-shocks",title:"Shock Models"},sidebar:"docs",previous:{title:"Hot Core",permalink:"/docs/v3.2.0/physics-hotcore"},next:{title:"Collapse Models",permalink:"/docs/v3.2.0/physics-collapse"}},l={},c=[{value:"Shock Profiles",id:"shock-profiles",level:2},{value:"C-Shocks",id:"c-shocks",level:3},{value:"J-shocks",id:"j-shocks",level:3},{value:"Dimensions",id:"dimensions",level:2},{value:"Sputtering",id:"sputtering",level:2}],h={toc:c};function d(e){var a=e.components,t=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},h,t,{components:a,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Main Contributors"),": Izaskun Jimenez-Serra, Tom James, Jon Holdship"),(0,r.kt)("h2",{id:"shock-profiles"},"Shock Profiles"),(0,r.kt)("p",null,"UCLCHEM uses two different shock parameterizations. These provide the physical properties of a gas through time as it is subjected to a shock. Whilst the most accurate MHD shock models solve the chemistry, MHD and radiative transfer problems simulataneously, few of these models include chemistry as detailed as UCLCHEM. We assume that the MHD models on which our parameterizations were validated used detailed enough chemistry that the shock profiles could be accurately calculated. This means that more detailed chemistry can be safely post-processed using UCLCHEM, a parameterization simply means the user can select parameters freely rather than from a preset selection of profiles from another code such as ",(0,r.kt)("a",{parentName:"p",href:"http://cdsads.u-strasbg.fr/abs/2015A&A...578A..63F"},"MHDvode"),"."),(0,r.kt)("h3",{id:"c-shocks"},"C-Shocks"),(0,r.kt)("p",null,"The C-shock is based on the parameterization by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". It parameterizes the density, temperature and velocity profiles of c-shocks as a function of shock velocity, initial gas density and magnetic field. These were validated against the results of the detailed shock modelling of ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1046/j.1365-8711.2003.06716.x"},"Flower et al. 2003"),". Details of it's use can be found in ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.cshock"},"the c-shock function docs"),"."),(0,r.kt)("p",null,"A key value in this model is the dissipation length, which is the distance over which the velocity of the ions and the neutrals equalizes. In some sense, this is the extent of the C-shock, although post-shock cooling does continue for some distance after. The C-shock function will return the dissipation time (see ",(0,r.kt)("a",{parentName:"p",href:"/docs/physics-shocks#dimensions"},"below"),") and will also uses shorter timesteps for a number of years equal to twice the dissipation time in order to fully resolve the shock. The number of these time steps is controlled by an optional parameter."),(0,r.kt)("h3",{id:"j-shocks"},"J-shocks"),(0,r.kt)("p",null,"jshock is a similar parameterization for j-shocks from ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201936536"},"James et al.")," validated against more recent results from MHDvode (",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361/201525740"},"Flower et al. 2015"),"). See the ",(0,r.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.jshock"},"j-shock function docs")," for details."),(0,r.kt)("h2",{id:"dimensions"},"Dimensions"),(0,r.kt)("p",null,"Both shock models are intended to be run as single point models only and the code will return an error for ",(0,r.kt)("inlineCode",{parentName:"p"},"points > 1"),". However, you can look at the 1D profile of a shock by converting between time and distance. If we assume the shock is stationary, that is that it's structure is unchanged as it moves through a cloud of gas, then the points that are far away in time are the same as those far away in space."),(0,r.kt)("img",{src:"/img/shock.png",width:"600","margin-left":"40%"}),(0,r.kt)("p",null,"As an illustration, as a shock front moves through a cloud and first hits a parcel of gas, this is t=0 in our shock model output. 5000 years later, the shock front has moved on, thus the output of UCLCHEM at t=5000 years is the state of a parcel of gas that was first hit 5000 years ago and is now far behind the shock front."),(0,r.kt)("p",null,"By using the shock velocity, you can translate 5000 years to the distance between the parcel that was shocked 5000 years ago and the parcel that is just being reached by the shock front,"),(0,r.kt)("div",{className:"math math-display"},(0,r.kt)("span",{parentName:"div",className:"katex-display"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("mi",{parentName:"mrow"},"z"),(0,r.kt)("mo",{parentName:"mrow"},"="),(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"v"),(0,r.kt)("mi",{parentName:"msub"},"s")),(0,r.kt)("mi",{parentName:"mrow"},"t")),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"z= v_s t")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.04398em"}},"z"),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,r.kt)("span",{parentName:"span",className:"mrel"},"="),(0,r.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.03588em"}},"v"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.03588em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t")))))),(0,r.kt)("p",null,"Thus the history of a single point in a shocked cloud that is output by UCLCHEM can also be translated to a snapshot of a cloud that covers distance z."),(0,r.kt)("h2",{id:"sputtering"},"Sputtering"),(0,r.kt)("p",null,"The C-shock model uses the sputtering process described by ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1051/0004-6361:20078054"},"Jimenez-Serra et al. 2008"),". Briefly, we calculate the average energy imparted on the grains from a collision between the shocked gas and the grains. We then combine this with the collision rate and average yield for a given energy to calculate the sputtering rate which we integrate through time. In practice, this sputtering is so quick that it happens almost instantaneously at ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"t"),(0,r.kt)("mrow",{parentName:"msub"},(0,r.kt)("mi",{parentName:"mrow"},"s"),(0,r.kt)("mi",{parentName:"mrow"},"a"),(0,r.kt)("mi",{parentName:"mrow"},"t")))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"t_{sat}")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.76508em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.2805559999999999em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"0em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"a"),(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"t"))))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),", the saturation time. This is the time at which the silicon abundance stops increasing in more detailed models, used as a proxy for when the ices are fully sputtered. Thus it is likely that you will see a step change in the ice abundances where sputtering has not occurred yet in one time step and is complete in the second unless your timestep is very small."),(0,r.kt)("p",null,"The J-shock would begin with ",(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mi",{parentName:"msub"},"V"),(0,r.kt)("mi",{parentName:"msub"},"s"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"V_s")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.83333em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.22222em"}},"V"),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.151392em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginLeft:"-0.22222em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mathnormal mtight"},"s")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"}))))))))))," as the initial drift velocity of the sputtering routine described above and would instantaneously sputter at t = 0 yr. Furthermore, temperatures typically reach a minimum of 1000 K meaning the thermal sublimation is almost complete. Thus, we do not need to worry about the sputtering process in the J-shock, we simply remove all grain material and add it to the gas at t = 0 yr."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d26b1119.a5a3956a.js b/assets/js/d26b1119.a5a3956a.js deleted file mode 100644 index 39c9ba4b..00000000 --- a/assets/js/d26b1119.a5a3956a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3053],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var s=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,s)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=s.createContext({}),p=function(e){var t=s.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=p(e.components);return s.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return s.createElement(s.Fragment,{},t)}},u=s.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(a),h=n,d=u["".concat(l,".").concat(h)]||u[h]||m[h]||r;return a?s.createElement(d,i(i({ref:t},c),{},{components:a})):s.createElement(d,i({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>p,toc:()=>m});var s=a(7462),n=a(3366),r=(a(7294),a(3905)),i=["components"],o={id:"network",title:"Creating a Network"},l=void 0,p={unversionedId:"network",id:"network",title:"Creating a Network",description:"MakeRates",source:"@site/docs/start-network.md",sourceDirName:".",slug:"/network",permalink:"/docs/next/network",draft:!1,tags:[],version:"current",lastUpdatedBy:"jonholdship",lastUpdatedAt:1653303814,formattedLastUpdatedAt:"May 23, 2022",frontMatter:{id:"network",title:"Creating a Network"},sidebar:"docs",previous:{title:"Installation",permalink:"/docs/next/"},next:{title:"Model Parameters",permalink:"/docs/next/parameters"}},c={},m=[{value:"MakeRates",id:"makerates",level:2},{value:"Input",id:"input",level:2},{value:"Default Network",id:"default-network",level:2},{value:"Outputs",id:"outputs",level:2},{value:"What MakeRates Does",id:"what-makerates-does",level:2},{value:"Creating your own Network",id:"creating-your-own-network",level:2},{value:"Species list",id:"species-list",level:4},{value:"Reaction list",id:"reaction-list",level:4},{value:"Three Phase Chemistry",id:"three-phase-chemistry",level:2}],u={toc:m};function h(e){var t=e.components,a=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"makerates"},"MakeRates"),(0,r.kt)("p",null,"In order to make a chemical model flexible, the ability to solve a user supplied chemical network is a must. UCLCHEM uses a preprocessing python script to turn csv lists of species and reactions into fortran files for use in the main code. This script is called MakeRates and can be found in the Makerates subdirectory of the repository. It combines a gas phase reaction database with user supplied lists of species and additional reactions into the necessary Fortran code to run UCLCHEM. It also supplies a number of human readable outputs."),(0,r.kt)("p",null,"In the sections below, we discuss how to build your network and set the inputs for MakeRates but once that is done, you can run MakeRates with the following commands:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd MakeRates\npython MakeRates.py\ncd ..\npip install .\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note the pip install at the end of the process. Any output from MakeRates requires that the code be recompiled because MakeRates produces new source code for UCLCHEM!")),(0,r.kt)("h2",{id:"input"},"Input"),(0,r.kt)("p",null,"Makerates is controlled using a yaml file ",(0,r.kt)("inlineCode",{parentName:"p"},"Makerates/user_settings.yaml"),". By changing the values in this file, you can create different networks. The default values of this file are copied below."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"#Your list of all species\nspecies_file : inputFiles/default_species.csv\n\n#core reactions from gas phase database\ndatabase_reaction_file : inputFiles/umist12-ucledit.csv\ndatabase_reaction_type : UMIST\n\n#set of additional reactions: eg grain network\ncustom_reaction_file : inputFiles/default_grain_network.csv\ncustom_reaction_type : UCL\n\n#whether to automatically expand to three phase network\nthree_phase : True\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"species_file")," is a csv list of species and their properties. We provide a default list and detailed instructions below."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"database_reaction_file")," is your first reaction file, we expect most users to use UMIST12 or KIDA2014 for this but you could create your own file from an alternative database. Makerates can read files formatted in the same manner as the UMIST or KIDA databases as well as our own simple csv format, the ",(0,r.kt)("inlineCode",{parentName:"p"},"database_reaction_type")," setting lets MakeRates know which and should be set to 'UMIST', 'KIDA', or 'UCL'."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"custom_reaction_file")," is an additional reaction file. In the example file, we include all of our grain surface reactions which is the intended use of this file. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"three_phase")," is a toggle that tells MakeRates whether to automatically expand your network into a three phase model."),(0,r.kt)("h2",{id:"default-network"},"Default Network"),(0,r.kt)("p",null,"A basic version of each of the required file is supplied in the repository. The network that MakeRates produces from those files is also include in the source code so that a new user who simply installs UCLCHEM without running MakeRates will be using our default network. These default files serve largely as examples of how the files should be formatted and we also describe each one below so that the user can produce their own network."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"We do not endorse the default network"),", we have simply produced a grain surface network that was relatively up to date in 2018. It produces reasonable ice mantle abundances for major species and ignores larger COMs. We strongly suggest any published work be based on a network in which the user has confidence. However, where the user is not greatly concerned with grain surface chemistry, the default network is a good starting point."),(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("p",null,"Outputs from MakeRates are automatically moved to the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/")," directory so the user can ",(0,r.kt)("inlineCode",{parentName:"p"},"pip install .")," and update their installation of UCLCHEM to use their new network. However, by adding the parameter ",(0,r.kt)("inlineCode",{parentName:"p"},"output_directory")," to the yaml file, you can have all the files moved to a directory instead without copying them to your UCLCHEM src folder. If you do, the following files will be produced:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"network.f90 - Fortran arrays containing lists of species names and properties (mass, binding energy etc) as well as reaction reactants, products and rate coefficients."),(0,r.kt)("li",{parentName:"ul"},"odes.f90 - Code to calculate the rate of change of each species' abundance for the numerical solver"),(0,r.kt)("li",{parentName:"ul"},"species.csv - A list of all species in the network and their properties. Made for humans not UCLCHEM."),(0,r.kt)("li",{parentName:"ul"},"reactions.csv - A list of all reactions including reactants, products and coefficients. Made for humans not UCLCHEM.")),(0,r.kt)("h2",{id:"what-makerates-does"},"What MakeRates Does"),(0,r.kt)("p",null,"MakeRates does the following:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Combines the two input reaction lists"),(0,r.kt)("li",{parentName:"ul"},"Filters to remove any reactions containing species not in the input species list"),(0,r.kt)("li",{parentName:"ul"},"Adds freeze out and desorption reactions for all species"),(0,r.kt)("li",{parentName:"ul"},"Creates branching reactions for Langmuir-Hinshelwood and Eley-Rideal reactions where products chemically desorb"),(0,r.kt)("li",{parentName:"ul"},"Optionally: creates additional reactions and species needed for a three phase network"),(0,r.kt)("li",{parentName:"ul"},"Does basic network consistency checks and alerts user of problems"),(0,r.kt)("li",{parentName:"ul"},"Writes fortran files for UCLCHEM"),(0,r.kt)("li",{parentName:"ul"},"Writes other output files")),(0,r.kt)("h2",{id:"creating-your-own-network"},"Creating your own Network"),(0,r.kt)("p",null,"To create your own network you need to produce a species list and a reaction list."),(0,r.kt)("h4",{id:"species-list"},"Species list"),(0,r.kt)("p",null,"The species list should simply be a list with one row per species in the network. Each row should contain the species name, mass, binding energy and enthalpy of formation. The latter two are only used for surface species so can be set to zero for the gas phase species. MakeRates will check the mass is correct for each species and alert you of discrepancies."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"C,12,0,0,0,0,0\n#CH4,16,960,0,0.7,0.667,-15.9\n")),(0,r.kt)("p",null,"In the above example, C is a gas phase species so we have set the mass but ignored the other variables. #CH4 is methane in the ice so we have additionally set a binding energy of 960 K and enthalpy of formation of -15.9 kcal/mol. The other three values (0, 0.7, 0.667) are desorption fractions that three phase chemistry networks ignore. For two phase networks, we mimic the multiple desorption events seen in TPD experiments by setting these fractions. See ",(0,r.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2004MNRAS.354.1141V/abstract"},"Viti et al. 2004")," for more information."),(0,r.kt)("p",null,"The enthalpy of formation for essentially any species can be found in chemical databases such as the ",(0,r.kt)("a",{parentName:"p",href:"https://webbook.nist.gov/"},"NIST web book"),". They're usually in kj/mol but the conversion to kcal/mol is easy enough and NIST has an option to switch values to kcal. A fantastic resource for binding energies is ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1016/j.molap.2017.01.002"},"Wakelam et al. 2017")," but these are harder to find in general. In the absolute worse case, you can sum up the binding energies of sub-groups in your molecule but this is pretty inaccurate."),(0,r.kt)("h4",{id:"reaction-list"},"Reaction list"),(0,r.kt)("p",null,"The second reaction list is intended to contain your surface network but can also be used to augment the gas phase databases by including additional gas phase reactions. The reaction list should be a list with one row per reaction and each row should be a comma separated list of 3 reactants, 4 products, three coefficients (alpha,beta,gamma) and a minimum and maximum temperature. Any missing values such as a third reactant can be left blank. In particular, the temperatures are optional but can be useful when you include multiple versions of the same reaction. In that case, UCLCHEM will only use each one within its specified temperature range."),(0,r.kt)("p",null,"The third reactant can be used as a keyword to tell MakeRates what kind of reaction is occuring. In the absence of a keyword, MakeRates and UCLCHEM will treat any reaction as a gas-phase two body reaction. Two keywords the user may wish to use are ER and LH for Eley-Rideal and Langmuir-Hinshelwood reactions respectively (see ",(0,r.kt)("a",{parentName:"p",href:"grain/"},"Grain Chemisty"),"). If a keyword is not added, UCLCHEM will assume a reaction between two surface reactions follows a Kooji-Arrhenius equation."),(0,r.kt)("p",null,"Two other useful reactions types to include are FREEZE and DESORB. Makerates adds freeze out and desorption reactions for every species, assuming they remain unchanged by the process. For example, CO in the gas becomes #CO on the grain. If you would instead like to specify the products, you can include a reaction:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"H3O+,FREEZE,,#H2O,H,,,1,0,0,,,\n#HPN,DESORB,,HPN+,,,,1,0,0,,,\n")),(0,r.kt)("p",null,"which will override the desorption or freeze out products of a species. "),(0,r.kt)("h2",{id:"three-phase-chemistry"},"Three Phase Chemistry"),(0,r.kt)("p",null,"The input ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," controls whether the ices are treated as a single phase or the surface is treated separated to the bulk. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to true, the chemical network will have gas, grain surface, and bulk ice chemistry. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to false, the chemical network will have gas and grain surface chemistry."),(0,r.kt)("p",null,"When true, MakeRates will create the bulk ice chemistry by duplicating the surface species and reactions in your input files. The difference will be that, unless you specifically override the bulk binding energy, every species in the bulk has a binding energy equal to the H2O binding energy. It will also add terms to the ODEs to allow transfer between the bulk and the surface. See the chemistry sections for more information."),(0,r.kt)("p",null,'You can override the binding energy of material in the bulk by explicitly including the bulk species in your species file rather than allowing MakeRates to automatically add it. Bulk species are designated with an "@". For example, "H2O" is gas phase H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O, "#H2O" is surface H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O and "@H2O" is H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O in the bulk. If you set the binding energy to "Inf", the species will not leave the grains during thermal desorption. This allows you to model refractory species in the bulk.'))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/d26b1119.e35bc5a5.js b/assets/js/d26b1119.e35bc5a5.js new file mode 100644 index 00000000..13254e9f --- /dev/null +++ b/assets/js/d26b1119.e35bc5a5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3053],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>h});var s=a(7294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,s)}return a}function i(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var l=s.createContext({}),p=function(e){var t=s.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},c=function(e){var t=p(e.components);return s.createElement(l.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return s.createElement(s.Fragment,{},t)}},u=s.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,l=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(a),h=n,d=u["".concat(l,".").concat(h)]||u[h]||m[h]||r;return a?s.createElement(d,i(i({ref:t},c),{},{components:a})):s.createElement(d,i({ref:t},c))}));function h(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,i=new Array(r);i[0]=u;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o.mdxType="string"==typeof e?e:n,i[1]=o;for(var p=2;p{a.r(t),a.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>p,toc:()=>m});var s=a(7462),n=a(3366),r=(a(7294),a(3905)),i=["components"],o={id:"network",title:"Creating a Network"},l=void 0,p={unversionedId:"network",id:"network",title:"Creating a Network",description:"MakeRates",source:"@site/docs/start-network.md",sourceDirName:".",slug:"/network",permalink:"/docs/next/network",draft:!1,tags:[],version:"current",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"network",title:"Creating a Network"},sidebar:"docs",previous:{title:"Installation",permalink:"/docs/next/"},next:{title:"Model Parameters",permalink:"/docs/next/parameters"}},c={},m=[{value:"MakeRates",id:"makerates",level:2},{value:"Input",id:"input",level:2},{value:"Default Network",id:"default-network",level:2},{value:"Outputs",id:"outputs",level:2},{value:"What MakeRates Does",id:"what-makerates-does",level:2},{value:"Creating your own Network",id:"creating-your-own-network",level:2},{value:"Species list",id:"species-list",level:4},{value:"Reaction list",id:"reaction-list",level:4},{value:"Three Phase Chemistry",id:"three-phase-chemistry",level:2}],u={toc:m};function h(e){var t=e.components,a=(0,n.Z)(e,i);return(0,r.kt)("wrapper",(0,s.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h2",{id:"makerates"},"MakeRates"),(0,r.kt)("p",null,"In order to make a chemical model flexible, the ability to solve a user supplied chemical network is a must. UCLCHEM uses a preprocessing python script to turn csv lists of species and reactions into fortran files for use in the main code. This script is called MakeRates and can be found in the Makerates subdirectory of the repository. It combines a gas phase reaction database with user supplied lists of species and additional reactions into the necessary Fortran code to run UCLCHEM. It also supplies a number of human readable outputs."),(0,r.kt)("p",null,"In the sections below, we discuss how to build your network and set the inputs for MakeRates but once that is done, you can run MakeRates with the following commands:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd MakeRates\npython MakeRates.py\ncd ..\npip install -e . \n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Note the pip install at the end of the process. Any output from MakeRates requires that the code be recompiled because MakeRates produces new source code for UCLCHEM!")),(0,r.kt)("h2",{id:"input"},"Input"),(0,r.kt)("p",null,"Makerates is controlled using a yaml file ",(0,r.kt)("inlineCode",{parentName:"p"},"Makerates/user_settings.yaml"),". By changing the values in this file, you can create different networks. The default values of this file are copied below."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-yaml"},"#Your list of all species\nspecies_file : inputFiles/default_species.csv\n\n#core reactions from gas phase database\ndatabase_reaction_file : inputFiles/umist12-ucledit.csv\ndatabase_reaction_type : UMIST\n\n#set of additional reactions: eg grain network\ncustom_reaction_file : inputFiles/default_grain_network.csv\ncustom_reaction_type : UCL\n\n#whether to automatically expand to three phase network\nthree_phase : True\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"species_file")," is a csv list of species and their properties. We provide a default list and detailed instructions below."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"database_reaction_file")," is your first reaction file, we expect most users to use UMIST12 or KIDA2014 for this but you could create your own file from an alternative database. Makerates can read files formatted in the same manner as the UMIST or KIDA databases as well as our own simple csv format, the ",(0,r.kt)("inlineCode",{parentName:"p"},"database_reaction_type")," setting lets MakeRates know which and should be set to 'UMIST', 'KIDA', or 'UCL'."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"custom_reaction_file")," is an additional reaction file. In the example file, we include all of our grain surface reactions which is the intended use of this file. "),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"three_phase")," is a toggle that tells MakeRates whether to automatically expand your network into a three phase model."),(0,r.kt)("h2",{id:"default-network"},"Default Network"),(0,r.kt)("p",null,"A basic version of each of the required file is supplied in the repository. The network that MakeRates produces from those files is also include in the source code so that a new user who simply installs UCLCHEM without running MakeRates will be using our default network. These default files serve largely as examples of how the files should be formatted and we also describe each one below so that the user can produce their own network."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"We do not endorse the default network"),", we have simply produced a grain surface network that was relatively up to date in 2018. It produces reasonable ice mantle abundances for major species and ignores larger COMs. We strongly suggest any published work be based on a network in which the user has confidence. However, where the user is not greatly concerned with grain surface chemistry, the default network is a good starting point."),(0,r.kt)("h2",{id:"outputs"},"Outputs"),(0,r.kt)("p",null,"Outputs from MakeRates are automatically moved to the ",(0,r.kt)("inlineCode",{parentName:"p"},"src/")," directory so the user can ",(0,r.kt)("inlineCode",{parentName:"p"},"pip install .")," and update their installation of UCLCHEM to use their new network. However, by adding the parameter ",(0,r.kt)("inlineCode",{parentName:"p"},"output_directory")," to the yaml file, you can have all the files moved to a directory instead without copying them to your UCLCHEM src folder. If you do, the following files will be produced:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"network.f90 - Fortran arrays containing lists of species names and properties (mass, binding energy etc) as well as reaction reactants, products and rate coefficients."),(0,r.kt)("li",{parentName:"ul"},"odes.f90 - Code to calculate the rate of change of each species' abundance for the numerical solver"),(0,r.kt)("li",{parentName:"ul"},"species.csv - A list of all species in the network and their properties. Made for humans not UCLCHEM."),(0,r.kt)("li",{parentName:"ul"},"reactions.csv - A list of all reactions including reactants, products and coefficients. Made for humans not UCLCHEM.")),(0,r.kt)("h2",{id:"what-makerates-does"},"What MakeRates Does"),(0,r.kt)("p",null,"MakeRates does the following:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Combines the two input reaction lists"),(0,r.kt)("li",{parentName:"ul"},"Filters to remove any reactions containing species not in the input species list"),(0,r.kt)("li",{parentName:"ul"},"Adds freeze out and desorption reactions for all species"),(0,r.kt)("li",{parentName:"ul"},"Creates branching reactions for Langmuir-Hinshelwood and Eley-Rideal reactions where products chemically desorb"),(0,r.kt)("li",{parentName:"ul"},"Optionally: creates additional reactions and species needed for a three phase network"),(0,r.kt)("li",{parentName:"ul"},"Does basic network consistency checks and alerts user of problems"),(0,r.kt)("li",{parentName:"ul"},"Writes fortran files for UCLCHEM"),(0,r.kt)("li",{parentName:"ul"},"Writes other output files")),(0,r.kt)("h2",{id:"creating-your-own-network"},"Creating your own Network"),(0,r.kt)("p",null,"To create your own network you need to produce a species list and a reaction list."),(0,r.kt)("h4",{id:"species-list"},"Species list"),(0,r.kt)("p",null,"The species list should simply be a list with one row per species in the network. Each row should contain the species name, mass, binding energy and enthalpy of formation. The latter two are only used for surface species so can be set to zero for the gas phase species. MakeRates will check the mass is correct for each species and alert you of discrepancies."),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"C,12,0,0,0,0,0\n#CH4,16,960,0,0.7,0.667,-15.9\n")),(0,r.kt)("p",null,"In the above example, C is a gas phase species so we have set the mass but ignored the other variables. #CH4 is methane in the ice so we have additionally set a binding energy of 960 K and enthalpy of formation of -15.9 kcal/mol. The other three values (0, 0.7, 0.667) are desorption fractions that three phase chemistry networks ignore. For two phase networks, we mimic the multiple desorption events seen in TPD experiments by setting these fractions. See ",(0,r.kt)("a",{parentName:"p",href:"https://ui.adsabs.harvard.edu/abs/2004MNRAS.354.1141V/abstract"},"Viti et al. 2004")," for more information."),(0,r.kt)("p",null,"The enthalpy of formation for essentially any species can be found in chemical databases such as the ",(0,r.kt)("a",{parentName:"p",href:"https://webbook.nist.gov/"},"NIST web book"),". They're usually in kj/mol but the conversion to kcal/mol is easy enough and NIST has an option to switch values to kcal. A fantastic resource for binding energies is ",(0,r.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1016/j.molap.2017.01.002"},"Wakelam et al. 2017")," but these are harder to find in general. In the absolute worse case, you can sum up the binding energies of sub-groups in your molecule but this is pretty inaccurate."),(0,r.kt)("h4",{id:"reaction-list"},"Reaction list"),(0,r.kt)("p",null,"The second reaction list is intended to contain your surface network but can also be used to augment the gas phase databases by including additional gas phase reactions. The reaction list should be a list with one row per reaction and each row should be a comma separated list of 3 reactants, 4 products, three coefficients (alpha,beta,gamma) and a minimum and maximum temperature. Any missing values such as a third reactant can be left blank. In particular, the temperatures are optional but can be useful when you include multiple versions of the same reaction. In that case, UCLCHEM will only use each one within its specified temperature range."),(0,r.kt)("p",null,"The third reactant can be used as a keyword to tell MakeRates what kind of reaction is occuring. In the absence of a keyword, MakeRates and UCLCHEM will treat any reaction as a gas-phase two body reaction. Two keywords the user may wish to use are ER and LH for Eley-Rideal and Langmuir-Hinshelwood reactions respectively (see ",(0,r.kt)("a",{parentName:"p",href:"grain/"},"Grain Chemisty"),"). If a keyword is not added, UCLCHEM will assume a reaction between two surface reactions follows a Kooji-Arrhenius equation."),(0,r.kt)("p",null,"Two other useful reactions types to include are FREEZE and DESORB. Makerates adds freeze out and desorption reactions for every species, assuming they remain unchanged by the process. For example, CO in the gas becomes #CO on the grain. If you would instead like to specify the products, you can include a reaction:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"H3O+,FREEZE,,#H2O,H,,,1,0,0,,,\n#HPN,DESORB,,HPN+,,,,1,0,0,,,\n")),(0,r.kt)("p",null,"which will override the desorption or freeze out products of a species. "),(0,r.kt)("h2",{id:"three-phase-chemistry"},"Three Phase Chemistry"),(0,r.kt)("p",null,"The input ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," controls whether the ices are treated as a single phase or the surface is treated separated to the bulk. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to true, the chemical network will have gas, grain surface, and bulk ice chemistry. If ",(0,r.kt)("inlineCode",{parentName:"p"},"three_phase")," is set to false, the chemical network will have gas and grain surface chemistry."),(0,r.kt)("p",null,"When true, MakeRates will create the bulk ice chemistry by duplicating the surface species and reactions in your input files. The difference will be that, unless you specifically override the bulk binding energy, every species in the bulk has a binding energy equal to the H2O binding energy. It will also add terms to the ODEs to allow transfer between the bulk and the surface. See the chemistry sections for more information."),(0,r.kt)("p",null,'You can override the binding energy of material in the bulk by explicitly including the bulk species in your species file rather than allowing MakeRates to automatically add it. Bulk species are designated with an "@". For example, "H2O" is gas phase H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O, "#H2O" is surface H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O and "@H2O" is H',(0,r.kt)("span",{parentName:"p",className:"math math-inline"},(0,r.kt)("span",{parentName:"span",className:"katex"},(0,r.kt)("span",{parentName:"span",className:"katex-mathml"},(0,r.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,r.kt)("semantics",{parentName:"math"},(0,r.kt)("mrow",{parentName:"semantics"},(0,r.kt)("msub",{parentName:"mrow"},(0,r.kt)("mrow",{parentName:"msub"}),(0,r.kt)("mn",{parentName:"msub"},"2"))),(0,r.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"_2")))),(0,r.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,r.kt)("span",{parentName:"span",className:"base"},(0,r.kt)("span",{parentName:"span",className:"strut",style:{height:"0.45110799999999995em",verticalAlign:"-0.15em"}}),(0,r.kt)("span",{parentName:"span",className:"mord"},(0,r.kt)("span",{parentName:"span"}),(0,r.kt)("span",{parentName:"span",className:"msupsub"},(0,r.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.30110799999999993em"}},(0,r.kt)("span",{parentName:"span",style:{top:"-2.5500000000000003em",marginRight:"0.05em"}},(0,r.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,r.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,r.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,r.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,r.kt)("span",{parentName:"span",className:"vlist-r"},(0,r.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.15em"}},(0,r.kt)("span",{parentName:"span"})))))))))),'O in the bulk. If you set the binding energy to "Inf", the species will not leave the grains during thermal desorption. This allows you to model refractory species in the bulk.'))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/dbebe280.fa1439de.js b/assets/js/dbebe280.fa1439de.js new file mode 100644 index 00000000..430a1eef --- /dev/null +++ b/assets/js/dbebe280.fa1439de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[8091],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>f});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=c(n),f=o,g=d["".concat(s,".").concat(f)]||d[f]||p[f]||a;return n?r.createElement(g,i(i({ref:t},u),{},{components:n})):r.createElement(g,i({ref:t},u))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>f,frontMatter:()=>l,metadata:()=>c,toc:()=>p});var r=n(7462),o=n(3366),a=(n(7294),n(3905)),i=["components"],l={id:"trouble-integration",title:"Integration"},s=void 0,c={unversionedId:"trouble-integration",id:"version-v3.3.1/trouble-integration",title:"Integration",description:"My code just keeps running",source:"@site/versioned_docs/version-v3.3.1/trouble-integration.md",sourceDirName:".",slug:"/trouble-integration",permalink:"/docs/trouble-integration",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"trouble-integration",title:"Integration"},sidebar:"docs",previous:{title:"Compilation Issues",permalink:"/docs/trouble-compile"},next:{title:"Core Physics",permalink:"/docs/physics-core"}},u={},p=[{value:"My code just keeps running",id:"my-code-just-keeps-running",level:2},{value:"Crashing/Stalling Model Runs",id:"crashingstalling-model-runs",level:2}],d={toc:p};function f(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h2",{id:"my-code-just-keeps-running"},"My code just keeps running"),(0,a.kt)("p",null,"If you're working in jupyter notebooks, fortran output will often not be printed to the cell outputs until the cell finishes running. This can be a real problem if the integration is failing because UCLCHEM may be printing warnings to the screen but you won't see them. If your code is running for a few minutes in a notebook, you may want to export the code to a python script and run it. The uclchem output will print to the console and you will see the integration errors piling up."),(0,a.kt)("h2",{id:"crashingstalling-model-runs"},"Crashing/Stalling Model Runs"),(0,a.kt)("p",null,"Chemical ODEs are infamously stiff and, as such, difficult to solve. There's also no single solver configuration we can use that will guarantee an efficient and accurate solution to every single problem. In particular, if you have a very large network or one with very fast reactions, you may find the integrator stuggles. "),(0,a.kt)("p",null,'You\'ll know the integrator is struggling if you find you get a lot of printed messages stating "ISTATE = -n" (where n is some integer). If the model run completes and there is nothing obviously wrong (eg oscillations) then its likely the solution is fine and your network/parameter combination is at the edge of what the solver can handle. If it takes a very long time or never completes, there is an issue.'),(0,a.kt)("p",null,"One good method to check the validity of your solution is to use the element conservation functions in the ",(0,a.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.analysis.check_element_conservation"},"python module"),". The integrator typically fails to conserve elemental abundances when the integration has accumulated too large an error. Thus, checking for conservation can reassure you that the integration was successful even if the integrator struggled."),(0,a.kt)("p",null,"To fix this, your first port of call should be the ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_factor"),", ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_min")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"reltol")," parameters. The comments in ",(0,a.kt)("inlineCode",{parentName:"p"},"src/fortran_src/dvode.f90")," give a fantastic overview of the integrator but in essence, DVODE takes two parameters: ",(0,a.kt)("inlineCode",{parentName:"p"},"reltol")," should set the decimal place accuracy of your abundances and ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol")," the overall error you'll accept. In UCLCHEM, reltol is just a number but we use DVODE's option of making ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol")," a vector with one value per species instead of a single value. This allows us to change the error tolerance depending on the species abundances. ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol")," will take the value of ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_factor")," times the species abundance or ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_min"),", whichever is larger."),(0,a.kt)("p",null,"Changing the tolerances is a dark art and it isn't necessarily the case that smaller values = more accuracy and larger values = faster integration. Trying a few values (particularly of ",(0,a.kt)("inlineCode",{parentName:"p"},"abstol_factor"),") is always a good first step when you hit integrator problems."),(0,a.kt)("p",null,"If that doesn't work, you should investigate whether your network is reasonable. Duplicated reactions and bad rate coefficients can result in reactions going too quickly and breaking the integrator."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e0f39a39.7edc58d5.js b/assets/js/e0f39a39.7edc58d5.js deleted file mode 100644 index 0b3ea7fb..00000000 --- a/assets/js/e0f39a39.7edc58d5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2988],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>p});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),h=u(n),p=o,m=h["".concat(l,".").concat(p)]||h[p]||d[p]||r;return n?a.createElement(m,i(i({ref:t},c),{},{components:n})):a.createElement(m,i({ref:t},c))}));function p(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:o,i[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var a=n(7462),o=n(3366),r=(n(7294),n(3905)),i=["components"],s={id:"dev-web",title:"Maintaining the Website"},l=void 0,u={unversionedId:"dev-web",id:"version-v3.3.0/dev-web",title:"Maintaining the Website",description:"We use Docusaurus to maintain our website. The upside is that documentation and blog posts can all be created as simple markdown files. The downside is a slightly convoluted workflow which we explain here.",source:"@site/versioned_docs/version-v3.3.0/dev-web.md",sourceDirName:".",slug:"/dev-web",permalink:"/docs/dev-web",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"dev-web",title:"Maintaining the Website"},sidebar:"docs",previous:{title:"Debugging",permalink:"/docs/dev-debugging"}},c={},d=[{value:"Repository Structure",id:"repository-structure",level:2},{value:"Setting Up",id:"setting-up",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Cloning",id:"cloning",level:3},{value:"Making Changes",id:"making-changes",level:2},{value:"Docs",id:"docs",level:3},{value:"Blog",id:"blog",level:3},{value:"Main pages",id:"main-pages",level:3},{value:"Pushing Changes",id:"pushing-changes",level:2}],h={toc:d};function p(e){var t=e.components,n=(0,o.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"We use ",(0,r.kt)("a",{parentName:"p",href:"https://docusaurus.io"},"Docusaurus")," to maintain our website. The upside is that documentation and blog posts can all be created as simple markdown files. The downside is a slightly convoluted workflow which we explain here."),(0,r.kt)("h2",{id:"repository-structure"},"Repository Structure"),(0,r.kt)("p",null,"The website is generated from a ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/uclchem/uclchem.github.io"},"dedicated repository")," which has two branches: ",(0,r.kt)("strong",{parentName:"p"},"master")," and ",(0,r.kt)("strong",{parentName:"p"},"docusaurus"),". Master is the branch from which the website is actually served and it is not to be edited by users. Instead, it is automatically generated from the source code by Docusaurus. ",(0,r.kt)("strong",{parentName:"p"},"Users modify the docusaurus branch.")),(0,r.kt)("h2",{id:"setting-up"},"Setting Up"),(0,r.kt)("h3",{id:"requirements"},"Requirements"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"You'll need ",(0,r.kt)("a",{parentName:"li",href:"https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable"},"yarn")," or npm installed to run docusaurus, we'll assume yarn as it's simplest but the ",(0,r.kt)("a",{parentName:"li",href:"https://docusaurus.io/docs"},"docusaurus docs")," explain how to use either."),(0,r.kt)("li",{parentName:"ul"},"You need to set up github to use SSH keys to authenticate your pushes. ",(0,r.kt)("a",{parentName:"li",href:"https://docs.github.com/en/authentication/connecting-to-github-with-ssh"},"The github docs explain this"))),(0,r.kt)("h3",{id:"cloning"},"Cloning"),(0,r.kt)("p",null,"To get a copy of the website and start looking around, you can do the following:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"git clone git@github.com:uclchem/uclchem.github.io.git\ncd uclchem.github.io\ngit checkout docusaurus\n")),(0,r.kt)("p",null,"which will clone the repository and move to the development branch. The parent directory is not particularly useful, most content is in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/"),", users can run the site locally with:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd website\nyarn start\n")),(0,r.kt)("h2",{id:"making-changes"},"Making Changes"),(0,r.kt)("h3",{id:"docs"},"Docs"),(0,r.kt)("p",null,"The docs pages are generated from markdown files in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/docs"),". There's a script in the ",(0,r.kt)("inlineCode",{parentName:"p"},"utils")," directory of the main UCLCHEM repository (",(0,r.kt)("inlineCode",{parentName:"p"},"utils/make_python_docs.sh"),") to automatically generate the parameters docs, the Python API reference, and the tutorial pages from the code and tutorial files. You need to supply the path to your uclchem.github.io repository to have it automatically move the files there. If you want to add or modify any other docs, you can just create or edit a markdown file."),(0,r.kt)("p",null,"The only docs that are actually included in the side are those listed in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/sidebars.json"),". There's some structure to it but we define categories in a simple JSON format and then each cateogory has an items list where you can add new pages. If you want to add a completely new category, just compare the category declaration in this file with the docs online. The docs listed in sidebars.json should match the ",(0,r.kt)("inlineCode",{parentName:"p"},"id")," at the top of each markdown file."),(0,r.kt)("h3",{id:"blog"},"Blog"),(0,r.kt)("p",null,"We're attempting to add a blog post for each publication that uses UCLCHEM. Blog posts are again just markdown files which can be found in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/blog"),". Everything in that directory is included in the blog, the date from the file name is used to order them."),(0,r.kt)("h3",{id:"main-pages"},"Main pages"),(0,r.kt)("p",null,"The other pages on the site are either js files in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/src/pages")," or static html files in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/static"),". Docusaurus does not like you to work with the static files so where possible, you should use the js files. We use very simple js where we just put the HTML we would put into a normal webpage into functions and then call the functions in the main part of the file to produce a simple HMTL page. It's best to use existing pages as templates."),(0,r.kt)("h2",{id:"pushing-changes"},"Pushing Changes"),(0,r.kt)("p",null,"Once you've made your edits, you do the following steps:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},'# Let docusaurus update the website\nUSE_SSH=true GIT_USER=gijsvermarien DEPLOYMENT_BRANCH=master yarn deploy\n\n# Push your changes to the docusaurus branch as normal\ngit add . -A\ngit commit -m "useful update message"\ngit push\n\n')),(0,r.kt)("p",null,"If your github is set up with to use private key authentication and ssh (highly recommended), docusaurus will build the website and push it to master for you when you use yarn deploy. You then push to docusaurus branch as normal to make sure others work from your changes."),(0,r.kt)("p",null,"If there is a major release, one should make a new version, which can be done using:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"yarn docusaurus docs:version 3.X\n")),(0,r.kt)("p",null,"Between the patch numbers, the documentation should only change little, so either you can leave the documentation identical, or if changes were made, just supersede the lower patch number and upload the newer documentation. Depending on how many version we support, one can delete older documentation versions or deprecate them."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e306a572.ad6adffa.js b/assets/js/e306a572.ad6adffa.js new file mode 100644 index 00000000..bac75338 --- /dev/null +++ b/assets/js/e306a572.ad6adffa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6860],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>h});var i=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=i.createContext({}),c=function(e){var t=i.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=c(e.components);return i.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},u=i.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(n),h=a,m=u["".concat(l,".").concat(h)]||u[h]||d[h]||r;return n?i.createElement(m,o(o({ref:t},p),{},{components:n})):i.createElement(m,o({ref:t},p))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=u;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,o[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>p,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var i=n(7462),a=n(3366),r=(n(7294),n(3905)),o=["components"],s={id:"dev-overview",title:"Overview of the Code"},l=void 0,c={unversionedId:"dev-overview",id:"version-v3.3.1/dev-overview",title:"Overview of the Code",description:"The page is designed to give a brief overview of the code's structure. It's less about the scientific justification for the various treatments in the code and more about how the code is segmented and where to look for things.",source:"@site/versioned_docs/version-v3.3.1/dev-overview.md",sourceDirName:".",slug:"/dev-overview",permalink:"/docs/dev-overview",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"dev-overview",title:"Overview of the Code"},sidebar:"docs",previous:{title:"Developer",permalink:"/docs/category/developer"},next:{title:"Writing The Python Interface",permalink:"/docs/dev-python-wrap"}},p={},d=[{value:"Basic Algorithm",id:"basic-algorithm",level:2},{value:"Physics",id:"physics",level:2},{value:"Chemistry",id:"chemistry",level:2},{value:"Constants",id:"constants",level:2}],u={toc:d};function h(e){var t=e.components,n=(0,a.Z)(e,o);return(0,r.kt)("wrapper",(0,i.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"The page is designed to give a brief overview of the code's structure. It's less about the scientific justification for the various treatments in the code and more about how the code is segmented and where to look for things."),(0,r.kt)("h2",{id:"basic-algorithm"},"Basic Algorithm"),(0,r.kt)("p",null,"Centering the code on the python wrap has made the underlying algorithm more difficult to follow than in older versions of the code. However, you can more or less see the whole procedure of solving the chemical model in ",(0,r.kt)("inlineCode",{parentName:"p"},"solveAbundances")," in ",(0,r.kt)("inlineCode",{parentName:"p"},"src/fortran_src/wrap.f90"),". The steps are:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Set all parameters to defaultparameters.f90 values")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Read parameters from the dictionary input")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Initialize physics variables such as column density and model specific values")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"Initialize chemical variables like initial abundances")),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"While ",(0,r.kt)("inlineCode",{parentName:"p"},"time < finalTime")," or ",(0,r.kt)("inlineCode",{parentName:"p"},"density")," < ",(0,r.kt)("inlineCode",{parentName:"p"},"finalDens")),(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"get a new target time"),(0,r.kt)("li",{parentName:"ul"},"update abundances from current time to target time"),(0,r.kt)("li",{parentName:"ul"},"update physics variables to new time"),(0,r.kt)("li",{parentName:"ul"},"Allow physics modules to affect abundances directly (eg to sputter ices)"),(0,r.kt)("li",{parentName:"ul"},"output parameters"))),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("p",{parentName:"li"},"output final abundances if ",(0,r.kt)("inlineCode",{parentName:"p"},"abundSaveFile")," set."))),(0,r.kt)("p",null,"Exactly what happens in the initialize physics and update physics sections depends on the physical model in question."),(0,r.kt)("h2",{id:"physics"},"Physics"),(0,r.kt)("p",null,"There are a number of physics modules which all implement the same subroutines in different ways. They also all pull from core-physics.f90, a module that contains all the non-optional physics variables. When we initialize or update physics, we first call the initialize/update subroutine from core-physics.f90 and then call it from the physics module. This is achieved by passing the relevant physics module's subroutines to ",(0,r.kt)("inlineCode",{parentName:"p"},"solveAbundances")," from each of the various subroutines in wrap.f90."),(0,r.kt)("p",null,"If you'd like to implement your own physics model, you should try as closely as possible to follow this structure. Since core-physics is always updated first, you can override it with your module. For example, core-physics will calculate the Av and column density in the standard way but you could recalculate your column density in your updatePhysics subroutine to get new behaviour."),(0,r.kt)("h2",{id:"chemistry"},"Chemistry"),(0,r.kt)("p",null,"A large number of the fortran files make up the chemistry module. There's:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"chemistry.f90")," which contains the core chemistry routines and variables."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"rates.f90")," which is actually directly included in ",(0,r.kt)("inlineCode",{parentName:"li"},"chemistry.f90")," and just contains most of the reaction rate calculations"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"surfacereactions.f90")," and ",(0,r.kt)("inlineCode",{parentName:"li"},"photoreactions.f90")," which each contain a lot of the surface or photon chemistry related variables and subroutines. These are often so involved that we just separated them out to avoid overfilling ",(0,r.kt)("inlineCode",{parentName:"li"},"rates.f90"),"."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"odes.f90")," which is generated by MakeRates and is a huge file of ordinary differential equations."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"network.f90")," is also generated by MakeRates and contains lists of things like species names, reaction types, the index of the species that is the nth reactant of each reaction, etc. ",(0,r.kt)("strong",{parentName:"li"},"If you want to store something like the index of a species or reaction, consider having MakeRates add to this file."))),(0,r.kt)("h2",{id:"constants"},"Constants"),(0,r.kt)("p",null,"All constants are defined in ",(0,r.kt)("inlineCode",{parentName:"p"},"constants.f90")," and are accessed by the ",(0,r.kt)("inlineCode",{parentName:"p"},"constants")," module. If you need a physical constant, it's best check if it's here before defining it. There should be no harm at all in importing this module into any other code as it compiles first and nothing is modifiable (eg you can't overwrite the value of ",(0,r.kt)("inlineCode",{parentName:"p"},"PI")," defined in constants.f90)."),(0,r.kt)("p",null,"It's also where we declare ",(0,r.kt)("inlineCode",{parentName:"p"},"dp"),", which allows us to declare real64 variables in the iso standard way. All the ",(0,r.kt)("inlineCode",{parentName:"p"},"real(dp)")," variables you see declared in the code come from this."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/e3e9e529.8eab08f6.js b/assets/js/e3e9e529.8eab08f6.js deleted file mode 100644 index 7bdde812..00000000 --- a/assets/js/e3e9e529.8eab08f6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3302],{369:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"v3.3.0","label":"v3.3.0","banner":null,"badge":true,"noIndex":false,"className":"docs-version-v3.3.0","isLast":true,"docsSidebars":{"docs":[{"type":"category","label":"Getting Started","items":[{"type":"link","label":"Installation","href":"/docs/","docId":"install"},{"type":"link","label":"Creating a Network","href":"/docs/network","docId":"network"},{"type":"link","label":"Model Parameters","href":"/docs/parameters","docId":"parameters"},{"type":"link","label":"Python Reference","href":"/docs/pythonapi","docId":"pythonapi"}],"collapsed":true,"collapsible":true,"href":"/docs/category/getting-started"},{"type":"category","label":"Tutorials","items":[{"type":"link","label":"Running Your First Models","href":"/docs/first_model","docId":"first_model"},{"type":"link","label":"Advanced Physical Modelling","href":"/docs/modelling_objects","docId":"modelling_objects"},{"type":"link","label":"Running a Grid","href":"/docs/running_a_grid","docId":"running_a_grid"},{"type":"link","label":"Chemical Analysis","href":"/docs/chemical_analysis","docId":"chemical_analysis"}],"collapsed":true,"collapsible":true,"href":"/docs/category/tutorials"},{"type":"category","label":"Troubleshooting","items":[{"type":"link","label":"Compilation Issues","href":"/docs/trouble-compile","docId":"trouble-compile"},{"type":"link","label":"Integration","href":"/docs/trouble-integration","docId":"trouble-integration"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Physics","items":[{"type":"link","label":"Core Physics","href":"/docs/physics-core","docId":"physics-core"},{"type":"link","label":"Cloud Model","href":"/docs/physics-cloud","docId":"physics-cloud"},{"type":"link","label":"Hot Core","href":"/docs/physics-hotcore","docId":"physics-hotcore"},{"type":"link","label":"Shock Models","href":"/docs/physics-shocks","docId":"physics-shocks"},{"type":"link","label":"Collapse Models","href":"/docs/physics-collapse","docId":"physics-collapse"}],"collapsed":true,"collapsible":true,"href":"/docs/physics-core"},{"type":"category","label":"Chemistry","items":[{"type":"link","label":"Notation","href":"/docs/notation","docId":"notation"},{"type":"link","label":"Gas Phase Reactions","href":"/docs/gas","docId":"gas"},{"type":"link","label":"Grain Surface Reactions","href":"/docs/grain","docId":"grain"},{"type":"link","label":"Adsorption & Desorption Reactions","href":"/docs/desorb","docId":"desorb"},{"type":"link","label":"Bulk Ice Processes","href":"/docs/bulk","docId":"bulk"}],"collapsed":true,"collapsible":true,"href":"/docs/category/chemistry"},{"type":"category","label":"Developer","items":[{"type":"link","label":"Overview of the Code","href":"/docs/dev-overview","docId":"dev-overview"},{"type":"link","label":"Writing The Python Interface","href":"/docs/dev-python-wrap","docId":"dev-python-wrap"},{"type":"link","label":"Debugging","href":"/docs/dev-debugging","docId":"dev-debugging"},{"type":"link","label":"Maintaining the Website","href":"/docs/dev-web","docId":"dev-web"}],"collapsed":true,"collapsible":true,"href":"/docs/category/developer"}]},"docs":{"bulk":{"id":"bulk","title":"Bulk Ice Processes","description":"For a three phase network, we must include reactions in the bulk and the process by which it is formed. To do this, MakeRates automatically duplicates all LH reactions so that a reaction on the surface and one in the bulk ice exists in the network. We then include two methods by which material can move between the bulk and the surface. First is the accumulation of the bulk as new surface layers are formed and second is the individual swapping of a particle from the bulk with one on the surface. Both of these processes are taken from Garrod & Pauly 2011","sidebar":"docs"},"chemical_analysis":{"id":"chemical_analysis","title":"Chemical Analysis","description":"Chemical networks are complex systems where the interplay between many elements often means that small changes in one aspect of the network can greatly effect the outcome in unexpected ways. Nevertheless, there are cases where a simple chemical explanation can be found for some observed behaviour in the model outputs. This tutorial demonstrates how to use some of the functionality of the UCLCHEM library to analyse model outputs and discover these explanations.","sidebar":"docs"},"desorb":{"id":"desorb","title":"Adsorption & Desorption Reactions","description":"Coupling between the gas and the grain chemistry primarily comes from the freeze out of material from the gas phase onto the dust grains (adsorption) and the sublimation of material from the grains into the gas phase (desorption). The major processes considered by UCLCHEM are listed below. Note that we assume desorption and freeze out occur between the gas and the surface only, bulk material in three phase models does not directly desorb into the gas phase.","sidebar":"docs"},"dev-debugging":{"id":"dev-debugging","title":"Debugging","description":"UCLCHEM is a complex code and many things can go wrong. Here, we\'ll list some of the things that often go wrong when you modify the code as well as a few helpful steps to trace down bugs.","sidebar":"docs"},"dev-overview":{"id":"dev-overview","title":"Overview of the Code","description":"The page is designed to give a brief overview of the code\'s structure. It\'s less about the scientific justification for the various treatments in the code and more about how the code is segmented and where to look for things.","sidebar":"docs"},"dev-python-wrap":{"id":"dev-python-wrap","title":"Writing The Python Interface","description":"The python interface is a relatively complex bit of code, a lot of work is put on the development side to make the user side a smooth experience. Writing the core of UCLCHEM in Fortran gives great performance benefits but compiling it to python with F2PY has its peculiarities. Here, we discuss the steps needed to adjust the code.","sidebar":"docs"},"dev-web":{"id":"dev-web","title":"Maintaining the Website","description":"We use Docusaurus to maintain our website. The upside is that documentation and blog posts can all be created as simple markdown files. The downside is a slightly convoluted workflow which we explain here.","sidebar":"docs"},"first_model":{"id":"first_model","title":"Running Your First Models","description":"In this notebook, we demonstrate the basic use of UCLCHEM\'s python module by running a simple model and then using the analysis functions to examine the output.","sidebar":"docs"},"gas":{"id":"gas","title":"Gas Phase Reactions","description":"Gas phase ODEs","sidebar":"docs"},"grain":{"id":"grain","title":"Grain Surface Reactions","description":"Whilst the basic treatment of gas phase chemistry is well established, grain surface chemistry is more complex. There are three possible ways to treat grain surface chemistry in UCLCHEM. In general we assume that:","sidebar":"docs"},"hydro":{"id":"hydro","title":"Hydro Post Processing","description":"Main Contributors: Jon Holdship"},"install":{"id":"install","title":"Installation","description":"Prerequisites","sidebar":"docs"},"modelling_objects":{"id":"modelling_objects","title":"Advanced Physical Modelling","description":"In the previous tutorial, we simply modelled the chemistry of a static cloud for 1 Myr. This is unlikely to meet everybody\'s modelling needs and UCLCHEM is capable of modelling much more complex environments such as hot cores and shocks. In this tutorial, we model both a hot core and a shock to explore how these models work and to demonstrate the workflow that the UCLCHEM team normally follow.","sidebar":"docs"},"network":{"id":"network","title":"Creating a Network","description":"MakeRates","sidebar":"docs"},"notation":{"id":"notation","title":"Notation","description":"UCLCHEM uses notation, which differentiates between species types. Here, we\'ll give an overview of this notation and associated processes.","sidebar":"docs"},"parameters":{"id":"parameters","title":"Model Parameters","description":"UCLCHEM will default to these values unless they are overridden by user. Users can override these by adding the variable name as written here in the paramdict argument of any UCLCHEM model function. paramdict is not case sensitive.","sidebar":"docs"},"physics-cloud":{"id":"physics-cloud","title":"Cloud Model","description":"Main Contributors: Serena Viti, Jon Holdship","sidebar":"docs"},"physics-collapse":{"id":"physics-collapse","title":"Collapse Models","description":"Main Contributors: Felix Priestley","sidebar":"docs"},"physics-core":{"id":"physics-core","title":"Core Physics","description":"Each of the other physics doc pages details the specifics of a particular physics model. This one gives a general overview of the physics in UCLCHEM, including the core physics routines that are called for all models.","sidebar":"docs"},"physics-hotcore":{"id":"physics-hotcore","title":"Hot Core","description":"Main Contributors: Serena Viti, Jon Holdship","sidebar":"docs"},"physics-shocks":{"id":"physics-shocks","title":"Shock Models","description":"Main Contributors: Izaskun Jimenez-Serra, Tom James, Jon Holdship","sidebar":"docs"},"pythonapi":{"id":"pythonapi","title":"Python Reference","description":"* uclchem","sidebar":"docs"},"running_a_grid":{"id":"running_a_grid","title":"Running a Grid","description":"A common task is to run UCLCHEM over a grid of parameter combinations. This notebook sets up a simple approach to doing so for regular grids.","sidebar":"docs"},"trouble-compile":{"id":"trouble-compile","title":"Compilation Issues","description":"Given that UCLCHEM is supplied as source code, used across many machine types, and is a fairly complex model, things will occasionally go wrong. We\'ve collected here some of the most common problems and hope they resolve most issues.","sidebar":"docs"},"trouble-integration":{"id":"trouble-integration","title":"Integration","description":"My code just keeps running","sidebar":"docs"}}}')}}]); \ No newline at end of file diff --git a/assets/js/f0775422.ce1d5da4.js b/assets/js/f0775422.ce1d5da4.js deleted file mode 100644 index 5088438e..00000000 --- a/assets/js/f0775422.ce1d5da4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7363],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>f});var n=r(7294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var p=n.createContext({}),c=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,p=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=c(r),f=o,y=d["".concat(p,".").concat(f)]||d[f]||u[f]||i;return r?n.createElement(y,a(a({ref:t},l),{},{components:r})):n.createElement(y,a({ref:t},l))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=d;var s={};for(var p in t)hasOwnProperty.call(t,p)&&(s[p]=t[p]);s.originalType=e,s.mdxType="string"==typeof e?e:o,a[1]=s;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>p,default:()=>f,frontMatter:()=>s,metadata:()=>c,toc:()=>u});var n=r(7462),o=r(3366),i=(r(7294),r(3905)),a=["components"],s={id:"hydro",title:"Hydro Post Processing"},p=void 0,c={unversionedId:"hydro",id:"version-v3.3.0/hydro",title:"Hydro Post Processing",description:"Main Contributors: Jon Holdship",source:"@site/versioned_docs/version-v3.3.0/hydro.md",sourceDirName:".",slug:"/hydro",permalink:"/docs/hydro",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"hydro",title:"Hydro Post Processing"}},l={},u=[],d={toc:u};function f(e){var t=e.components,r=(0,o.Z)(e,a);return(0,i.kt)("wrapper",(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Main Contributors"),": Jon Holdship"),(0,i.kt)("p",null,"UCLCHEM includes a post-processing module ",(0,i.kt)("inlineCode",{parentName:"p"},"src/hydro.f90")," which is effectively a template as it necessarily requires user editing. The module reads in a columnated file of physical properties such as the output from a hydrodynamical model and creates interpolation functions."),(0,i.kt)("p",null,"As ",(0,i.kt)("inlineCode",{parentName:"p"},"updatePhysics")," is called by UCLCHEM's main loop, these interpolation functions are called to get the physical properties of the gas at the current simulation time."),(0,i.kt)("p",null,"Whilst the maximum amount of information that can be read from the input file is set by the physical properties UCLCHEM deals with, this is naturally a user dependent process. The input file format and the gas properties that are supplied (eg just density/temperature or density/temperature/Av) depend on the model being post processed. Thus ",(0,i.kt)("inlineCode",{parentName:"p"},"src/hydro.f90")," needs to be edited to account for this."))}f.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f1ff4237.662444ea.js b/assets/js/f1ff4237.662444ea.js new file mode 100644 index 00000000..4e27f528 --- /dev/null +++ b/assets/js/f1ff4237.662444ea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4910],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(n),h=a,m=d["".concat(l,".").concat(h)]||d[h]||p[h]||o;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,i[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>u,toc:()=>p});var r=n(7462),a=n(3366),o=(n(7294),n(3905)),i=["components"],s={id:"dev-python-wrap",title:"Writing The Python Interface"},l=void 0,u={unversionedId:"dev-python-wrap",id:"version-v3.3.1/dev-python-wrap",title:"Writing The Python Interface",description:"The python interface is a relatively complex bit of code, a lot of work is put on the development side to make the user side a smooth experience. Writing the core of UCLCHEM in Fortran gives great performance benefits but compiling it to python with F2PY has its peculiarities. Here, we discuss the steps needed to adjust the code.",source:"@site/versioned_docs/version-v3.3.1/dev-python-wrap.md",sourceDirName:".",slug:"/dev-python-wrap",permalink:"/docs/dev-python-wrap",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"dev-python-wrap",title:"Writing The Python Interface"},sidebar:"docs",previous:{title:"Overview of the Code",permalink:"/docs/dev-overview"},next:{title:"Debugging",permalink:"/docs/dev-debugging"}},c={},p=[{value:"The Fortran Side",id:"the-fortran-side",level:2},{value:"The Python Side",id:"the-python-side",level:2},{value:"Tips and Tricks",id:"tips-and-tricks",level:2}],d={toc:p};function h(e){var t=e.components,n=(0,a.Z)(e,i);return(0,o.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"The python interface is a relatively complex bit of code, a lot of work is put on the development side to make the user side a smooth experience. Writing the core of UCLCHEM in Fortran gives great performance benefits but compiling it to python with F2PY has its peculiarities. Here, we discuss the steps needed to adjust the code."),(0,o.kt)("h2",{id:"the-fortran-side"},"The Fortran Side"),(0,o.kt)("p",null,"The fortran side is the more difficult. We define a module in ",(0,o.kt)("inlineCode",{parentName:"p"},"src/fortran_src/wrap.f90")," which is a Fortran module that F2PY will turn into a python module. Any subroutine declared in ",(0,o.kt)("inlineCode",{parentName:"p"},"wrap.f90")," will become a function in the Python module."),(0,o.kt)("p",null,"The most likely change you'll want to make is to add a physics module so we'll look at cloud as an example. In ",(0,o.kt)("inlineCode",{parentName:"p"},"wrap.f90")," cloud is declared:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-fortran"}," SUBROUTINE cloud(dictionary, outSpeciesIn,abundance_out,successFlag)\n USE cloud_mod\n\n CHARACTER(LEN=*) :: dictionary, outSpeciesIn\n DOUBLE PRECISION :: abundance_out(500)\n INTEGER :: successFlag\n !f2py intent(in) dictionary,outSpeciesIn\n !f2py intent(out) abundance_out,successFlag\n ...\n END SUBROUTINE\n")),(0,o.kt)("p",null,"where we've dropped the bulk of the code since we only care about the declaration. Once compiled, you will be able to call this function using ",(0,o.kt)("inlineCode",{parentName:"p"},"uclchem.wrap.cloud(dictionary,outSpeciesIn)"),"."),(0,o.kt)("p",null,"This works because we've done two things. First, we've declared both the two inputs and the two outputs as arguments in Fortran in the normal way. Both inputs and outputs of a subroutine are declared as arguments in Fortran, usually with an ",(0,o.kt)("inlineCode",{parentName:"p"},"INTENT(IN)")," or ",(0,o.kt)("inlineCode",{parentName:"p"},"INTENT(OUT)")," statement, although that is unnecessary. We then declare the intent of those argument for F2PY using the comments that start ",(0,o.kt)("inlineCode",{parentName:"p"},"!f2py")," to tell F2PY which arguments should be arguments of the corresponding python function and which should be outputs."),(0,o.kt)("h2",{id:"the-python-side"},"The Python Side"),(0,o.kt)("p",null,"We could leave it at that. However, for ease of use, we write pure python functions in the uclchem module which call the underlying wrap functions rather than having users directly access the f2py functions. For example, in ",(0,o.kt)("inlineCode",{parentName:"p"},"uclchem.model"),", we define a cloud function which calls ",(0,o.kt)("inlineCode",{parentName:"p"},"wrap.cloud"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-python"},'\ndef cloud(param_dict=None, out_species=None):\n """Run cloud model from UCLCHEM\n\n Args:\n param_dict (dict,optional): A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run.\n out_species (list, optional): A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.\n\n Returns:\n int,list: A integer which is negative if the model failed to run, or a list of abundances of all species in `outSpecies`\n """\n n_out,param_dict,out_species=_reform_inputs(param_dict,out_species)\n abunds, success_flag = wrap.cloud(dictionary=param_dict, outspeciesin=out_species)\n if success_flag < 0 or n_out == 0:\n return success_flag\n else:\n return abunds[: n_out]\n')),(0,o.kt)("p",null,"This allows us to make some arguments optional using python's keyword arguments. It also lets us write docstrings from which we can generate documentation for the functions. Finally, it lets us tidy up the output! For example, arrays passed too and from the Fortran subroutines must be of fixed length so in this function, we cut the output abundance array down to just the elements the user actually wanted."),(0,o.kt)("h2",{id:"tips-and-tricks"},"Tips and Tricks"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"Once imported, all values are initialized in UCLCHEM. Calling a subroutine multiple times does not reset variables. That is to say that if your Fortran modules declare variables with an initial value, those variables will not return to those initial values. Instead, you'll notice all our modules reset their variables manually in the initialize functions such as initializePhysics.")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"Debugging your fortran code can be greatly complicated by the F2PY interface. Consider compiling the fortran source to test any code changes before trying to compile the python version.")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("p",{parentName:"li"},"Python handles errors much more gracefully than Fortran. We have tried to use ",(0,o.kt)("inlineCode",{parentName:"p"},"successFlag")," as a return from most subroutines as a way to tell Python that the Fortran run failed. It can be a pain to set up the chain of successFlag returns from modules in Fortran but if you use something like Fortran's ",(0,o.kt)("inlineCode",{parentName:"p"},"STOP"),", you'll likely kill your python in a way that won't let you use ",(0,o.kt)("inlineCode",{parentName:"p"},"try:, except:")," statements to handle it."))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f364ae83.b6cb26a7.js b/assets/js/f364ae83.b6cb26a7.js deleted file mode 100644 index 3a5c9624..00000000 --- a/assets/js/f364ae83.b6cb26a7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4081],{3905:(a,e,t)=>{t.d(e,{Zo:()=>o,kt:()=>h});var s=t(7294);function n(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function m(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),t.push.apply(t,s)}return t}function p(a){for(var e=1;e=0||(n[t]=a[t]);return n}(a,e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(a);for(s=0;s=0||Object.prototype.propertyIsEnumerable.call(a,t)&&(n[t]=a[t])}return n}var i=s.createContext({}),l=function(a){var e=s.useContext(i),t=e;return a&&(t="function"==typeof a?a(e):p(p({},e),a)),t},o=function(a){var e=l(a.components);return s.createElement(i.Provider,{value:e},a.children)},c={inlineCode:"code",wrapper:function(a){var e=a.children;return s.createElement(s.Fragment,{},e)}},N=s.forwardRef((function(a,e){var t=a.components,n=a.mdxType,m=a.originalType,i=a.parentName,o=r(a,["components","mdxType","originalType","parentName"]),N=l(t),h=n,k=N["".concat(i,".").concat(h)]||N[h]||c[h]||m;return t?s.createElement(k,p(p({ref:e},o),{},{components:t})):s.createElement(k,p({ref:e},o))}));function h(a,e){var t=arguments,n=e&&e.mdxType;if("string"==typeof a||n){var m=t.length,p=new Array(m);p[0]=N;var r={};for(var i in e)hasOwnProperty.call(e,i)&&(r[i]=e[i]);r.originalType=a,r.mdxType="string"==typeof a?a:n,p[1]=r;for(var l=2;l{t.r(e),t.d(e,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var s=t(7462),n=t(3366),m=(t(7294),t(3905)),p=["components"],r={id:"physics-hotcore",title:"Hot Core",author:"Jon Holdship"},i=void 0,l={unversionedId:"physics-hotcore",id:"version-v3.3.0/physics-hotcore",title:"Hot Core",description:"Main Contributors: Serena Viti, Jon Holdship",source:"@site/versioned_docs/version-v3.3.0/physics-hotcore.md",sourceDirName:".",slug:"/physics-hotcore",permalink:"/docs/physics-hotcore",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"physics-hotcore",title:"Hot Core",author:"Jon Holdship"},sidebar:"docs",previous:{title:"Cloud Model",permalink:"/docs/physics-cloud"},next:{title:"Shock Models",permalink:"/docs/physics-shocks"}},o={},c=[],N={toc:c};function h(a){var e=a.components,t=(0,n.Z)(a,p);return(0,m.kt)("wrapper",(0,s.Z)({},N,t,{components:e,mdxType:"MDXLayout"}),(0,m.kt)("p",null,(0,m.kt)("strong",{parentName:"p"},"Main Contributors"),": Serena Viti, Jon Holdship"),(0,m.kt)("p",null,(0,m.kt)("strong",{parentName:"p"},"Source"),": src/fortran_src/hotcore.f90"),(0,m.kt)("p",null,"The hot core model can be used to model the envelopes around hot cores as a single point or a 1D line of gas parels. The temperature in this model increases following the temperature profiles given in ",(0,m.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1111/j.1365-2966.2004.08273.x"},"Viti et al. 2004")," with modifications by ",(0,m.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1111/j.1365-2966.2010.17077.x"},"Awad et al. 2010"),". These are time and radially dependent temperature profiles intended to match the heat up of the gas around a hot core."),(0,m.kt)("div",{className:"math math-display"},(0,m.kt)("span",{parentName:"div",className:"katex-display"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML",display:"block"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"T"),(0,m.kt)("mo",{parentName:"mrow"},"="),(0,m.kt)("mn",{parentName:"mrow"},"10"),(0,m.kt)("mo",{parentName:"mrow"},"+"),(0,m.kt)("mi",{parentName:"mrow"},"A"),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"msup"},"t"),(0,m.kt)("mi",{parentName:"msup"},"B")),(0,m.kt)("msup",{parentName:"mrow"},(0,m.kt)("mrow",{parentName:"msup"},(0,m.kt)("mo",{parentName:"mrow",fence:"true"},"("),(0,m.kt)("mfrac",{parentName:"mrow"},(0,m.kt)("mi",{parentName:"mfrac"},"r"),(0,m.kt)("mi",{parentName:"mfrac"},"R")),(0,m.kt)("mo",{parentName:"mrow",fence:"true"},")")),(0,m.kt)("mfrac",{parentName:"msup"},(0,m.kt)("mn",{parentName:"mfrac"},"1"),(0,m.kt)("mn",{parentName:"mfrac"},"2"))),(0,m.kt)("mi",{parentName:"mrow"},"K")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"T = 10 + A t^B \\left(\\frac{r}{R}\\right)^{\\frac{1}{2}} K")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.13889em"}},"T"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}}),(0,m.kt)("span",{parentName:"span",className:"mrel"},"="),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2777777777777778em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.72777em",verticalAlign:"-0.08333em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},"1"),(0,m.kt)("span",{parentName:"span",className:"mord"},"0"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}}),(0,m.kt)("span",{parentName:"span",className:"mbin"},"+"),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.2222222222222222em"}})),(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"2.17992em",verticalAlign:"-0.686em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A"),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"t"),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8913309999999999em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.113em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"2.7em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal mtight",style:{marginRight:"0.05017em"}},"B")))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"minner"},(0,m.kt)("span",{parentName:"span",className:"mopen delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size2"},"(")),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.10756em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.314em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.00773em"}},"R"))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.23em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line",style:{borderBottomWidth:"0.04em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.677em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"mord"},(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r")))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.686em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter"})),(0,m.kt)("span",{parentName:"span",className:"mclose delimcenter",style:{top:"0em"}},(0,m.kt)("span",{parentName:"span",className:"delimsizing size2"},")"))),(0,m.kt)("span",{parentName:"span",className:"msupsub"},(0,m.kt)("span",{parentName:"span",className:"vlist-t"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"1.49392em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-3.9029em",marginRight:"0.05em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size6 size3 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mopen nulldelimiter sizing reset-size3 size6"}),(0,m.kt)("span",{parentName:"span",className:"mfrac"},(0,m.kt)("span",{parentName:"span",className:"vlist-t vlist-t2"},(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.8443142857142858em"}},(0,m.kt)("span",{parentName:"span",style:{top:"-2.656em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"2")))),(0,m.kt)("span",{parentName:"span",style:{top:"-3.2255000000000003em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"frac-line mtight",style:{borderBottomWidth:"0.049em"}})),(0,m.kt)("span",{parentName:"span",style:{top:"-3.384em"}},(0,m.kt)("span",{parentName:"span",className:"pstrut",style:{height:"3em"}}),(0,m.kt)("span",{parentName:"span",className:"sizing reset-size3 size1 mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},(0,m.kt)("span",{parentName:"span",className:"mord mtight"},"1"))))),(0,m.kt)("span",{parentName:"span",className:"vlist-s"},"\u200b")),(0,m.kt)("span",{parentName:"span",className:"vlist-r"},(0,m.kt)("span",{parentName:"span",className:"vlist",style:{height:"0.344em"}},(0,m.kt)("span",{parentName:"span"}))))),(0,m.kt)("span",{parentName:"span",className:"mclose nulldelimiter sizing reset-size3 size6"})))))))))),(0,m.kt)("span",{parentName:"span",className:"mspace",style:{marginRight:"0.16666666666666666em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.07153em"}},"K")))))),(0,m.kt)("p",null,"Where ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"r")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"r")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.43056em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.02778em"}},"r")))))," is the distance from the centre of the core to the current point, ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"R")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"R")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.00773em"}},"R")))))," is the radius of the core (",(0,m.kt)("inlineCode",{parentName:"p"},"rout"),") and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"A")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"A")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal"},"A")))))," and ",(0,m.kt)("span",{parentName:"p",className:"math math-inline"},(0,m.kt)("span",{parentName:"span",className:"katex"},(0,m.kt)("span",{parentName:"span",className:"katex-mathml"},(0,m.kt)("math",{parentName:"span",xmlns:"http://www.w3.org/1998/Math/MathML"},(0,m.kt)("semantics",{parentName:"math"},(0,m.kt)("mrow",{parentName:"semantics"},(0,m.kt)("mi",{parentName:"mrow"},"B")),(0,m.kt)("annotation",{parentName:"semantics",encoding:"application/x-tex"},"B")))),(0,m.kt)("span",{parentName:"span",className:"katex-html","aria-hidden":"true"},(0,m.kt)("span",{parentName:"span",className:"base"},(0,m.kt)("span",{parentName:"span",className:"strut",style:{height:"0.68333em",verticalAlign:"0em"}}),(0,m.kt)("span",{parentName:"span",className:"mord mathnormal",style:{marginRight:"0.05017em"}},"B")))))," are empirically derived constants. These constants have been determined for specific protostellar masses and the user can choose from 1, 5, 10, 15, 25, and 60 solar masses using the ",(0,m.kt)("inlineCode",{parentName:"p"},"tempIndx")," variable when calling ",(0,m.kt)("a",{parentName:"p",href:"/docs/pythonapi#uclchem.model.hot_core"},"uclchem.model.hot_core")),(0,m.kt)("p",null,"A key aspect of hot cores is the sublimation of ices as the gas heats. TPD experiments have shown that this happens in multiple desorptions events per species rather than a single desorption once the temperature is enough to overcome the binding energy of a given species. In three phase models, this is achieved by the fact the binding energy of species in the bulk is assumed to be equal to the water binding energy, meaning a species will usually desorb from the surface earlier than from the bulk. In two phase networks, the hot core model uses the fixed desorption events of ",(0,m.kt)("a",{parentName:"p",href:"https://dx.doi.org/10.1111/j.1365-2966.2004.08273.x"},"Viti et al. 2004")," to mimic this."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f8942e5e.de93e01f.js b/assets/js/f8942e5e.de93e01f.js new file mode 100644 index 00000000..275ee923 --- /dev/null +++ b/assets/js/f8942e5e.de93e01f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6102],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>p});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),u=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),h=u(n),p=o,m=h["".concat(l,".").concat(p)]||h[p]||d[p]||r;return n?a.createElement(m,i(i({ref:t},c),{},{components:n})):a.createElement(m,i({ref:t},c))}));function p(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:o,i[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>s,metadata:()=>u,toc:()=>d});var a=n(7462),o=n(3366),r=(n(7294),n(3905)),i=["components"],s={id:"dev-web",title:"Maintaining the Website"},l=void 0,u={unversionedId:"dev-web",id:"version-v3.3.1/dev-web",title:"Maintaining the Website",description:"We use Docusaurus to maintain our website. The upside is that documentation and blog posts can all be created as simple markdown files. The downside is a slightly convoluted workflow which we explain here.",source:"@site/versioned_docs/version-v3.3.1/dev-web.md",sourceDirName:".",slug:"/dev-web",permalink:"/docs/dev-web",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"dev-web",title:"Maintaining the Website"},sidebar:"docs",previous:{title:"Debugging",permalink:"/docs/dev-debugging"}},c={},d=[{value:"Repository Structure",id:"repository-structure",level:2},{value:"Setting Up",id:"setting-up",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Cloning",id:"cloning",level:3},{value:"Making Changes",id:"making-changes",level:2},{value:"Docs",id:"docs",level:3},{value:"Blog",id:"blog",level:3},{value:"Main pages",id:"main-pages",level:3},{value:"Pushing Changes",id:"pushing-changes",level:2}],h={toc:d};function p(e){var t=e.components,n=(0,o.Z)(e,i);return(0,r.kt)("wrapper",(0,a.Z)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"We use ",(0,r.kt)("a",{parentName:"p",href:"https://docusaurus.io"},"Docusaurus")," to maintain our website. The upside is that documentation and blog posts can all be created as simple markdown files. The downside is a slightly convoluted workflow which we explain here."),(0,r.kt)("h2",{id:"repository-structure"},"Repository Structure"),(0,r.kt)("p",null,"The website is generated from a ",(0,r.kt)("a",{parentName:"p",href:"https://github.com/uclchem/uclchem.github.io"},"dedicated repository")," which has two branches: ",(0,r.kt)("strong",{parentName:"p"},"master")," and ",(0,r.kt)("strong",{parentName:"p"},"docusaurus"),". Master is the branch from which the website is actually served and it is not to be edited by users. Instead, it is automatically generated from the source code by Docusaurus. ",(0,r.kt)("strong",{parentName:"p"},"Users modify the docusaurus branch.")),(0,r.kt)("h2",{id:"setting-up"},"Setting Up"),(0,r.kt)("h3",{id:"requirements"},"Requirements"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"You'll need ",(0,r.kt)("a",{parentName:"li",href:"https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable"},"yarn")," or npm installed to run docusaurus, we'll assume yarn as it's simplest but the ",(0,r.kt)("a",{parentName:"li",href:"https://docusaurus.io/docs"},"docusaurus docs")," explain how to use either."),(0,r.kt)("li",{parentName:"ul"},"You need to set up github to use SSH keys to authenticate your pushes. ",(0,r.kt)("a",{parentName:"li",href:"https://docs.github.com/en/authentication/connecting-to-github-with-ssh"},"The github docs explain this"))),(0,r.kt)("h3",{id:"cloning"},"Cloning"),(0,r.kt)("p",null,"To get a copy of the website and start looking around, you can do the following:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"git clone git@github.com:uclchem/uclchem.github.io.git\ncd uclchem.github.io\ngit checkout docusaurus\n")),(0,r.kt)("p",null,"which will clone the repository and move to the development branch. The parent directory is not particularly useful, most content is in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/"),", users can run the site locally with:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},"cd website\nyarn start\n")),(0,r.kt)("h2",{id:"making-changes"},"Making Changes"),(0,r.kt)("h3",{id:"docs"},"Docs"),(0,r.kt)("p",null,"The docs pages are generated from markdown files in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/docs"),". There's a script in the ",(0,r.kt)("inlineCode",{parentName:"p"},"utils")," directory of the main UCLCHEM repository (",(0,r.kt)("inlineCode",{parentName:"p"},"utils/make_python_docs.sh"),") to automatically generate the parameters docs, the Python API reference, and the tutorial pages from the code and tutorial files. You need to supply the path to your uclchem.github.io repository to have it automatically move the files there. If you want to add or modify any other docs, you can just create or edit a markdown file."),(0,r.kt)("p",null,"The only docs that are actually included in the side are those listed in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/sidebars.json"),". There's some structure to it but we define categories in a simple JSON format and then each cateogory has an items list where you can add new pages. If you want to add a completely new category, just compare the category declaration in this file with the docs online. The docs listed in sidebars.json should match the ",(0,r.kt)("inlineCode",{parentName:"p"},"id")," at the top of each markdown file."),(0,r.kt)("h3",{id:"blog"},"Blog"),(0,r.kt)("p",null,"We're attempting to add a blog post for each publication that uses UCLCHEM. Blog posts are again just markdown files which can be found in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/blog"),". Everything in that directory is included in the blog, the date from the file name is used to order them."),(0,r.kt)("h3",{id:"main-pages"},"Main pages"),(0,r.kt)("p",null,"The other pages on the site are either js files in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/src/pages")," or static html files in ",(0,r.kt)("inlineCode",{parentName:"p"},"website/static"),". Docusaurus does not like you to work with the static files so where possible, you should use the js files. We use very simple js where we just put the HTML we would put into a normal webpage into functions and then call the functions in the main part of the file to produce a simple HMTL page. It's best to use existing pages as templates."),(0,r.kt)("h2",{id:"pushing-changes"},"Pushing Changes"),(0,r.kt)("p",null,"Once you've made your edits, you do the following steps:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-bash"},'# Let docusaurus update the website\nUSE_SSH=true GIT_USER=gijsvermarien DEPLOYMENT_BRANCH=master yarn deploy\n\n# Push your changes to the docusaurus branch as normal\ngit add . -A\ngit commit -m "useful update message"\ngit push\n\n')),(0,r.kt)("p",null,"If your github is set up with to use private key authentication and ssh (highly recommended), docusaurus will build the website and push it to master for you when you use yarn deploy. You then push to docusaurus branch as normal to make sure others work from your changes."),(0,r.kt)("p",null,"If there is a major release, one should make a new version, which can be done using:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"yarn docusaurus docs:version 3.X\n")),(0,r.kt)("p",null,"Between the patch numbers, the documentation should only change little, so either you can leave the documentation identical, or if changes were made, just supersede the lower patch number and upload the newer documentation. Depending on how many version we support, one can delete older documentation versions or deprecate them."))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f928d592.45b5fe16.js b/assets/js/f928d592.45b5fe16.js new file mode 100644 index 00000000..7868c46e --- /dev/null +++ b/assets/js/f928d592.45b5fe16.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3767],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),u=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return o.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(n),h=r,m=p["".concat(s,".").concat(h)]||p[h]||d[h]||a;return n?o.createElement(m,i(i({ref:t},c),{},{components:n})):o.createElement(m,i({ref:t},c))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=p;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l.mdxType="string"==typeof e?e:r,i[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>u,toc:()=>d});var o=n(7462),r=n(3366),a=(n(7294),n(3905)),i=["components"],l={id:"dev-debugging",title:"Debugging"},s=void 0,u={unversionedId:"dev-debugging",id:"version-v3.3.1/dev-debugging",title:"Debugging",description:"UCLCHEM is a complex code and many things can go wrong. Here, we'll list some of the things that often go wrong when you modify the code as well as a few helpful steps to trace down bugs.",source:"@site/versioned_docs/version-v3.3.1/dev-debugging.md",sourceDirName:".",slug:"/dev-debugging",permalink:"/docs/dev-debugging",draft:!1,tags:[],version:"v3.3.1",lastUpdatedBy:"Gijs Vermari\xebn",lastUpdatedAt:1697189829,formattedLastUpdatedAt:"Oct 13, 2023",frontMatter:{id:"dev-debugging",title:"Debugging"},sidebar:"docs",previous:{title:"Writing The Python Interface",permalink:"/docs/dev-python-wrap"},next:{title:"Maintaining the Website",permalink:"/docs/dev-web"}},c={},d=[{value:"Finding the error",id:"finding-the-error",level:2},{value:"Makefile",id:"makefile",level:3},{value:"Python",id:"python",level:3},{value:"Non-fatal errors",id:"non-fatal-errors",level:2},{value:"Common Error Sources",id:"common-error-sources",level:2},{value:"Variable Reset",id:"variable-reset",level:3}],p={toc:d};function h(e){var t=e.components,n=(0,r.Z)(e,i);return(0,a.kt)("wrapper",(0,o.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"UCLCHEM is a complex code and many things can go wrong. Here, we'll list some of the things that often go wrong when you modify the code as well as a few helpful steps to trace down bugs."),(0,a.kt)("h2",{id:"finding-the-error"},"Finding the error"),(0,a.kt)("p",null,"An unfortunate side effect of the python installation process and running the code in python is that underlying errors can go missing. If you get an error it is often best to go as close to the source as you can. That means compiling the code with the makefile and running it through a python script or, failing that, the binary."),(0,a.kt)("h3",{id:"makefile"},"Makefile"),(0,a.kt)("p",null,"You'll find the source code and makefile in ",(0,a.kt)("inlineCode",{parentName:"p"},"src/fortran_src"),", if you run"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"cd src/fortran_src\nmake clean\nmake python\n")),(0,a.kt)("p",null,"you'll build the python wrap from scratch and you'll get any compilation errors printed to screen directly. These compilation errors should print when ",(0,a.kt)("inlineCode",{parentName:"p"},"pip install .")," fails but they can be lost in the python errors and often won't be as helpfully coloured as the direct output from ",(0,a.kt)("inlineCode",{parentName:"p"},"make"),". You can also go into the Makefile and change the compiler flags. Switching the optimization flags out for debugging flags will make the error easier to find. You'll find them in the Makefile:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-makefile"},"#Unforgiving debugging flags\n#FFLAGS =-g -fbacktrace -Wall -fcheck=all\n#Fast optimizing flags\nFFLAGS = -O3 -fPIC -ffree-line-length-0\n")),(0,a.kt)("p",null,"where you simply switch over which ",(0,a.kt)("inlineCode",{parentName:"p"},"FFLAGS")," is commented out."),(0,a.kt)("p",null,"You can also test for errors that come from the python interface by using ",(0,a.kt)("inlineCode",{parentName:"p"},"make")," instead of ",(0,a.kt)("inlineCode",{parentName:"p"},"make python"),". This will build a uclchem binary which you can simply run with the default parameters,"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"cd src/fortran_src\nmake\ncd ../../\n./uclchem CLOUD examples/phase1.inp\n")),(0,a.kt)("p",null,"Where phase1.inp is a parameter file written in a json like format and CLOUD is the type of model we'd like to run. Better yet, if you use the debugging flags to build this, you can run it in gdb."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-bash"},"gdb uclchem\nrun CLOUD examples/phase1.inp\n")),(0,a.kt)("p",null,"We can't go into detail on gdb is here but it's a terminal based debugger that can be used to trace down the error. It will often let you look at values of variables at the point where the code broke and give more information than the standard fortran outputs."),(0,a.kt)("h3",{id:"python"},"Python"),(0,a.kt)("p",null,"It's mentioned at several points in the docs but if you habitually run your UCLCHEM codes in jupyter notebooks, you'll find that error messages are often hidden from you. Any debugging should really be done via python script."),(0,a.kt)("h2",{id:"non-fatal-errors"},"Non-fatal errors"),(0,a.kt)("p",null,"Many errors will not stop the code compiling but are catastrophic. For example, you could introduce a new procedure that is valid Fortran but does not do what you want it to do. In these cases, you'll have to hunt the problem down yourself. We recommend running the test cases in ",(0,a.kt)("inlineCode",{parentName:"p"},"scripts/run_uclchem_tests.py")," and comparing the output to the ones in the example using the plot created by ",(0,a.kt)("inlineCode",{parentName:"p"},"scripts/plot_uclchem_tests.py"),". Sometimes, they'll be different because you introduced a change that you know will effect the chemistry. For example, you might have changed a desorption process and find the ice abundances change which is totally fine. However, if you see a change that is unexpected, you can investigate."),(0,a.kt)("p",null,"There's no better way to debug these errors than to simply print a lot of things to screen. It can seem silly but adding a bunch of write statements to your code is often the fastest way to track down what is going wrong."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-fortran"},'IF (myParam .gt. criticalValue) THEN\n write(*,*) "here!"\n !do stuff\nELSE\n write(*,*) "if not trigged because myParam is", myParam\n !do other stuff\nEND IF\n\n!do some processing\nCALL myNewSubroutine\nwrite(*,*) "myParam", myParam, "at code point x"\n\n')),(0,a.kt)("p",null,"Additions to the code like above will check the logic of your code is going the way you expect and that parameters aren't taking surprise values. If you have absolutely no suspicions about which part of your code is going wrong, you can use the subroutine ",(0,a.kt)("inlineCode",{parentName:"p"},"simpleDebug")," which is in the IO module (",(0,a.kt)("inlineCode",{parentName:"p"},"io.f90"),"). That prints a statement of your choice as well as many of the parameters."),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-fortran"},'!do some processing\nCALL myNewSubroutine\nCALL simpleDebug("Param values after myNewSubroutine")\n')),(0,a.kt)("h2",{id:"common-error-sources"},"Common Error Sources"),(0,a.kt)("h3",{id:"variable-reset"},"Variable Reset"),(0,a.kt)("p",null,"If you notice errors that only occur when you run the code more than once in a python script, then a common source is the initial value that variables take in the code. Variable initialization done at the declaration stage of a module only happens once. That is why the vast majority of variables that are not fortran parameters (constants) are set to an initial value by defaultparameters.f90 or in the initialization subroutines of the physics-core, chemistry, and physics modules."),(0,a.kt)("p",null,"It's very common when editing the code or adding new variables to forget to do this and then to see unusual behaviour when you run multiple models in a row in python."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/fe21a616.8e43114f.js b/assets/js/fe21a616.8e43114f.js deleted file mode 100644 index 9be91237..00000000 --- a/assets/js/fe21a616.8e43114f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6982],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>h});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(n),h=o,m=d["".concat(l,".").concat(h)]||d[h]||p[h]||a;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:o,i[1]=s;for(var u=2;u{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>u,toc:()=>p});var r=n(7462),o=n(3366),a=(n(7294),n(3905)),i=["components"],s={id:"dev-python-wrap",title:"Writing The Python Interface"},l=void 0,u={unversionedId:"dev-python-wrap",id:"version-v3.3.0/dev-python-wrap",title:"Writing The Python Interface",description:"The python interface is a relatively complex bit of code, a lot of work is put on the development side to make the user side a smooth experience. Writing the core of UCLCHEM in Fortran gives great performance benefits but compiling it to python with F2PY has its peculiarities. Here, we discuss the steps needed to adjust the code.",source:"@site/versioned_docs/version-v3.3.0/dev-python-wrap.md",sourceDirName:".",slug:"/dev-python-wrap",permalink:"/docs/dev-python-wrap",draft:!1,tags:[],version:"v3.3.0",frontMatter:{id:"dev-python-wrap",title:"Writing The Python Interface"},sidebar:"docs",previous:{title:"Overview of the Code",permalink:"/docs/dev-overview"},next:{title:"Debugging",permalink:"/docs/dev-debugging"}},c={},p=[{value:"The Fortran Side",id:"the-fortran-side",level:2},{value:"The Python Side",id:"the-python-side",level:2},{value:"Tips and Tricks",id:"tips-and-tricks",level:2}],d={toc:p};function h(e){var t=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The python interface is a relatively complex bit of code, a lot of work is put on the development side to make the user side a smooth experience. Writing the core of UCLCHEM in Fortran gives great performance benefits but compiling it to python with F2PY has its peculiarities. Here, we discuss the steps needed to adjust the code."),(0,a.kt)("h2",{id:"the-fortran-side"},"The Fortran Side"),(0,a.kt)("p",null,"The fortran side is the more difficult. We define a module in ",(0,a.kt)("inlineCode",{parentName:"p"},"src/fortran_src/wrap.f90")," which is a Fortran module that F2PY will turn into a python module. Any subroutine declared in ",(0,a.kt)("inlineCode",{parentName:"p"},"wrap.f90")," will become a function in the Python module."),(0,a.kt)("p",null,"The most likely change you'll want to make is to add a physics module so we'll look at cloud as an example. In ",(0,a.kt)("inlineCode",{parentName:"p"},"wrap.f90")," cloud is declared:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-fortran"}," SUBROUTINE cloud(dictionary, outSpeciesIn,abundance_out,successFlag)\n USE cloud_mod\n\n CHARACTER(LEN=*) :: dictionary, outSpeciesIn\n DOUBLE PRECISION :: abundance_out(500)\n INTEGER :: successFlag\n !f2py intent(in) dictionary,outSpeciesIn\n !f2py intent(out) abundance_out,successFlag\n ...\n END SUBROUTINE\n")),(0,a.kt)("p",null,"where we've dropped the bulk of the code since we only care about the declaration. Once compiled, you will be able to call this function using ",(0,a.kt)("inlineCode",{parentName:"p"},"uclchem.wrap.cloud(dictionary,outSpeciesIn)"),"."),(0,a.kt)("p",null,"This works because we've done two things. First, we've declared both the two inputs and the two outputs as arguments in Fortran in the normal way. Both inputs and outputs of a subroutine are declared as arguments in Fortran, usually with an ",(0,a.kt)("inlineCode",{parentName:"p"},"INTENT(IN)")," or ",(0,a.kt)("inlineCode",{parentName:"p"},"INTENT(OUT)")," statement, although that is unnecessary. We then declare the intent of those argument for F2PY using the comments that start ",(0,a.kt)("inlineCode",{parentName:"p"},"!f2py")," to tell F2PY which arguments should be arguments of the corresponding python function and which should be outputs."),(0,a.kt)("h2",{id:"the-python-side"},"The Python Side"),(0,a.kt)("p",null,"We could leave it at that. However, for ease of use, we write pure python functions in the uclchem module which call the underlying wrap functions rather than having users directly access the f2py functions. For example, in ",(0,a.kt)("inlineCode",{parentName:"p"},"uclchem.model"),", we define a cloud function which calls ",(0,a.kt)("inlineCode",{parentName:"p"},"wrap.cloud"),":"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-python"},'\ndef cloud(param_dict=None, out_species=None):\n """Run cloud model from UCLCHEM\n\n Args:\n param_dict (dict,optional): A dictionary of parameters where keys are any of the variables in defaultparameters.f90 and values are value for current run.\n out_species (list, optional): A list of species for which final abundance will be returned. If None, no abundances will be returned.. Defaults to None.\n\n Returns:\n int,list: A integer which is negative if the model failed to run, or a list of abundances of all species in `outSpecies`\n """\n n_out,param_dict,out_species=_reform_inputs(param_dict,out_species)\n abunds, success_flag = wrap.cloud(dictionary=param_dict, outspeciesin=out_species)\n if success_flag < 0 or n_out == 0:\n return success_flag\n else:\n return abunds[: n_out]\n')),(0,a.kt)("p",null,"This allows us to make some arguments optional using python's keyword arguments. It also lets us write docstrings from which we can generate documentation for the functions. Finally, it lets us tidy up the output! For example, arrays passed too and from the Fortran subroutines must be of fixed length so in this function, we cut the output abundance array down to just the elements the user actually wanted."),(0,a.kt)("h2",{id:"tips-and-tricks"},"Tips and Tricks"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Once imported, all values are initialized in UCLCHEM. Calling a subroutine multiple times does not reset variables. That is to say that if your Fortran modules declare variables with an initial value, those variables will not return to those initial values. Instead, you'll notice all our modules reset their variables manually in the initialize functions such as initializePhysics.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Debugging your fortran code can be greatly complicated by the F2PY interface. Consider compiling the fortran source to test any code changes before trying to compile the python version.")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("p",{parentName:"li"},"Python handles errors much more gracefully than Fortran. We have tried to use ",(0,a.kt)("inlineCode",{parentName:"p"},"successFlag")," as a return from most subroutines as a way to tell Python that the Fortran run failed. It can be a pain to set up the chain of successFlag returns from modules in Fortran but if you use something like Fortran's ",(0,a.kt)("inlineCode",{parentName:"p"},"STOP"),", you'll likely kill your python in a way that won't let you use ",(0,a.kt)("inlineCode",{parentName:"p"},"try:, except:")," statements to handle it."))))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.33219f7a.js b/assets/js/main.33219f7a.js deleted file mode 100644 index ce5930f2..00000000 --- a/assets/js/main.33219f7a.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.33219f7a.js.LICENSE.txt */ -(self.webpackChunk=self.webpackChunk||[]).push([[179],{1205:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);k+=_.value.length,_=_.next){var x=_.value;if(t.length>e.length)return;if(!(x instanceof o)){var S,C=1;if(b){if(!(S=a(E,k,e,v))||S.index>=e.length)break;var T=S.index,A=S.index+S[0].length,L=k;for(L+=_.value.length;T>=L;)L+=(_=_.next).value.length;if(k=L-=_.value.length,_.value instanceof o)continue;for(var N=_;N!==t.tail&&(Ld.reach&&(d.reach=R);var D=_.prev;if(I&&(D=l(t,D,I),k+=I.length),c(t,D,C),_=l(t,D,new o(f,g?r.tokenize(O,g):O,y,O)),P&&l(t,_,P),C>1){var M={cause:f+","+m,reach:R};i(e,t,n,_.prev,k,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o"+a.content+""},r}(),o=r;r.default=r,o.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},o.languages.markup.tag.inside["attr-value"].inside.entity=o.languages.markup.entity,o.languages.markup.doctype.inside["internal-subset"].inside=o.languages.markup,o.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:o.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:o.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},o.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(o.languages.markup.tag,"addAttribute",{value:function(e,t){o.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:o.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),o.languages.html=o.languages.markup,o.languages.mathml=o.languages.markup,o.languages.svg=o.languages.markup,o.languages.xml=o.languages.extend("markup",{}),o.languages.ssml=o.languages.xml,o.languages.atom=o.languages.xml,o.languages.rss=o.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},o.languages.c=o.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),o.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),o.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},o.languages.c.string],char:o.languages.c.char,comment:o.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:o.languages.c}}}}),o.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete o.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(o),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(o),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(o),o.languages.javascript=o.languages.extend("clike",{"class-name":[o.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),o.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,o.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:o.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:o.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:o.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:o.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:o.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),o.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:o.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),o.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),o.languages.markup&&(o.languages.markup.tag.addInlined("script","javascript"),o.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),o.languages.js=o.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(o),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(o),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+a+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+a+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(o),o.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:o.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},o.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var s=f(/^\{$/,/^\}$/);if(-1===s)continue;for(var l=n;l=0&&p(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function l(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function c(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,l(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function u(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,u={},d=l(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=s(i++,r)););return u[n]=o,n})).join(""),n,r),f=Object.keys(u);return i=0,function e(t){for(var n=0;n=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=f[i],a="string"==typeof r?r:r.content,s=a.indexOf(o);if(-1!==s){++i;var l=a.substring(0,s),d=c(u[o]),p=a.substring(s+o.length),m=[];if(l&&m.push(l),m.push(d),p){var h=[p];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(o),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function a(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},s=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var l=i(o);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=i(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(o),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(o),o.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},o.languages.go=o.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),o.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete o.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,s=i.length;-1!==n.code.indexOf(o=t(r,s));)++s;return i[s]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(s){for(var l=0;l=a.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),m=f.indexOf(p);if(m>-1){++o;var h=f.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=f.substring(m+p.length),b=[];h&&b.push.apply(b,i([h])),b.push(g),v&&b.push.apply(b,i([v])),"string"==typeof c?s.splice.apply(s,[l,1].concat(b)):c.content=b}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(o),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(o),o.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},o.languages.webmanifest=o.languages.json,o.languages.less=o.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),o.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),o.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},o.languages.objectivec=o.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete o.languages.objectivec["class-name"],o.languages.objc=o.languages.objectivec,o.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},o.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},o.languages.python["string-interpolation"].inside.interpolation.inside.rest=o.languages.python,o.languages.py=o.languages.python,o.languages.reason=o.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),o.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete o.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(o),o.languages.scss=o.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),o.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),o.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),o.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),o.languages.scss.atrule.inside.rest=o.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(o),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(o),o.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const a=o},723:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7294),o=n(7462),a=n(8356),i=n.n(a),s=n(6887);const l={"04f8940c":[function(){return n.e(9977).then(n.bind(n,3090))},"@site/versioned_docs/version-v3.2.0/chem-desorb.md",3090],"0588cae0":[function(){return n.e(2472).then(n.t.bind(n,2815,19))},"~docs/default/category-docs-docs-category-chemistry-ff8.json",2815],"0769f0fc":[function(){return n.e(7129).then(n.bind(n,674))},"@site/versioned_docs/version-v3.3.0/chem-bulk.md",674],"08daa2f3":[function(){return n.e(7942).then(n.bind(n,9539))},"@site/versioned_docs/version-v3.2.0/start-pythonapi.md",9539],"0a312c56":[function(){return n.e(1089).then(n.bind(n,1479))},"@site/versioned_docs/version-v3.1.0/modelling_objects.md",1479],"0aba1dff":[function(){return n.e(7688).then(n.bind(n,7397))},"@site/versioned_docs/version-v3.3.0/chemical_analysis.md",7397],"0e89b35c":[function(){return n.e(3609).then(n.bind(n,6046))},"@site/blog/2018-06-20-izaskun-phosphorus.md?truncated=true",6046],"1465a325":[function(){return n.e(4870).then(n.bind(n,3588))},"@site/versioned_docs/version-v3.3.0/start-pythonapi.md",3588],"14eb3368":[function(){return Promise.all([n.e(532),n.e(9817)]).then(n.bind(n,4228))},"@theme/DocCategoryGeneratedIndexPage",4228],17896441:[function(){return Promise.all([n.e(532),n.e(7080),n.e(7918)]).then(n.bind(n,5154))},"@theme/DocItem",5154],"178ac850":[function(){return n.e(4006).then(n.bind(n,8357))},"@site/versioned_docs/version-v3.3.0/chem-grain.md",8357],"197ac2f1":[function(){return n.e(6556).then(n.bind(n,8172))},"@site/docs/first_model.md",8172],"19d37fc1":[function(){return n.e(8530).then(n.bind(n,6295))},"@site/blog/2022-02-06-holdship-hits.md",6295],"1b622d29":[function(){return n.e(1418).then(n.bind(n,7454))},"@site/versioned_docs/version-v3.3.0/first_model.md",7454],"1ba038cd":[function(){return n.e(2091).then(n.bind(n,3269))},"@site/versioned_docs/version-v3.1.0/chemical_analysis.md",3269],"1be78505":[function(){return Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,9963))},"@theme/DocPage",9963],"1cd6d774":[function(){return Promise.all([n.e(532),n.e(1898)]).then(n.bind(n,1247))},"@site/src/pages/emulators.js",1247],"1dba9094":[function(){return n.e(5217).then(n.bind(n,7264))},"@site/src/pages/users.js",7264],"1e1adb0b":[function(){return n.e(2569).then(n.bind(n,6003))},"@site/versioned_docs/version-v3.1.0/start-basicuse.md",6003],"1f072b81":[function(){return n.e(1417).then(n.bind(n,3812))},"@site/versioned_docs/version-v3.1.0/start-pythonapi.md",3812],"236d4ea4":[function(){return n.e(3738).then(n.bind(n,7950))},"@site/docs/dev-debugging.md",7950],"236fea48":[function(){return n.e(8877).then(n.bind(n,3649))},"@site/blog/2020-12-07-milena-nitrogen-solis.md?truncated=true",3649],"25925e1d":[function(){return n.e(5559).then(n.bind(n,2050))},"@site/blog/2019-12-10-tom-shock.md?truncated=true",2050],"27f461e9":[function(){return n.e(1847).then(n.bind(n,1368))},"@site/docs/hydro.md",1368],"297e8b98":[function(){return n.e(5550).then(n.bind(n,8134))},"@site/versioned_docs/version-v3.2.0/chemical_analysis.md",8134],"2a453c93":[function(){return n.e(7258).then(n.bind(n,9778))},"@site/versioned_docs/version-v3.3.0/physics-collapse.md",9778],"2b8e142a":[function(){return n.e(6176).then(n.t.bind(n,8257,19))},"~docs/default/category-docsv-320-docs-category-developer-notes-691.json",8257],"2dbc3c34":[function(){return n.e(3357).then(n.bind(n,40))},"@site/docs/trouble-integration.md",40],30669678:[function(){return n.e(4129).then(n.bind(n,3015))},"@site/blog/2019-08-13-serena-carbon-frac.md",3015],"32e9b7cb":[function(){return n.e(2927).then(n.bind(n,7501))},"@site/versioned_docs/version-v3.1.0/start-network.md",7501],"33e58627":[function(){return n.e(1007).then(n.bind(n,6459))},"@site/versioned_docs/version-v3.1.0/trouble-compile.md",6459],"3492d4cd":[function(){return n.e(872).then(n.bind(n,8660))},"@site/blog/2020-02-14-New-Website.md",8660],"37df37e5":[function(){return n.e(3412).then(n.bind(n,6521))},"@site/docs/start-pythonapi.md",6521],"3ca268a2":[function(){return n.e(3065).then(n.bind(n,4808))},"@site/docs/start-basicuse.md",4808],"3ca94418":[function(){return n.e(814).then(n.bind(n,1632))},"@site/versioned_docs/version-v3.2.0/physics-hotcore.md",1632],"4029de32":[function(){return n.e(5973).then(n.bind(n,14))},"@site/versioned_docs/version-v3.2.0/start-parameters.md",14],"405e629b":[function(){return n.e(8807).then(n.t.bind(n,7039,19))},"~docs/default/category-docsnext-docs-category-getting-started-8a4.json",7039],"43cd5493":[function(){return n.e(4401).then(n.bind(n,9659))},"@site/docs/chem-gas.md",9659],"441d6760":[function(){return n.e(551).then(n.t.bind(n,5882,19))},"~docs/default/category-docsnext-docs-category-developer-notes-781.json",5882],"44815e26":[function(){return n.e(9125).then(n.bind(n,491))},"@site/blog/2018-03-27-audrey-coms.md?truncated=true",491],"44936c8a":[function(){return n.e(6901).then(n.bind(n,4751))},"@site/versioned_docs/version-v3.2.0/chem-gas.md",4751],45922241:[function(){return n.e(7441).then(n.t.bind(n,7658,19))},"~docs/default/category-docsv-310-docs-category-getting-started-cb5.json",7658],"463275cf":[function(){return n.e(7197).then(n.bind(n,116))},"@site/versioned_docs/version-v3.1.0/chem-bulk.md",116],"476a8e90":[function(){return n.e(6297).then(n.t.bind(n,666,19))},"~docs/default/category-docsv-320-docs-category-chemistry-362.json",666],"4791faca":[function(){return n.e(1702).then(n.bind(n,5476))},"@site/versioned_docs/version-v3.1.0/physics-shocks.md",5476],"4b111dda":[function(){return n.e(5241).then(n.bind(n,8034))},"@site/blog/2018-03-27-audrey-coms.md",8034],"4c70ee09":[function(){return n.e(1841).then(n.bind(n,8879))},"@site/blog/2018-07-12-felix-collapse.md?truncated=true",8879],"4c7304f4":[function(){return n.e(2764).then(n.bind(n,7544))},"@site/docs/running_a_grid.md",7544],"4f352dd6":[function(){return n.e(4908).then(n.bind(n,2325))},"@site/blog/2022-04-14-crir-ngc253.md",2325],"512466b5":[function(){return n.e(2080).then(n.bind(n,8332))},"@site/docs/physics-shocks.md",8332],"52addc0b":[function(){return n.e(3245).then(n.t.bind(n,6056,19))},"~docs/default/category-docs-docs-category-getting-started-0e8.json",6056],"538f2129":[function(){return n.e(9561).then(n.bind(n,2744))},"@site/versioned_docs/version-v3.1.0/running_a_grid.md",2744],54674114:[function(){return n.e(9920).then(n.t.bind(n,8828,19))},"~docs/default/category-docs-docs-category-developer-notes-fb9.json",8828],"565aba73":[function(){return n.e(6416).then(n.t.bind(n,7398,19))},"~docs/default/category-docsv-310-docs-category-developer-notes-0bd.json",7398],"56e1034f":[function(){return n.e(6137).then(n.bind(n,9803))},"@site/blog/2020-02-14-New-Website.md?truncated=true",9803],"5a334135":[function(){return n.e(7950).then(n.bind(n,4178))},"@site/versioned_docs/version-v3.2.0/trouble-integration.md",4178],"5a7d93ee":[function(){return n.e(9364).then(n.bind(n,2962))},"@site/versioned_docs/version-v3.2.0/dev-overview.md",2962],"5b2a0f0d":[function(){return n.e(7570).then(n.bind(n,1993))},"@site/versioned_docs/version-v3.3.0/dev-debugging.md",1993],"5bfb9a5a":[function(){return n.e(978).then(n.bind(n,968))},"@site/blog/2022-04-14-crir-ngc253.md?truncated=true",968],"5dbea504":[function(){return n.e(5138).then(n.bind(n,2472))},"@site/versioned_docs/version-v3.1.0/physics-cloud.md",2472],"5e9f5e1a":[function(){return Promise.resolve().then(n.bind(n,6809))},"@generated/docusaurus.config",6809],"607afc38":[function(){return n.e(6275).then(n.bind(n,2087))},"@site/docs/dev-python-wrap.md",2087],"6101527a":[function(){return n.e(2471).then(n.bind(n,3519))},"@site/blog/2020-12-07-milena-nitrogen-solis.md",3519],"61e2a305":[function(){return n.e(193).then(n.bind(n,4104))},"@site/versioned_docs/version-v3.2.0/first_model.md",4104],"634b82b7":[function(){return n.e(5572).then(n.bind(n,8306))},"@site/versioned_docs/version-v3.3.0/trouble-integration.md",8306],"640703ca":[function(){return n.e(1231).then(n.bind(n,8004))},"@site/blog/2019-08-13-serena-carbon-frac.md?truncated=true",8004],"646f4bf3":[function(){return Promise.all([n.e(532),n.e(7722)]).then(n.bind(n,3832))},"@site/src/pages/uclchemcmc.js",3832],"668339d9":[function(){return n.e(2963).then(n.bind(n,4533))},"@site/versioned_docs/version-v3.3.0/chem-desorb.md",4533],"670f431a":[function(){return n.e(4723).then(n.bind(n,121))},"@site/docs/trouble-compile.md",121],"689d9eaa":[function(){return Promise.all([n.e(532),n.e(7737)]).then(n.bind(n,1154))},"@site/src/pages/othersoftware.js",1154],"6a488aa2":[function(){return n.e(4455).then(n.bind(n,5326))},"@site/blog/2018-02-05-david-grains.md",5326],"6a4b9492":[function(){return n.e(3119).then(n.bind(n,3542))},"@site/docs/modelling_objects.md",3542],"6aaec6ca":[function(){return n.e(1138).then(n.bind(n,5471))},"@site/versioned_docs/version-v3.3.0/start-network.md",5471],"6ba1b442":[function(){return n.e(3828).then(n.bind(n,2557))},"@site/versioned_docs/version-v3.1.0/chem-desorb.md",2557],"6bb3e248":[function(){return n.e(7524).then(n.bind(n,3941))},"@site/docs/physics-collapse.md",3941],"6c2487b5":[function(){return n.e(2468).then(n.bind(n,3619))},"@site/versioned_docs/version-v3.1.0/trouble-integration.md",3619],"6c5fb57f":[function(){return n.e(3817).then(n.bind(n,8459))},"@site/versioned_docs/version-v3.1.0/physics-core.md",8459],"71908c5e":[function(){return n.e(2433).then(n.bind(n,574))},"@site/blog/2018-07-12-felix-collapse.md",574],"7aa4d0e1":[function(){return n.e(9002).then(n.bind(n,1545))},"@site/docs/start-parameters.md",1545],"7b253f47":[function(){return n.e(9260).then(n.bind(n,91))},"@site/versioned_docs/version-v3.1.0/physics-hotcore.md",91],"7bc80f3c":[function(){return n.e(1757).then(n.bind(n,4513))},"@site/blog/2019-04-19-serena-nitrogen-frac.md",4513],"7c193f36":[function(){return n.e(7474).then(n.bind(n,6624))},"@site/docs/physics-hotcore.md",6624],"7cbbac6d":[function(){return n.e(9206).then(n.bind(n,7132))},"@site/versioned_docs/version-v3.1.0/first_model.md",7132],"7e37206e":[function(){return n.e(2740).then(n.bind(n,5401))},"@site/src/pages/help.js",5401],"7f120b4d":[function(){return n.e(6764).then(n.bind(n,8517))},"@site/docs/chem-desorb.md",8517],"812cb1a9":[function(){return n.e(968).then(n.bind(n,7209))},"@site/blog/2022-02-06-holdship-hits.md?truncated=true",7209],"814f3328":[function(){return n.e(2535).then(n.t.bind(n,5641,19))},"~blog/default/blog-post-list-prop-default.json",5641],"82de2e50":[function(){return n.e(7928).then(n.bind(n,9997))},"@site/docs/chem-grain.md",9997],"82e83611":[function(){return n.e(7732).then(n.bind(n,4038))},"@site/versioned_docs/version-v3.1.0/chem-gas.md",4038],83622784:[function(){return n.e(2347).then(n.bind(n,4975))},"@site/versioned_docs/version-v3.3.0/physics-core.md",4975],"8524628b":[function(){return n.e(8662).then(n.bind(n,4746))},"@site/versioned_docs/version-v3.2.0/physics-core.md",4746],"87033a11":[function(){return n.e(1157).then(n.bind(n,13))},"@site/blog/2022-04-29-uclchem-v3.md?truncated=true",13],"875220c9":[function(){return n.e(1714).then(n.bind(n,9365))},"@site/versioned_docs/version-v3.3.0/physics-shocks.md",9365],"8762eb7f":[function(){return n.e(5013).then(n.bind(n,9511))},"@site/docs/chemical_analysis.md",9511],87956035:[function(){return n.e(8489).then(n.t.bind(n,6954,19))},"~docs/default/category-docsnext-docs-category-chemistry-2ce.json",6954],"8880c86b":[function(){return n.e(8924).then(n.bind(n,4042))},"@site/versioned_docs/version-v3.3.0/physics-cloud.md",4042],"8b9fbec9":[function(){return n.e(4392).then(n.bind(n,8008))},"@site/docs/chem-notation.md",8008],"8cd0bbdb":[function(){return n.e(4463).then(n.bind(n,7677))},"@site/versioned_docs/version-v3.2.0/trouble-compile.md",7677],"8e6ea0e6":[function(){return n.e(4486).then(n.bind(n,148))},"@site/blog/2022-04-29-uclchem-v3.md",148],"8eb4e46b":[function(){return n.e(1).then(n.t.bind(n,2638,19))},"~blog/default/blog-page-2-677.json",2638],"8eef9ab5":[function(){return Promise.all([n.e(532),n.e(6995)]).then(n.bind(n,9235))},"@site/src/pages/3dpdr.js",9235],"8f25fbab":[function(){return n.e(9707).then(n.bind(n,1113))},"@site/versioned_docs/version-v3.2.0/dev-debugging.md",1113],"91c2cef2":[function(){return n.e(6967).then(n.t.bind(n,8552,19))},"~docs/default/category-docsv-320-docs-category-tutorials-336.json",8552],"935f2afb":[function(){return n.e(53).then(n.t.bind(n,1109,19))},"~docs/default/version-current-metadata-prop-751.json",1109],"93b8a6b4":[function(){return n.e(9780).then(n.bind(n,4111))},"@site/versioned_docs/version-v3.2.0/dev-web.md",4111],"950fd243":[function(){return n.e(2408).then(n.bind(n,817))},"@site/versioned_docs/version-v3.2.0/start-network.md",817],"9516cbb3":[function(){return n.e(1278).then(n.bind(n,5863))},"@site/versioned_docs/version-v3.3.0/chem-gas.md",5863],"957548e4":[function(){return n.e(5114).then(n.bind(n,6476))},"@site/blog/2018-02-05-david-grains.md?truncated=true",6476],"95c680a9":[function(){return n.e(5251).then(n.bind(n,7905))},"@site/blog/2019-07-08-felix-ambipolar.md",7905],"968bdb06":[function(){return n.e(1859).then(n.bind(n,8573))},"@site/versioned_docs/version-v3.1.0/hydro.md",8573],"9968756c":[function(){return n.e(6639).then(n.bind(n,2348))},"@site/versioned_docs/version-v3.1.0/dev-python-wrap.md",2348],"9b050cce":[function(){return n.e(692).then(n.t.bind(n,6932,19))},"~docs/default/version-v-3-1-0-metadata-prop-f5c.json",6932],"9e4087bc":[function(){return n.e(3608).then(n.bind(n,3169))},"@theme/BlogArchivePage",3169],"9faf9bc8":[function(){return n.e(1754).then(n.bind(n,3134))},"@site/versioned_docs/version-v3.1.0/physics-collapse.md",3134],a070733c:[function(){return n.e(4621).then(n.bind(n,7639))},"@site/versioned_docs/version-v3.1.0/dev-overview.md",7639],a30e1db8:[function(){return n.e(8585).then(n.bind(n,9322))},"@site/docs/physics-core.md",9322],a392f71d:[function(){return n.e(7561).then(n.bind(n,3885))},"@site/versioned_docs/version-v3.2.0/chem-bulk.md",3885],a487fab1:[function(){return n.e(3958).then(n.bind(n,4276))},"@site/versioned_docs/version-v3.3.0/chem-notation.md",4276],a6aa9e1f:[function(){return Promise.all([n.e(532),n.e(7080),n.e(8218),n.e(3089)]).then(n.bind(n,6167))},"@theme/BlogListPage",6167],a6d620e2:[function(){return n.e(6357).then(n.t.bind(n,3769,19))},"/Users/gijsv/uclchem/uclchem.github.io/website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],a9bdb9a1:[function(){return n.e(9445).then(n.bind(n,8905))},"@site/blog/2019-12-10-tom-shock.md",8905],ac0abaaf:[function(){return n.e(2082).then(n.t.bind(n,5539,19))},"~docs/default/category-docsv-320-docs-category-getting-started-85e.json",5539],af160429:[function(){return n.e(6569).then(n.bind(n,5096))},"@site/versioned_docs/version-v3.3.0/running_a_grid.md",5096],b2b675dd:[function(){return n.e(533).then(n.t.bind(n,8017,19))},"~blog/default/blog-c06.json",8017],b2effb50:[function(){return n.e(5626).then(n.t.bind(n,943,19))},"~docs/default/version-v-3-2-0-metadata-prop-4e3.json",943],b2f554cd:[function(){return n.e(1477).then(n.t.bind(n,10,19))},"~blog/default/blog-archive-80c.json",10],b4779a4a:[function(){return n.e(1299).then(n.bind(n,9096))},"@site/versioned_docs/version-v3.2.0/physics-cloud.md",9096],b7364548:[function(){return n.e(6742).then(n.bind(n,7320))},"@site/versioned_docs/version-v3.3.0/trouble-compile.md",7320],ba4d4e72:[function(){return n.e(7209).then(n.bind(n,2648))},"@site/versioned_docs/version-v3.1.0/start-parameters.md",2648],bad762d9:[function(){return n.e(7042).then(n.bind(n,7345))},"@site/versioned_docs/version-v3.3.0/start-parameters.md",7345],bc72a998:[function(){return n.e(9926).then(n.bind(n,7045))},"@site/versioned_docs/version-v3.3.0/dev-overview.md",7045],bef14caa:[function(){return n.e(9697).then(n.t.bind(n,4469,19))},"/Users/gijsv/uclchem/uclchem.github.io/website/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json",4469],c17a6496:[function(){return n.e(5401).then(n.bind(n,6489))},"@site/versioned_docs/version-v3.2.0/running_a_grid.md",6489],c2a99c14:[function(){return n.e(9217).then(n.bind(n,4375))},"@site/versioned_docs/version-v3.1.0/dev-debugging.md",4375],c491cf8e:[function(){return n.e(6152).then(n.t.bind(n,5745,19))},"/Users/gijsv/uclchem/uclchem.github.io/website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],c4e6c98a:[function(){return n.e(9011).then(n.bind(n,7856))},"@site/versioned_docs/version-v3.2.0/modelling_objects.md",7856],c4f5d8e4:[function(){return Promise.all([n.e(532),n.e(4195)]).then(n.bind(n,2841))},"@site/src/pages/index.js",2841],c610bb95:[function(){return n.e(2106).then(n.bind(n,8930))},"@site/versioned_docs/version-v3.3.0/modelling_objects.md",8930],c8755060:[function(){return n.e(3501).then(n.bind(n,4875))},"@site/docs/physics-cloud.md",4875],ca07b522:[function(){return n.e(1069).then(n.bind(n,3467))},"@site/docs/chem-bulk.md",3467],cb3beda6:[function(){return n.e(6439).then(n.bind(n,899))},"@site/versioned_docs/version-v3.2.0/hydro.md",899],cb646038:[function(){return n.e(1428).then(n.bind(n,8707))},"@site/versioned_docs/version-v3.2.0/chem-grain.md",8707],ccc49370:[function(){return Promise.all([n.e(532),n.e(7080),n.e(8218),n.e(6103)]).then(n.bind(n,5203))},"@theme/BlogPostPage",5203],cf6a431d:[function(){return n.e(7831).then(n.bind(n,793))},"@site/versioned_docs/version-v3.3.0/start-basicuse.md",793],d226c097:[function(){return n.e(8151).then(n.bind(n,1313))},"@site/versioned_docs/version-v3.2.0/physics-shocks.md",1313],d26b1119:[function(){return n.e(3053).then(n.bind(n,2448))},"@site/docs/start-network.md",2448],d59b2eda:[function(){return n.e(3029).then(n.bind(n,7289))},"@site/versioned_docs/version-v3.2.0/start-basicuse.md",7289],d778b222:[function(){return n.e(4883).then(n.bind(n,2198))},"@site/versioned_docs/version-v3.2.0/physics-collapse.md",2198],d81cd816:[function(){return Promise.all([n.e(532),n.e(1071)]).then(n.bind(n,3734))},"@site/src/pages/ucl_pdr.js",3734],e0f39a39:[function(){return n.e(2988).then(n.bind(n,7634))},"@site/versioned_docs/version-v3.3.0/dev-web.md",7634],e2bcb55a:[function(){return n.e(7964).then(n.bind(n,445))},"@site/blog/2019-04-19-serena-nitrogen-frac.md?truncated=true",445],e39b6181:[function(){return n.e(4730).then(n.bind(n,8917))},"@site/docs/dev-overview.md",8917],e3e9e529:[function(){return n.e(3302).then(n.t.bind(n,369,19))},"~docs/default/version-v-3-3-0-metadata-prop-c91.json",369],e7ddec96:[function(){return n.e(5226).then(n.bind(n,1591))},"@site/versioned_docs/version-v3.1.0/chem-grain.md",1591],e8abc400:[function(){return n.e(4274).then(n.bind(n,7427))},"@site/versioned_docs/version-v3.1.0/dev-web.md",7427],f0775422:[function(){return n.e(7363).then(n.bind(n,2963))},"@site/versioned_docs/version-v3.3.0/hydro.md",2963],f2741056:[function(){return n.e(826).then(n.t.bind(n,6982,19))},"~docs/default/category-docs-docs-category-tutorials-a53.json",6982],f364ae83:[function(){return n.e(4081).then(n.bind(n,2578))},"@site/versioned_docs/version-v3.3.0/physics-hotcore.md",2578],f38a4f40:[function(){return n.e(6807).then(n.t.bind(n,3410,19))},"~docs/default/category-docsv-310-docs-category-tutorials-c56.json",3410],f4b3c076:[function(){return n.e(204).then(n.bind(n,4829))},"@site/blog/2019-07-08-felix-ambipolar.md?truncated=true",4829],f85ff90a:[function(){return n.e(1667).then(n.bind(n,9931))},"@site/blog/2018-06-20-izaskun-phosphorus.md",9931],faeac2ec:[function(){return n.e(9194).then(n.t.bind(n,8183,19))},"~docs/default/category-docsv-310-docs-category-chemistry-0f4.json",8183],fb9afbe1:[function(){return n.e(3433).then(n.bind(n,5239))},"@site/versioned_docs/version-v3.2.0/dev-python-wrap.md",5239],fc02e47e:[function(){return n.e(3521).then(n.t.bind(n,7505,19))},"~docs/default/category-docsnext-docs-category-tutorials-3fb.json",7505],fc1c51fa:[function(){return n.e(6257).then(n.bind(n,7360))},"@site/docs/dev-web.md",7360],fe21a616:[function(){return n.e(6982).then(n.bind(n,7885))},"@site/versioned_docs/version-v3.3.0/dev-python-wrap.md",7885]};function c(e){var t=e.error,n=e.retry,o=e.pastDelay;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):o?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var u=n(9670),d=n(226);function f(e,t){if("*"===e)return i()({loading:c,loader:function(){return n.e(4972).then(n.bind(n,4972))},modules:["@theme/NotFound"],webpack:function(){return[4972]},render:function(e,t){var n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});var a=s[e+"-"+t],f={},p=[],m=[],h=(0,u.Z)(a);return Object.entries(h).forEach((function(e){var t=e[0],n=e[1],r=l[n];r&&(f[t]=r[0],p.push(r[1]),m.push(r[2]))})),i().Map({loading:c,loader:f,modules:p,webpack:function(){return m},render:function(t,n){var i=JSON.parse(JSON.stringify(a));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){o[e]=r[e]}));var a=i,s=n.split(".");s.slice(0,-1).forEach((function(e){a=a[e]})),a[s[s.length-1]]=o}));var s=i.__comp;delete i.__comp;var l=i.__context;return delete i.__context,r.createElement(d.z,{value:l},r.createElement(s,(0,o.Z)({},i,n)))}})}const p=[{path:"/3dpdr",component:f("/3dpdr","fbd"),exact:!0},{path:"/blog",component:f("/blog","a75"),exact:!0},{path:"/blog/2018/02/05/david-grains",component:f("/blog/2018/02/05/david-grains","70c"),exact:!0},{path:"/blog/2018/03/27/audrey-coms",component:f("/blog/2018/03/27/audrey-coms","e4f"),exact:!0},{path:"/blog/2018/06/20/izaskun-phosphorus",component:f("/blog/2018/06/20/izaskun-phosphorus","3c8"),exact:!0},{path:"/blog/2018/07/12/felix-collapse",component:f("/blog/2018/07/12/felix-collapse","038"),exact:!0},{path:"/blog/2019/04/19/serena-nitrogen-frac",component:f("/blog/2019/04/19/serena-nitrogen-frac","4ee"),exact:!0},{path:"/blog/2019/07/08/felix-ambipolar",component:f("/blog/2019/07/08/felix-ambipolar","790"),exact:!0},{path:"/blog/2019/08/13/serena-carbon-frac",component:f("/blog/2019/08/13/serena-carbon-frac","aad"),exact:!0},{path:"/blog/2019/12/10/tom-shock",component:f("/blog/2019/12/10/tom-shock","804"),exact:!0},{path:"/blog/2020/02/14/New-Website",component:f("/blog/2020/02/14/New-Website","6e6"),exact:!0},{path:"/blog/2020/12/07/milena-nitrogen-solis",component:f("/blog/2020/12/07/milena-nitrogen-solis","e7b"),exact:!0},{path:"/blog/2022/02/06/holdship-hits",component:f("/blog/2022/02/06/holdship-hits","828"),exact:!0},{path:"/blog/2022/04/14/crir-ngc253",component:f("/blog/2022/04/14/crir-ngc253","4c3"),exact:!0},{path:"/blog/2022/04/29/uclchem-v3",component:f("/blog/2022/04/29/uclchem-v3","5ef"),exact:!0},{path:"/blog/archive",component:f("/blog/archive","9ae"),exact:!0},{path:"/blog/page/2",component:f("/blog/page/2","a6a"),exact:!0},{path:"/emulators",component:f("/emulators","c95"),exact:!0},{path:"/help",component:f("/help","cb7"),exact:!0},{path:"/othersoftware",component:f("/othersoftware","3f0"),exact:!0},{path:"/ucl_pdr",component:f("/ucl_pdr","aa8"),exact:!0},{path:"/uclchemcmc",component:f("/uclchemcmc","324"),exact:!0},{path:"/users",component:f("/users","06f"),exact:!0},{path:"/docs/next",component:f("/docs/next","4f0"),routes:[{path:"/docs/next/",component:f("/docs/next/","ead"),exact:!0,sidebar:"docs"},{path:"/docs/next/bulk",component:f("/docs/next/bulk","508"),exact:!0,sidebar:"docs"},{path:"/docs/next/category/chemistry",component:f("/docs/next/category/chemistry","bd6"),exact:!0,sidebar:"docs"},{path:"/docs/next/category/developer",component:f("/docs/next/category/developer","a3e"),exact:!0,sidebar:"docs"},{path:"/docs/next/category/getting-started",component:f("/docs/next/category/getting-started","a42"),exact:!0,sidebar:"docs"},{path:"/docs/next/category/tutorials",component:f("/docs/next/category/tutorials","e3c"),exact:!0,sidebar:"docs"},{path:"/docs/next/chemical_analysis",component:f("/docs/next/chemical_analysis","a15"),exact:!0,sidebar:"docs"},{path:"/docs/next/desorb",component:f("/docs/next/desorb","94f"),exact:!0,sidebar:"docs"},{path:"/docs/next/dev-debugging",component:f("/docs/next/dev-debugging","21d"),exact:!0,sidebar:"docs"},{path:"/docs/next/dev-overview",component:f("/docs/next/dev-overview","f69"),exact:!0,sidebar:"docs"},{path:"/docs/next/dev-python-wrap",component:f("/docs/next/dev-python-wrap","cd5"),exact:!0,sidebar:"docs"},{path:"/docs/next/dev-web",component:f("/docs/next/dev-web","58c"),exact:!0,sidebar:"docs"},{path:"/docs/next/first_model",component:f("/docs/next/first_model","6ea"),exact:!0,sidebar:"docs"},{path:"/docs/next/gas",component:f("/docs/next/gas","7db"),exact:!0,sidebar:"docs"},{path:"/docs/next/grain",component:f("/docs/next/grain","649"),exact:!0,sidebar:"docs"},{path:"/docs/next/hydro",component:f("/docs/next/hydro","a9f"),exact:!0},{path:"/docs/next/modelling_objects",component:f("/docs/next/modelling_objects","598"),exact:!0,sidebar:"docs"},{path:"/docs/next/network",component:f("/docs/next/network","956"),exact:!0,sidebar:"docs"},{path:"/docs/next/notation",component:f("/docs/next/notation","19f"),exact:!0,sidebar:"docs"},{path:"/docs/next/parameters",component:f("/docs/next/parameters","70c"),exact:!0,sidebar:"docs"},{path:"/docs/next/physics-cloud",component:f("/docs/next/physics-cloud","719"),exact:!0,sidebar:"docs"},{path:"/docs/next/physics-collapse",component:f("/docs/next/physics-collapse","f22"),exact:!0,sidebar:"docs"},{path:"/docs/next/physics-core",component:f("/docs/next/physics-core","cb2"),exact:!0,sidebar:"docs"},{path:"/docs/next/physics-hotcore",component:f("/docs/next/physics-hotcore","652"),exact:!0,sidebar:"docs"},{path:"/docs/next/physics-shocks",component:f("/docs/next/physics-shocks","2d5"),exact:!0,sidebar:"docs"},{path:"/docs/next/pythonapi",component:f("/docs/next/pythonapi","144"),exact:!0,sidebar:"docs"},{path:"/docs/next/running_a_grid",component:f("/docs/next/running_a_grid","c01"),exact:!0,sidebar:"docs"},{path:"/docs/next/trouble-compile",component:f("/docs/next/trouble-compile","863"),exact:!0,sidebar:"docs"},{path:"/docs/next/trouble-integration",component:f("/docs/next/trouble-integration","7de"),exact:!0,sidebar:"docs"}]},{path:"/docs/v3.1.0",component:f("/docs/v3.1.0","a46"),routes:[{path:"/docs/v3.1.0/",component:f("/docs/v3.1.0/","e39"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/bulk",component:f("/docs/v3.1.0/bulk","412"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/category/chemistry",component:f("/docs/v3.1.0/category/chemistry","c8f"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/category/developer",component:f("/docs/v3.1.0/category/developer","b09"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/category/getting-started",component:f("/docs/v3.1.0/category/getting-started","0e4"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/category/tutorials",component:f("/docs/v3.1.0/category/tutorials","ae1"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/chemical_analysis",component:f("/docs/v3.1.0/chemical_analysis","52b"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/desorb",component:f("/docs/v3.1.0/desorb","2ca"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/dev-debugging",component:f("/docs/v3.1.0/dev-debugging","346"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/dev-overview",component:f("/docs/v3.1.0/dev-overview","a5a"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/dev-python-wrap",component:f("/docs/v3.1.0/dev-python-wrap","c71"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/dev-web",component:f("/docs/v3.1.0/dev-web","894"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/first_model",component:f("/docs/v3.1.0/first_model","098"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/gas",component:f("/docs/v3.1.0/gas","857"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/grain",component:f("/docs/v3.1.0/grain","899"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/hydro",component:f("/docs/v3.1.0/hydro","4a7"),exact:!0},{path:"/docs/v3.1.0/modelling_objects",component:f("/docs/v3.1.0/modelling_objects","a78"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/network",component:f("/docs/v3.1.0/network","e1e"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/parameters",component:f("/docs/v3.1.0/parameters","b52"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/physics-cloud",component:f("/docs/v3.1.0/physics-cloud","514"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/physics-collapse",component:f("/docs/v3.1.0/physics-collapse","c40"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/physics-core",component:f("/docs/v3.1.0/physics-core","16b"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/physics-hotcore",component:f("/docs/v3.1.0/physics-hotcore","4a5"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/physics-shocks",component:f("/docs/v3.1.0/physics-shocks","956"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/pythonapi",component:f("/docs/v3.1.0/pythonapi","76c"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/running_a_grid",component:f("/docs/v3.1.0/running_a_grid","ad8"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/trouble-compile",component:f("/docs/v3.1.0/trouble-compile","e83"),exact:!0,sidebar:"docs"},{path:"/docs/v3.1.0/trouble-integration",component:f("/docs/v3.1.0/trouble-integration","30d"),exact:!0,sidebar:"docs"}]},{path:"/docs/v3.2.0",component:f("/docs/v3.2.0","adc"),routes:[{path:"/docs/v3.2.0/",component:f("/docs/v3.2.0/","3bd"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/bulk",component:f("/docs/v3.2.0/bulk","8ac"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/category/chemistry",component:f("/docs/v3.2.0/category/chemistry","bcd"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/category/developer",component:f("/docs/v3.2.0/category/developer","b3c"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/category/getting-started",component:f("/docs/v3.2.0/category/getting-started","fbf"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/category/tutorials",component:f("/docs/v3.2.0/category/tutorials","aaa"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/chemical_analysis",component:f("/docs/v3.2.0/chemical_analysis","f9e"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/desorb",component:f("/docs/v3.2.0/desorb","05e"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/dev-debugging",component:f("/docs/v3.2.0/dev-debugging","7f8"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/dev-overview",component:f("/docs/v3.2.0/dev-overview","685"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/dev-python-wrap",component:f("/docs/v3.2.0/dev-python-wrap","d1c"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/dev-web",component:f("/docs/v3.2.0/dev-web","d53"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/first_model",component:f("/docs/v3.2.0/first_model","823"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/gas",component:f("/docs/v3.2.0/gas","cc9"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/grain",component:f("/docs/v3.2.0/grain","ebf"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/hydro",component:f("/docs/v3.2.0/hydro","e87"),exact:!0},{path:"/docs/v3.2.0/modelling_objects",component:f("/docs/v3.2.0/modelling_objects","89b"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/network",component:f("/docs/v3.2.0/network","30e"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/parameters",component:f("/docs/v3.2.0/parameters","8d0"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/physics-cloud",component:f("/docs/v3.2.0/physics-cloud","8a9"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/physics-collapse",component:f("/docs/v3.2.0/physics-collapse","b57"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/physics-core",component:f("/docs/v3.2.0/physics-core","dc9"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/physics-hotcore",component:f("/docs/v3.2.0/physics-hotcore","b68"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/physics-shocks",component:f("/docs/v3.2.0/physics-shocks","23e"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/pythonapi",component:f("/docs/v3.2.0/pythonapi","031"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/running_a_grid",component:f("/docs/v3.2.0/running_a_grid","58b"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/trouble-compile",component:f("/docs/v3.2.0/trouble-compile","ae7"),exact:!0,sidebar:"docs"},{path:"/docs/v3.2.0/trouble-integration",component:f("/docs/v3.2.0/trouble-integration","520"),exact:!0,sidebar:"docs"}]},{path:"/docs",component:f("/docs","352"),routes:[{path:"/docs/",component:f("/docs/","8ce"),exact:!0,sidebar:"docs"},{path:"/docs/bulk",component:f("/docs/bulk","665"),exact:!0,sidebar:"docs"},{path:"/docs/category/chemistry",component:f("/docs/category/chemistry","356"),exact:!0,sidebar:"docs"},{path:"/docs/category/developer",component:f("/docs/category/developer","1c7"),exact:!0,sidebar:"docs"},{path:"/docs/category/getting-started",component:f("/docs/category/getting-started","066"),exact:!0,sidebar:"docs"},{path:"/docs/category/tutorials",component:f("/docs/category/tutorials","ef4"),exact:!0,sidebar:"docs"},{path:"/docs/chemical_analysis",component:f("/docs/chemical_analysis","1cb"),exact:!0,sidebar:"docs"},{path:"/docs/desorb",component:f("/docs/desorb","424"),exact:!0,sidebar:"docs"},{path:"/docs/dev-debugging",component:f("/docs/dev-debugging","25a"),exact:!0,sidebar:"docs"},{path:"/docs/dev-overview",component:f("/docs/dev-overview","cac"),exact:!0,sidebar:"docs"},{path:"/docs/dev-python-wrap",component:f("/docs/dev-python-wrap","15d"),exact:!0,sidebar:"docs"},{path:"/docs/dev-web",component:f("/docs/dev-web","d74"),exact:!0,sidebar:"docs"},{path:"/docs/first_model",component:f("/docs/first_model","3f3"),exact:!0,sidebar:"docs"},{path:"/docs/gas",component:f("/docs/gas","a4f"),exact:!0,sidebar:"docs"},{path:"/docs/grain",component:f("/docs/grain","841"),exact:!0,sidebar:"docs"},{path:"/docs/hydro",component:f("/docs/hydro","db9"),exact:!0},{path:"/docs/modelling_objects",component:f("/docs/modelling_objects","11b"),exact:!0,sidebar:"docs"},{path:"/docs/network",component:f("/docs/network","a70"),exact:!0,sidebar:"docs"},{path:"/docs/notation",component:f("/docs/notation","219"),exact:!0,sidebar:"docs"},{path:"/docs/parameters",component:f("/docs/parameters","c32"),exact:!0,sidebar:"docs"},{path:"/docs/physics-cloud",component:f("/docs/physics-cloud","5df"),exact:!0,sidebar:"docs"},{path:"/docs/physics-collapse",component:f("/docs/physics-collapse","b24"),exact:!0,sidebar:"docs"},{path:"/docs/physics-core",component:f("/docs/physics-core","f16"),exact:!0,sidebar:"docs"},{path:"/docs/physics-hotcore",component:f("/docs/physics-hotcore","d25"),exact:!0,sidebar:"docs"},{path:"/docs/physics-shocks",component:f("/docs/physics-shocks","639"),exact:!0,sidebar:"docs"},{path:"/docs/pythonapi",component:f("/docs/pythonapi","7fd"),exact:!0,sidebar:"docs"},{path:"/docs/running_a_grid",component:f("/docs/running_a_grid","dd2"),exact:!0,sidebar:"docs"},{path:"/docs/trouble-compile",component:f("/docs/trouble-compile","31d"),exact:!0,sidebar:"docs"},{path:"/docs/trouble-integration",component:f("/docs/trouble-integration","bea"),exact:!0,sidebar:"docs"}]},{path:"/",component:f("/","e1e"),exact:!0},{path:"*",component:f("*")}]},8934:(e,t,n)=>{"use strict";n.d(t,{_:()=>o,t:()=>a});var r=n(7294),o=r.createContext(!1);function a(e){var t=e.children,n=(0,r.useState)(!1),a=n[0],i=n[1];return(0,r.useEffect)((function(){i(!0)}),[]),r.createElement(o.Provider,{value:a},t)}},9383:(e,t,n)=>{"use strict";var r=n(7294),o=n(3935),a=n(3727),i=n(405),s=n(412);const l=[n(4367),n(2497),n(7021),n(8320),n(2295)];var c=n(723),u=n(6550),d=n(8790);function f(e){var t=e.children;return r.createElement(r.Fragment,null,t)}var p=n(7462),m=n(5742),h=n(2263),g=n(4996),v=n(6668),b=n(1944),y=n(4711),w=n(9727),E=n(3320),_=n(197);function k(){var e=(0,h.Z)().i18n,t=e.defaultLocale,n=e.localeConfigs,o=(0,y.l)();return r.createElement(m.Z,null,Object.entries(n).map((function(e){var t=e[0],n=e[1].htmlLang;return r.createElement("link",{key:t,rel:"alternate",href:o.createUrl({locale:t,fullyQualified:!0}),hrefLang:n})})),r.createElement("link",{rel:"alternate",href:o.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}))}function x(e){var t=e.permalink,n=(0,h.Z)().siteConfig.url,o=function(){var e=(0,h.Z)().siteConfig.url,t=(0,u.TH)().pathname;return e+(0,g.Z)(t)}(),a=t?""+n+t:o;return r.createElement(m.Z,null,r.createElement("meta",{property:"og:url",content:a}),r.createElement("link",{rel:"canonical",href:a}))}function S(){var e=(0,h.Z)().i18n.currentLocale,t=(0,v.L)(),n=t.metadata,o=t.image;return r.createElement(r.Fragment,null,r.createElement(m.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),o&&r.createElement(b.d,{image:o}),r.createElement(x,null),r.createElement(k,null),r.createElement(_.Z,{tag:E.HX,locale:e}),r.createElement(m.Z,null,n.map((function(e,t){return r.createElement("meta",(0,p.Z)({key:t},e))}))))}var C=new Map;function T(e){if(C.has(e.pathname))return Object.assign({},e,{pathname:C.get(e.pathname)});if((0,d.f)(c.Z,e.pathname).some((function(e){return!0===e.route.exact})))return C.set(e.pathname,e.pathname),e;var t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return C.set(e.pathname,t),Object.assign({},e,{pathname:t})}var A=n(8934),L=n(8940),N=n(4578);function O(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/{"use strict";n.d(t,{_:()=>u,M:()=>d});var r=n(7294),o=n(6809);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Develop \ud83d\udea7","isLast":false,"path":"/docs/next","mainDocId":"install","docs":[{"id":"bulk","path":"/docs/next/bulk","sidebar":"docs"},{"id":"chemical_analysis","path":"/docs/next/chemical_analysis","sidebar":"docs"},{"id":"desorb","path":"/docs/next/desorb","sidebar":"docs"},{"id":"dev-debugging","path":"/docs/next/dev-debugging","sidebar":"docs"},{"id":"dev-overview","path":"/docs/next/dev-overview","sidebar":"docs"},{"id":"dev-python-wrap","path":"/docs/next/dev-python-wrap","sidebar":"docs"},{"id":"dev-web","path":"/docs/next/dev-web","sidebar":"docs"},{"id":"first_model","path":"/docs/next/first_model","sidebar":"docs"},{"id":"gas","path":"/docs/next/gas","sidebar":"docs"},{"id":"grain","path":"/docs/next/grain","sidebar":"docs"},{"id":"hydro","path":"/docs/next/hydro"},{"id":"install","path":"/docs/next/","sidebar":"docs"},{"id":"modelling_objects","path":"/docs/next/modelling_objects","sidebar":"docs"},{"id":"network","path":"/docs/next/network","sidebar":"docs"},{"id":"notation","path":"/docs/next/notation","sidebar":"docs"},{"id":"parameters","path":"/docs/next/parameters","sidebar":"docs"},{"id":"physics-cloud","path":"/docs/next/physics-cloud","sidebar":"docs"},{"id":"physics-collapse","path":"/docs/next/physics-collapse","sidebar":"docs"},{"id":"physics-core","path":"/docs/next/physics-core","sidebar":"docs"},{"id":"physics-hotcore","path":"/docs/next/physics-hotcore","sidebar":"docs"},{"id":"physics-shocks","path":"/docs/next/physics-shocks","sidebar":"docs"},{"id":"pythonapi","path":"/docs/next/pythonapi","sidebar":"docs"},{"id":"running_a_grid","path":"/docs/next/running_a_grid","sidebar":"docs"},{"id":"trouble-compile","path":"/docs/next/trouble-compile","sidebar":"docs"},{"id":"trouble-integration","path":"/docs/next/trouble-integration","sidebar":"docs"},{"id":"/category/getting-started","path":"/docs/next/category/getting-started","sidebar":"docs"},{"id":"/category/tutorials","path":"/docs/next/category/tutorials","sidebar":"docs"},{"id":"/category/chemistry","path":"/docs/next/category/chemistry","sidebar":"docs"},{"id":"/category/developer","path":"/docs/next/category/developer","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/next/category/getting-started","label":"Getting Started"}}}},{"name":"v3.3.0","label":"v3.3.0","isLast":true,"path":"/docs","mainDocId":"install","docs":[{"id":"bulk","path":"/docs/bulk","sidebar":"docs"},{"id":"chemical_analysis","path":"/docs/chemical_analysis","sidebar":"docs"},{"id":"desorb","path":"/docs/desorb","sidebar":"docs"},{"id":"dev-debugging","path":"/docs/dev-debugging","sidebar":"docs"},{"id":"dev-overview","path":"/docs/dev-overview","sidebar":"docs"},{"id":"dev-python-wrap","path":"/docs/dev-python-wrap","sidebar":"docs"},{"id":"dev-web","path":"/docs/dev-web","sidebar":"docs"},{"id":"first_model","path":"/docs/first_model","sidebar":"docs"},{"id":"gas","path":"/docs/gas","sidebar":"docs"},{"id":"grain","path":"/docs/grain","sidebar":"docs"},{"id":"hydro","path":"/docs/hydro"},{"id":"install","path":"/docs/","sidebar":"docs"},{"id":"modelling_objects","path":"/docs/modelling_objects","sidebar":"docs"},{"id":"network","path":"/docs/network","sidebar":"docs"},{"id":"notation","path":"/docs/notation","sidebar":"docs"},{"id":"parameters","path":"/docs/parameters","sidebar":"docs"},{"id":"physics-cloud","path":"/docs/physics-cloud","sidebar":"docs"},{"id":"physics-collapse","path":"/docs/physics-collapse","sidebar":"docs"},{"id":"physics-core","path":"/docs/physics-core","sidebar":"docs"},{"id":"physics-hotcore","path":"/docs/physics-hotcore","sidebar":"docs"},{"id":"physics-shocks","path":"/docs/physics-shocks","sidebar":"docs"},{"id":"pythonapi","path":"/docs/pythonapi","sidebar":"docs"},{"id":"running_a_grid","path":"/docs/running_a_grid","sidebar":"docs"},{"id":"trouble-compile","path":"/docs/trouble-compile","sidebar":"docs"},{"id":"trouble-integration","path":"/docs/trouble-integration","sidebar":"docs"},{"id":"/category/getting-started","path":"/docs/category/getting-started","sidebar":"docs"},{"id":"/category/tutorials","path":"/docs/category/tutorials","sidebar":"docs"},{"id":"/category/chemistry","path":"/docs/category/chemistry","sidebar":"docs"},{"id":"/category/developer","path":"/docs/category/developer","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/category/getting-started","label":"Getting Started"}}}},{"name":"v3.2.0","label":"v3.2.0","isLast":false,"path":"/docs/v3.2.0","mainDocId":"install","docs":[{"id":"bulk","path":"/docs/v3.2.0/bulk","sidebar":"docs"},{"id":"chemical_analysis","path":"/docs/v3.2.0/chemical_analysis","sidebar":"docs"},{"id":"desorb","path":"/docs/v3.2.0/desorb","sidebar":"docs"},{"id":"dev-debugging","path":"/docs/v3.2.0/dev-debugging","sidebar":"docs"},{"id":"dev-overview","path":"/docs/v3.2.0/dev-overview","sidebar":"docs"},{"id":"dev-python-wrap","path":"/docs/v3.2.0/dev-python-wrap","sidebar":"docs"},{"id":"dev-web","path":"/docs/v3.2.0/dev-web","sidebar":"docs"},{"id":"first_model","path":"/docs/v3.2.0/first_model","sidebar":"docs"},{"id":"gas","path":"/docs/v3.2.0/gas","sidebar":"docs"},{"id":"grain","path":"/docs/v3.2.0/grain","sidebar":"docs"},{"id":"hydro","path":"/docs/v3.2.0/hydro"},{"id":"install","path":"/docs/v3.2.0/","sidebar":"docs"},{"id":"modelling_objects","path":"/docs/v3.2.0/modelling_objects","sidebar":"docs"},{"id":"network","path":"/docs/v3.2.0/network","sidebar":"docs"},{"id":"parameters","path":"/docs/v3.2.0/parameters","sidebar":"docs"},{"id":"physics-cloud","path":"/docs/v3.2.0/physics-cloud","sidebar":"docs"},{"id":"physics-collapse","path":"/docs/v3.2.0/physics-collapse","sidebar":"docs"},{"id":"physics-core","path":"/docs/v3.2.0/physics-core","sidebar":"docs"},{"id":"physics-hotcore","path":"/docs/v3.2.0/physics-hotcore","sidebar":"docs"},{"id":"physics-shocks","path":"/docs/v3.2.0/physics-shocks","sidebar":"docs"},{"id":"pythonapi","path":"/docs/v3.2.0/pythonapi","sidebar":"docs"},{"id":"running_a_grid","path":"/docs/v3.2.0/running_a_grid","sidebar":"docs"},{"id":"trouble-compile","path":"/docs/v3.2.0/trouble-compile","sidebar":"docs"},{"id":"trouble-integration","path":"/docs/v3.2.0/trouble-integration","sidebar":"docs"},{"id":"/category/getting-started","path":"/docs/v3.2.0/category/getting-started","sidebar":"docs"},{"id":"/category/tutorials","path":"/docs/v3.2.0/category/tutorials","sidebar":"docs"},{"id":"/category/chemistry","path":"/docs/v3.2.0/category/chemistry","sidebar":"docs"},{"id":"/category/developer","path":"/docs/v3.2.0/category/developer","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/v3.2.0/category/getting-started","label":"Getting Started"}}}},{"name":"v3.1.0","label":"v3.1.0","isLast":false,"path":"/docs/v3.1.0","mainDocId":"install","docs":[{"id":"bulk","path":"/docs/v3.1.0/bulk","sidebar":"docs"},{"id":"chemical_analysis","path":"/docs/v3.1.0/chemical_analysis","sidebar":"docs"},{"id":"desorb","path":"/docs/v3.1.0/desorb","sidebar":"docs"},{"id":"dev-debugging","path":"/docs/v3.1.0/dev-debugging","sidebar":"docs"},{"id":"dev-overview","path":"/docs/v3.1.0/dev-overview","sidebar":"docs"},{"id":"dev-python-wrap","path":"/docs/v3.1.0/dev-python-wrap","sidebar":"docs"},{"id":"dev-web","path":"/docs/v3.1.0/dev-web","sidebar":"docs"},{"id":"first_model","path":"/docs/v3.1.0/first_model","sidebar":"docs"},{"id":"gas","path":"/docs/v3.1.0/gas","sidebar":"docs"},{"id":"grain","path":"/docs/v3.1.0/grain","sidebar":"docs"},{"id":"hydro","path":"/docs/v3.1.0/hydro"},{"id":"install","path":"/docs/v3.1.0/","sidebar":"docs"},{"id":"modelling_objects","path":"/docs/v3.1.0/modelling_objects","sidebar":"docs"},{"id":"network","path":"/docs/v3.1.0/network","sidebar":"docs"},{"id":"parameters","path":"/docs/v3.1.0/parameters","sidebar":"docs"},{"id":"physics-cloud","path":"/docs/v3.1.0/physics-cloud","sidebar":"docs"},{"id":"physics-collapse","path":"/docs/v3.1.0/physics-collapse","sidebar":"docs"},{"id":"physics-core","path":"/docs/v3.1.0/physics-core","sidebar":"docs"},{"id":"physics-hotcore","path":"/docs/v3.1.0/physics-hotcore","sidebar":"docs"},{"id":"physics-shocks","path":"/docs/v3.1.0/physics-shocks","sidebar":"docs"},{"id":"pythonapi","path":"/docs/v3.1.0/pythonapi","sidebar":"docs"},{"id":"running_a_grid","path":"/docs/v3.1.0/running_a_grid","sidebar":"docs"},{"id":"trouble-compile","path":"/docs/v3.1.0/trouble-compile","sidebar":"docs"},{"id":"trouble-integration","path":"/docs/v3.1.0/trouble-integration","sidebar":"docs"},{"id":"/category/getting-started","path":"/docs/v3.1.0/category/getting-started","sidebar":"docs"},{"id":"/category/tutorials","path":"/docs/v3.1.0/category/tutorials","sidebar":"docs"},{"id":"/category/chemistry","path":"/docs/v3.1.0/category/chemistry","sidebar":"docs"},{"id":"/category/developer","path":"/docs/v3.1.0/category/developer","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/v3.1.0/category/getting-started","label":"Getting Started"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(7529);const l=JSON.parse('{"docusaurusVersion":"2.4.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.4.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.4.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.4.1"},"docusaurus-plugin-google-analytics":{"type":"package","name":"@docusaurus/plugin-google-analytics","version":"2.4.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.4.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.4.1"}}}');var c={siteConfig:o.default,siteMetadata:l,globalData:a,i18n:i,codeTranslations:s},u=r.createContext(c);function d(e){var t=e.children;return r.createElement(u.Provider,{value:c},t)}},4763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(4578),o=n(7294),a=n(412),i=n(5742),s=n(8780),l=n(7961);function c(e){var t=e.error,n=e.tryAgain;return o.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"}},o.createElement("h1",{style:{fontSize:"3rem"}},"This page crashed"),o.createElement("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"}},"Try again"),o.createElement(u,{error:t}))}function u(e){var t=e.error,n=(0,s.getErrorCausalChain)(t).map((function(e){return e.message})).join("\n\nCause:\n");return o.createElement("p",{style:{whiteSpace:"pre-wrap"}},n)}function d(e){var t=e.error,n=e.tryAgain;return o.createElement(p,{fallback:function(){return o.createElement(c,{error:t,tryAgain:n})}},o.createElement(i.Z,null,o.createElement("title",null,"Page Error")),o.createElement(l.Z,null,o.createElement(c,{error:t,tryAgain:n})))}var f=function(e){return o.createElement(d,e)},p=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.Z)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){a.Z.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,o={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:f)(o)}return null!=t?t:null},t}(o.Component)},412:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294),o=n(405);function a(e){return r.createElement(o.ql,e)}},9960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(7462),o=n(3366),a=n(7294),i=n(3727),s=n(8780),l=n(2263),c=n(3919),u=n(412),d=a.createContext({collectLink:function(){}});var f=n(4996),p=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,h=e.isNavLink,g=e.to,v=e.href,b=e.activeClassName,y=e.isActive,w=e["data-noBrokenLinkCheck"],E=e.autoAddBaseUrl,_=void 0===E||E,k=(0,o.Z)(e,p),x=(0,l.Z)().siteConfig,S=x.trailingSlash,C=x.baseUrl,T=(0,f.C)().withBaseUrl,A=(0,a.useContext)(d),L=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(function(){return L.current}));var N=g||v;var O,I=(0,c.Z)(N),P=null==N?void 0:N.replace("pathname://",""),R=void 0!==P?(O=P,_&&function(e){return e.startsWith("/")}(O)?T(O):O):void 0;R&&I&&(R=(0,s.applyTrailingSlash)(R,{trailingSlash:S,baseUrl:C}));var D=(0,a.useRef)(!1),M=h?i.OL:i.rU,F=u.Z.canUseIntersectionObserver,B=(0,a.useRef)(),j=function(){D.current||null==R||(window.docusaurus.preload(R),D.current=!0)};(0,a.useEffect)((function(){return!F&&I&&null!=R&&window.docusaurus.prefetch(R),function(){F&&B.current&&B.current.disconnect()}}),[B,R,F,I]);var U=null!=(n=null==(m=R)?void 0:m.startsWith("#"))&&n,z=!R||!I||U;return z||w||A.collectLink(R),z?a.createElement("a",(0,r.Z)({ref:L,href:R},N&&!I&&{target:"_blank",rel:"noopener noreferrer"},k)):a.createElement(M,(0,r.Z)({},k,{onMouseEnter:j,onTouchStart:j,innerRef:function(e){L.current=e,F&&e&&I&&(B.current=new window.IntersectionObserver((function(t){t.forEach((function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(B.current.unobserve(e),B.current.disconnect(),null!=R&&window.docusaurus.prefetch(R))}))})),B.current.observe(e))},to:R},h&&{isActive:y,activeClassName:b}))}const h=a.forwardRef(m)},1875:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(){return null}},5999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l,I:()=>s});var r=n(7294);function o(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var a=n(7529);function i(e){var t,n,r=e.id,o=e.message;if(void 0===r&&void 0===o)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=a[null!=r?r:o])?n:o)?t:r}function s(e,t){return o(i({message:e.message,id:e.id}),t)}function l(e){var t=e.children,n=e.id,a=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var s=i({message:t,id:n});return r.createElement(r.Fragment,null,o(s,a))}},9935:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});var r="default"},3919:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>o,b:()=>r})},4996:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Z:()=>s});var r=n(7294),o=n(2263),a=n(3919);function i(){var e=(0,o.Z)().siteConfig,t=e.baseUrl,n=e.url,i=(0,r.useCallback)((function(e,r){return function(e,t,n,r){var o=void 0===r?{}:r,i=o.forcePrependBaseUrl,s=void 0!==i&&i,l=o.absolute,c=void 0!==l&&l;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(s)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var u=n.startsWith(t)?n:t+n.replace(/^\//,"");return c?e+u:u}(n,t,e,r)}),[n,t]);return{withBaseUrl:i}}function s(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},2263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294),o=n(8940);function a(){return(0,r.useContext)(o._)}},2389:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294),o=n(8934);function a(){return(0,r.useContext)(o._)}},9670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});function r(e){var t={};return function e(n,r){Object.entries(n).forEach((function(n){var o,a=n[0],i=n[1],s=r?r+"."+a:a;"object"==typeof(o=i)&&o&&Object.keys(o).length>0?e(i,s):t[s]=i}))}(e),t}},226:(e,t,n)=>{"use strict";n.d(t,{_:()=>o,z:()=>a});var r=n(7294),o=r.createContext(null);function a(e){var t=e.children,n=e.value,a=r.useContext(o),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:a,value:n})}),[a,n]);return r.createElement(o.Provider,{value:i},t)}},143:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>h,gA:()=>f,_r:()=>u,Jo:()=>g,zh:()=>d,yW:()=>m,gB:()=>p});var r=n(6550),o=n(2263),a=n(9935);function i(e,t){void 0===t&&(t={});var n=(0,o.Z)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var s=function(e){return e.versions.find((function(e){return e.isLast}))};function l(e,t){var n,o,a=function(e,t){var n=s(e);return[].concat(e.versions.filter((function(e){return e!==n})),[n]).find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})}))}(e,t),i=null==a?void 0:a.docs.find((function(e){return!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:a,activeDoc:i,alternateDocVersions:i?(n=i.id,o={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(o[e.name]=t)}))})),o):{}}}var c={},u=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:c},d=function(e){return function(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});var r=i(e),o=null==r?void 0:r[t];if(!o&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return o}("docusaurus-plugin-content-docs",e,{failfast:!0})};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return a}(u(),(0,r.TH)().pathname,e)}function p(e){return d(e).versions}function m(e){var t=d(e);return s(t)}function h(e){return l(d(e),(0,r.TH)().pathname)}function g(e){return function(e,t){var n=s(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(d(e),(0,r.TH)().pathname)}},4367:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={onRouteDidUpdate:function(e){var t=e.location,n=e.previousLocation;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||(window.ga("set","page",t.pathname+t.search+t.hash),window.ga("send","pageview"))}}},8320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4865),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){o().start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){o().done()}}},7021:(e,t,n)=>{"use strict";n.r(t);var r=n(1205),o=n(412),a=n(6809);(function(e){if(o.Z.canUseDOM){var t=a.default.themeConfig.prism,r=(t=void 0===t?{}:t).additionalLanguages,i=void 0===r?[]:r;window.Prism=e,i.forEach((function(e){n(4833)("./prism-"+e)})),delete window.Prism}})(r.Z)},9471:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294);const o="iconExternalLink_nPIU";function a(e){var t=e.width,n=void 0===t?13.5:t,a=e.height,i=void 0===a?13.5:a;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:o},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},7961:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Pt});var r=n(7294),o=n(6010),a=n(4763),i=n(1944),s=n(7462),l=n(6550),c=n(5999),u=n(5936),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,l.k6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)}),[]);return(0,u.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}var m=(0,c.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){var t,n=null!=(t=e.children)?t:m,o=p(),a=o.containerRef,i=o.onClick;return r.createElement("div",{ref:a,role:"region","aria-label":m},r.createElement("a",(0,s.Z)({},e,{href:"#"+d,onClick:i}),n))}var g=n(5281),v=n(9727);const b="skipToContent_fXgn";function y(){return r.createElement(h,{className:b})}var w=n(6668),E=n(9689),_=n(3366),k=["width","height","color","strokeWidth","className"];function x(e){var t=e.width,n=void 0===t?21:t,o=e.height,a=void 0===o?21:o,i=e.color,l=void 0===i?"currentColor":i,c=e.strokeWidth,u=void 0===c?1.2:c,d=(e.className,(0,_.Z)(e,k));return r.createElement("svg",(0,s.Z)({viewBox:"0 0 15 15",width:n,height:a},d),r.createElement("g",{stroke:l,strokeWidth:u},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const S="closeButton_CVFx";function C(e){return r.createElement("button",(0,s.Z)({type:"button","aria-label":(0,c.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,o.Z)("clean-btn close",S,e.className)}),r.createElement(x,{width:14,height:14,strokeWidth:3.1}))}const T="content_knG7";function A(e){var t=(0,w.L)().announcementBar.content;return r.createElement("div",(0,s.Z)({},e,{className:(0,o.Z)(T,e.className),dangerouslySetInnerHTML:{__html:t}}))}const L="announcementBar_mb4j",N="announcementBarPlaceholder_vyr4",O="announcementBarClose_gvF7",I="announcementBarContent_xLdY";function P(){var e=(0,w.L)().announcementBar,t=(0,E.nT)(),n=t.isActive,o=t.close;if(!n)return null;var a=e.backgroundColor,i=e.textColor,s=e.isCloseable;return r.createElement("div",{className:L,style:{backgroundColor:a,color:i},role:"banner"},s&&r.createElement("div",{className:N}),r.createElement(A,{className:I}),s&&r.createElement(C,{onClick:o,className:O}))}var R=n(2961),D=n(2466);var M=n(9688),F=n(3102),B=r.createContext(null);function j(e){var t,n,o,a,i,s,l,c=e.children,u=(t=(0,R.e)(),n=(0,F.HY)(),o=(0,r.useState)(!1),a=o[0],i=o[1],s=null!==n.component,l=(0,M.D9)(s),(0,r.useEffect)((function(){s&&!l&&i(!0)}),[s,l]),(0,r.useEffect)((function(){s?t.shown||i(!0):i(!1)}),[t.shown,s]),(0,r.useMemo)((function(){return[a,i]}),[a]));return r.createElement(B.Provider,{value:u},c)}function U(e){if(e.component){var t=e.component;return r.createElement(t,e.props)}}function z(){var e=(0,r.useContext)(B);if(!e)throw new M.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],o=(0,r.useCallback)((function(){return n(!1)}),[n]),a=(0,F.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:o,content:U(a)}}),[o,a,t])}function Z(e){var t=e.header,n=e.primaryMenu,a=e.secondaryMenu,i=z().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,o.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},a)))}var $=n(2949),H=n(2389);function V(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function G(e){return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const W={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){var t=e.className,n=e.buttonClassName,a=e.value,i=e.onChange,s=(0,H.Z)(),l=(0,c.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===a?(0,c.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,o.Z)(W.toggle,t)},r.createElement("button",{className:(0,o.Z)("clean-btn",W.toggleButton,!s&&W.toggleButtonDisabled,n),type:"button",onClick:function(){return i("dark"===a?"light":"dark")},disabled:!s,title:l,"aria-label":l,"aria-live":"polite"},r.createElement(V,{className:(0,o.Z)(W.toggleIcon,W.lightToggleIcon)}),r.createElement(G,{className:(0,o.Z)(W.toggleIcon,W.darkToggleIcon)})))}const Y=r.memo(q),K="darkNavbarColorModeToggle_X3D1";function X(e){var t=e.className,n=(0,w.L)().navbar.style,o=(0,w.L)().colorMode.disableSwitch,a=(0,$.I)(),i=a.colorMode,s=a.setColorMode;return o?null:r.createElement(Y,{className:t,buttonClassName:"dark"===n?K:void 0,value:i,onChange:s})}var Q=n(1327);function J(){return r.createElement(Q.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function ee(){var e=(0,R.e)();return r.createElement("button",{type:"button","aria-label":(0,c.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(x,{color:"var(--ifm-color-emphasis-600)"}))}function te(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(J,null),r.createElement(X,{className:"margin-right--md"}),r.createElement(ee,null))}var ne=n(9960),re=n(4996),oe=n(3919);function ae(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var ie=n(9471),se=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function le(e){var t=e.activeBasePath,n=e.activeBaseRegex,o=e.to,a=e.href,i=e.label,l=e.html,c=e.isDropdownLink,u=e.prependBaseUrlToHref,d=(0,_.Z)(e,se),f=(0,re.Z)(o),p=(0,re.Z)(t),m=(0,re.Z)(a,{forcePrependBaseUrl:!0}),h=i&&a&&!(0,oe.Z)(a),g=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,i,h&&r.createElement(ie.Z,c&&{width:12,height:12}))};return a?r.createElement(ne.Z,(0,s.Z)({href:u?m:a},d,g)):r.createElement(ne.Z,(0,s.Z)({to:f,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?ae(n,t.pathname):t.pathname.startsWith(p)}},d,g))}var ce=["className","isDropdownItem"],ue=["className","isDropdownItem"],de=["mobile","position"];function fe(e){var t=e.className,n=e.isDropdownItem,a=void 0!==n&&n,i=(0,_.Z)(e,ce),l=r.createElement(le,(0,s.Z)({className:(0,o.Z)(a?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:a},i));return a?r.createElement("li",null,l):l}function pe(e){var t=e.className,n=(e.isDropdownItem,(0,_.Z)(e,ue));return r.createElement("li",{className:"menu__list-item"},r.createElement(le,(0,s.Z)({className:(0,o.Z)("menu__link",t)},n)))}function me(e){var t,n=e.mobile,o=void 0!==n&&n,a=(e.position,(0,_.Z)(e,de)),i=o?pe:fe;return r.createElement(i,(0,s.Z)({},a,{activeClassName:null!=(t=a.activeClassName)?t:o?"menu__link--active":"navbar__link--active"}))}var he=n(6043),ge=n(8596),ve=n(2263);var be=["items","position","className","onClick"],ye=["items","className","position","onClick"],we=["mobile"];function Ee(e,t){return e.some((function(e){return function(e,t){return!!(0,ge.Mg)(e.to,t)||!!ae(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function _e(e){var t,n=e.items,a=e.position,i=e.className,l=(e.onClick,(0,_.Z)(e,be)),c=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],f=u[1];return(0,r.useEffect)((function(){var e=function(e){c.current&&!c.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[c]),r.createElement("div",{ref:c,className:(0,o.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===a,"dropdown--show":d})},r.createElement(le,(0,s.Z)({"aria-haspopup":"true","aria-expanded":d,role:"button",href:l.to?void 0:"#",className:(0,o.Z)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),f(!d))}}),null!=(t=l.children)?t:l.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement($e,(0,s.Z)({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function ke(e){var t,n,a=e.items,i=e.className,c=(e.position,e.onClick),u=(0,_.Z)(e,ye),d=(n=(0,ve.Z)().siteConfig.baseUrl,(0,l.TH)().pathname.replace(n,"/")),f=Ee(a,d),p=(0,he.u)({initialState:function(){return!f}}),m=p.collapsed,h=p.toggleCollapsed,g=p.setCollapsed;return(0,r.useEffect)((function(){f&&g(!f)}),[d,f,g]),r.createElement("li",{className:(0,o.Z)("menu__list-item",{"menu__list-item--collapsed":m})},r.createElement(le,(0,s.Z)({role:"button",className:(0,o.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},u,{onClick:function(e){e.preventDefault(),h()}}),null!=(t=u.children)?t:u.label),r.createElement(he.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:m},a.map((function(e,t){return r.createElement($e,(0,s.Z)({mobile:!0,isDropdownItem:!0,onClick:c,activeClassName:"menu__link--active"},e,{key:t}))}))))}function xe(e){var t=e.mobile,n=void 0!==t&&t,o=(0,_.Z)(e,we),a=n?ke:_e;return r.createElement(a,o)}var Se=n(4711),Ce=["width","height"];function Te(e){var t=e.width,n=void 0===t?20:t,o=e.height,a=void 0===o?20:o,i=(0,_.Z)(e,Ce);return r.createElement("svg",(0,s.Z)({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},i),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const Ae="iconLanguage_nlXk";var Le=["mobile","dropdownItemsBefore","dropdownItemsAfter"];var Ne=n(1875);const Oe="searchBox_ZlJk";function Ie(e){var t=e.children,n=e.className;return r.createElement("div",{className:(0,o.Z)(n,Oe)},t)}var Pe=n(143),Re=n(8425),De=["docId","label","docsPluginId"];var Me=["sidebarId","label","docsPluginId"];var Fe=["label","to","docsPluginId"];var Be=n(373),je=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],Ue=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};const ze={default:me,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,o=e.dropdownItemsAfter,a=(0,_.Z)(e,Le),i=(0,ve.Z)().i18n,u=i.currentLocale,d=i.locales,f=i.localeConfigs,p=(0,Se.l)(),m=(0,l.TH)(),h=m.search,g=m.hash,v=d.map((function(e){var n=""+("pathname://"+p.createUrl({locale:e,fullyQualified:!1}))+h+g;return{label:f[e].label,lang:f[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===u?t?"menu__link--active":"dropdown__link--active":""}})),b=[].concat(n,v,o),y=t?(0,c.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):f[u].label;return r.createElement(xe,(0,s.Z)({},a,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(Te,{className:Ae}),y),items:b}))},search:function(e){var t=e.mobile,n=e.className;return t?null:r.createElement(Ie,{className:n},r.createElement(Ne.Z,null))},dropdown:xe,html:function(e){var t=e.value,n=e.className,a=e.mobile,i=void 0!==a&&a,s=e.isDropdownItem,l=void 0!==s&&s,c=l?"li":"div";return r.createElement(c,{className:(0,o.Z)({navbar__item:!i&&!l,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,o=e.docsPluginId,a=(0,_.Z)(e,De),i=(0,Pe.Iw)(o).activeDoc,l=(0,Re.vY)(t,o);return null===l?null:r.createElement(me,(0,s.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.path)===l.path||!(null==i||!i.sidebar)&&i.sidebar===l.sidebar},label:null!=n?n:l.id,to:l.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,o=e.docsPluginId,a=(0,_.Z)(e,Me),i=(0,Pe.Iw)(o).activeDoc,l=(0,Re.oz)(t,o).link;if(!l)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(me,(0,s.Z)({exact:!0},a,{isActive:function(){return(null==i?void 0:i.sidebar)===t},label:null!=n?n:l.label,to:l.path}))},docsVersion:function(e){var t=e.label,n=e.to,o=e.docsPluginId,a=(0,_.Z)(e,Fe),i=(0,Re.lO)(o)[0],l=null!=t?t:i.label,c=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(me,(0,s.Z)({},a,{label:l,to:c}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,o=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,i=e.dropdownItemsAfter,u=(0,_.Z)(e,je),d=(0,l.TH)(),f=d.search,p=d.hash,m=(0,Pe.Iw)(n),h=(0,Pe.gB)(n),g=(0,Be.J)(n).savePreferredVersionName,v=h.map((function(e){var t,n=null!=(t=m.alternateDocVersions[e.name])?t:Ue(e);return{label:e.label,to:""+n.path+f+p,isActive:function(){return e===m.activeVersion},onClick:function(){return g(e.name)}}})),b=[].concat(a,v,i),y=(0,Re.lO)(n)[0],w=t&&b.length>1?(0,c.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):y.label,E=t&&b.length>1?void 0:Ue(y).path;return b.length<=1?r.createElement(me,(0,s.Z)({},u,{mobile:t,label:w,to:E,isActive:o?function(){return!1}:void 0})):r.createElement(xe,(0,s.Z)({},u,{mobile:t,label:w,to:E,items:b,isActive:o?function(){return!1}:void 0}))}};var Ze=["type"];function $e(e){var t=e.type,n=(0,_.Z)(e,Ze),o=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=ze[o];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(a,n)}function He(){var e=(0,R.e)(),t=(0,w.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement($e,(0,s.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function Ve(e){return r.createElement("button",(0,s.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(c.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function Ge(){var e=0===(0,w.L)().navbar.items.length,t=z();return r.createElement(r.Fragment,null,!e&&r.createElement(Ve,{onClick:function(){return t.hide()}}),t.content)}function We(){var e,t=(0,R.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(Z,{header:r.createElement(te,null),primaryMenu:r.createElement(He,null),secondaryMenu:r.createElement(Ge,null)}):null}const qe="navbarHideable_m1mJ",Ye="navbarHidden_jGov";function Ke(e){return r.createElement("div",(0,s.Z)({role:"presentation"},e,{className:(0,o.Z)("navbar-sidebar__backdrop",e.className)}))}function Xe(e){var t=e.children,n=(0,w.L)().navbar,a=n.hideOnScroll,i=n.style,s=(0,R.e)(),l=function(e){var t=(0,r.useState)(e),n=t[0],o=t[1],a=(0,r.useRef)(!1),i=(0,r.useRef)(0),s=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,D.RF)((function(t,n){var r=t.scrollY;if(e)if(r=s?o(!1):r+c0&&r.createElement(wt,{links:n}),logo:o&&r.createElement(xt,{logo:o}),copyright:t&&r.createElement(St,{copyright:t})})}const At=r.memo(Tt);var Lt=(0,M.Qc)([$.S,E.pl,D.OC,Be.L5,i.VC,function(e){var t=e.children;return r.createElement(F.n2,null,r.createElement(R.M,null,r.createElement(j,null,t)))}]);function Nt(e){var t=e.children;return r.createElement(Lt,null,t)}function Ot(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(c.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("div",{className:"margin-vert--lg"},r.createElement(tt,{onClick:n,className:"button button--primary shadow--lw"})),r.createElement("hr",null),r.createElement("div",{className:"margin-vert--md"},r.createElement(nt,{error:t})))))}const It="mainWrapper_z2l0";function Pt(e){var t=e.children,n=e.noFooter,s=e.wrapperClassName,l=e.title,c=e.description;return(0,v.t)(),r.createElement(Nt,null,r.createElement(i.d,{title:l,description:c}),r.createElement(y,null),r.createElement(P,null),r.createElement(dt,null),r.createElement("div",{id:d,className:(0,o.Z)(g.k.wrapper.main,It,s)},r.createElement(a.Z,{fallback:function(e){return r.createElement(Ot,e)}},t)),!n&&r.createElement(At,null))}},1327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7462),o=n(3366),a=n(7294),i=n(9960),s=n(4996),l=n(2263),c=n(6668),u=n(941),d=["imageClassName","titleClassName"];function f(e){var t=e.logo,n=e.alt,r=e.imageClassName,o={light:(0,s.Z)(t.src),dark:(0,s.Z)(t.srcDark||t.src)},i=a.createElement(u.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},i):i}function p(e){var t,n=(0,l.Z)().siteConfig.title,u=(0,c.L)().navbar,p=u.title,m=u.logo,h=e.imageClassName,g=e.titleClassName,v=(0,o.Z)(e,d),b=(0,s.Z)((null==m?void 0:m.href)||"/"),y=p?"":n,w=null!=(t=null==m?void 0:m.alt)?t:y;return a.createElement(i.Z,(0,r.Z)({to:b},v,(null==m?void 0:m.target)&&{target:m.target}),m&&a.createElement(f,{logo:m,alt:w,imageClassName:h}),null!=p&&a.createElement("b",{className:g},p))}},197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294),o=n(5742);function a(e){var t=e.locale,n=e.version,a=e.tag,i=t;return r.createElement(o.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),a&&r.createElement("meta",{name:"docusaurus_tag",content:a}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),a&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:a}))}},941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(7462),o=n(3366),a=n(7294),i=n(6010),s=n(2389),l=n(2949);const c={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"};var u=["sources","className","alt"];function d(e){var t=(0,s.Z)(),n=(0,l.I)().colorMode,d=e.sources,f=e.className,p=e.alt,m=(0,o.Z)(e,u),h=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,h.map((function(e){return a.createElement("img",(0,r.Z)({key:e,src:d[e],alt:p,className:(0,i.Z)(c.themedImage,c["themedImage--"+e],f)},m))})))}},6043:(e,t,n)=>{"use strict";n.d(t,{u:()=>u,z:()=>b});var r=n(7462),o=n(3366),a=n(7294),i=n(412),s=n(1442),l=["collapsed"],c=["lazy"];function u(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)((function(){o((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var d={display:"none",overflow:"hidden",height:"0px"},f={display:"block",overflow:"visible",height:"auto"};function p(e,t){var n=t?d:f;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function m(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)((function(){var e,a=t.current;function i(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,s.n)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function l(){var e=i();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return p(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame((function(){n?(l(),requestAnimationFrame((function(){a.style.height=d.height,a.style.overflow=d.overflow}))):(a.style.display="block",requestAnimationFrame((function(){l()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function h(e){if(!i.Z.canUseDOM)return e?d:f}function g(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,l=e.className,c=e.disableSSRStyle,u=(0,a.useRef)(null);return m({collapsibleRef:u,collapsed:r,animation:i}),a.createElement(n,{ref:u,style:c?void 0:h(r),onTransitionEnd:function(e){"height"===e.propertyName&&(p(u.current,r),null==s||s(r))},className:l},o)}function v(e){var t=e.collapsed,n=(0,o.Z)(e,l),i=(0,a.useState)(!t),s=i[0],c=i[1],u=(0,a.useState)(t),d=u[0],f=u[1];return(0,a.useLayoutEffect)((function(){t||c(!0)}),[t]),(0,a.useLayoutEffect)((function(){s&&f(t)}),[s,t]),s?a.createElement(g,(0,r.Z)({},n,{collapsed:d})):null}function b(e){var t=e.lazy,n=(0,o.Z)(e,c),r=t?v:g;return a.createElement(r,n)}},9689:(e,t,n)=>{"use strict";n.d(t,{nT:()=>m,pl:()=>p});var r=n(7294),o=n(2389),a=n(12),i=n(9688),s=n(6668),l=(0,a.WA)("docusaurus.announcement.dismiss"),c=(0,a.WA)("docusaurus.announcement.id"),u=function(){return"true"===l.get()},d=function(e){return l.set(String(e))},f=r.createContext(null);function p(e){var t=e.children,n=function(){var e=(0,s.L)().announcementBar,t=(0,o.Z)(),n=(0,r.useState)((function(){return!!t&&u()})),a=n[0],i=n[1];(0,r.useEffect)((function(){i(u())}),[]);var l=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=c.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;c.set(t),r&&d(!1),!r&&u()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!a,close:l}}),[e,a,l])}();return r.createElement(f.Provider,{value:n},t)}function m(){var e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:(e,t,n)=>{"use strict";n.d(t,{I:()=>g,S:()=>h});var r=n(7294),o=n(412),a=n(9688),i=n(12),s=n(6668),l=r.createContext(void 0),c="theme",u=(0,i.WA)(c),d="light",f="dark",p=function(e){return e===f?f:d};function m(){var e=(0,s.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,i=(0,r.useState)(function(e){return o.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e)}(t)),l=i[0],m=i[1];(0,r.useEffect)((function(){n&&u.del()}),[n]);var h=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(m(e),o&&function(e){u.set(p(e))}(e)):(m(a?window.matchMedia("(prefers-color-scheme: dark)").matches?f:d:t),u.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",p(l))}),[l]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===c){var t=u.get();null!==t&&h(p(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,h]);var g=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||g.current?g.current=window.matchMedia("print").matches:h(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[h,n,a]),(0,r.useMemo)((function(){return{colorMode:l,setColorMode:h,get isDarkTheme(){return l===f},setLightTheme:function(){h(d)},setDarkTheme:function(){h(f)}}}),[l,h])}function h(e){var t=e.children,n=m();return r.createElement(l.Provider,{value:n},t)}function g(){var e=(0,r.useContext)(l);if(null==e)throw new a.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:(e,t,n)=>{"use strict";n.d(t,{J:()=>y,L5:()=>v});var r=n(7294),o=n(143),a=n(9935),i=n(6668),s=n(8425),l=n(9688),c=n(12),u=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,c.WA)(u(e),{persistence:t}).set(n)},f=function(e,t){return(0,c.WA)(u(e),{persistence:t}).get()},p=function(e,t){(0,c.WA)(u(e),{persistence:t}).del()};var m=r.createContext(null);function h(){var e=(0,o._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),a=(0,r.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),s=a[0],l=a[1];return(0,r.useEffect)((function(){l(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,o=f(t,n),r[t].versions.some((function(e){return e.name===o}))?{preferredVersionName:o}:(p(t,n),{preferredVersionName:null}))];var t,o})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[s,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d(e,t,n),l((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function g(e){var t=e.children,n=h();return r.createElement(m.Provider,{value:n},t)}function v(e){var t=e.children;return s.cE?r.createElement(g,null,t):r.createElement(r.Fragment,null,t)}function b(){var e=(0,r.useContext)(m);if(!e)throw new l.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=a.m);var n=(0,o.zh)(e),i=b(),s=i[0],l=i[1],c=s[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===c})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){l.savePreferredVersion(e,t)}),[l,e])}}},1116:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,b:()=>s});var r=n(7294),o=n(9688),a=Symbol("EmptyContext"),i=r.createContext(a);function s(e){var t=e.children,n=e.name,o=e.items,a=(0,r.useMemo)((function(){return n&&o?{name:n,items:o}:null}),[n,o]);return r.createElement(i.Provider,{value:a},t)}function l(){var e=(0,r.useContext)(i);if(e===a)throw new o.i6("DocsSidebarProvider");return e}},4477:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>i});var r=n(7294),o=n(9688),a=r.createContext(null);function i(e){var t=e.children,n=e.version;return r.createElement(a.Provider,{value:n},t)}function s(){var e=(0,r.useContext)(a);if(null===e)throw new o.i6("DocsVersionProvider");return e}},2961:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(7294),o=n(3102),a=n(7524),i=n(6550),s=(n(1688),n(9688));function l(e){!function(e){var t=(0,i.k6)(),n=(0,s.zX)(e);(0,r.useEffect)((function(){return t.block((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}var c=n(6668),u=r.createContext(void 0);function d(){var e,t=(e=(0,o.HY)(),0===(0,c.L)().navbar.items.length&&!e.component),n=(0,a.i)(),i=!t&&"mobile"===n,s=(0,r.useState)(!1),u=s[0],d=s[1];l((function(){if(u)return d(!1),!1}));var f=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:i,toggle:f,shown:u}}),[t,i,f,u])}function f(e){var t=e.children,n=d();return r.createElement(u.Provider,{value:n},t)}function p(){var e=r.useContext(u);if(void 0===e)throw new s.i6("NavbarMobileSidebarProvider");return e}},3102:(e,t,n)=>{"use strict";n.d(t,{HY:()=>s,Zo:()=>l,n2:()=>i});var r=n(7294),o=n(9688),a=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(a.Provider,{value:n},t)}function s(){var e=(0,r.useContext)(a);if(!e)throw new o.i6("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){var t=e.component,n=e.props,i=(0,r.useContext)(a);if(!i)throw new o.i6("NavbarSecondaryMenuContentProvider");var s=i[1],l=(0,o.Ql)(n);return(0,r.useEffect)((function(){s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},9727:(e,t,n)=>{"use strict";n.d(t,{h:()=>o,t:()=>a});var r=n(7294),o="navigation-with-keyboard";function a(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},7524:(e,t,n)=>{"use strict";n.d(t,{i:()=>c});var r=n(7294),o=n(412),a="desktop",i="mobile",s="ssr";function l(){return o.Z.canUseDOM?window.innerWidth>996?a:i:s}function c(){var e=(0,r.useState)((function(){return l()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(l())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},5281:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:function(e){return"theme-admonition-"+e}},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},1442:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:()=>r})},8425:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{MN:()=>C,Wl:()=>g,_F:()=>y,cE:()=>m,jA:()=>v,xz:()=>h,hI:()=>S,lO:()=>_,vY:()=>x,oz:()=>k,s1:()=>E});var a=n(7294),i=n(6550),s=n(8790),l=n(143),c=n(373),u=n(4477),d=n(1116);function f(e){return Array.from(new Set(e))}var p=n(8596),m=!!l._r;function h(e){var t=(0,u.E)();if(e){var n=t.docs[e];if(!n)throw new Error("no version doc found by id="+e);return n}}function g(e){if(e.href)return e.href;for(var t,n=o(e.items);!(t=n()).done;){var r=t.value;if("link"===r.type)return r.href;if("category"===r.type){var a=g(r);if(a)return a}}}function v(){var e=(0,i.TH)().pathname,t=(0,d.V)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");var n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(e+" is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.");return n}var b=function(e,t){return void 0!==e&&(0,p.Mg)(e,t)};function y(e,t){return"link"===e.type?b(e.href,t):"category"===e.type&&(b(e.href,t)||function(e,t){return e.some((function(e){return y(e,t)}))}(e.items,t))}function w(e){var t=e.sidebarItems,n=e.pathname,r=e.onlyCategories,a=void 0!==r&&r,i=[];return function e(t){for(var r,s=o(t);!(r=s()).done;){var l=r.value;if("category"===l.type&&((0,p.Mg)(l.href,n)||e(l.items))||"link"===l.type&&(0,p.Mg)(l.href,n))return a&&"category"!==l.type||i.unshift(l),!0}return!1}(t),i}function E(){var e,t=(0,d.V)(),n=(0,i.TH)().pathname;return!1!==(null==(e=(0,l.gA)())?void 0:e.pluginData.breadcrumbs)&&t?w({sidebarItems:t.items,pathname:n}):null}function _(e){var t=(0,l.Iw)(e).activeVersion,n=(0,c.J)(e).preferredVersion,r=(0,l.yW)(e);return(0,a.useMemo)((function(){return f([t,n,r].filter(Boolean))}),[t,n,r])}function k(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map((function(e){return e[0]})).join("\n- "));return r[1]}),[e,n])}function x(e,t){var n=_(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+f(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function S(e){var t=e.route,n=e.versionMetadata,r=(0,i.TH)(),o=t.routes,a=o.find((function(e){return(0,i.LX)(r.pathname,e)}));if(!a)return null;var l=a.sidebar,c=l?n.docsSidebars[l]:void 0;return{docElement:(0,s.H)(o),sidebarName:l,sidebarItems:c}}function C(e){return e.filter((function(e){return"category"!==e.type||!!g(e)}))}},1944:(e,t,n)=>{"use strict";n.d(t,{FG:()=>f,d:()=>u,VC:()=>p});var r=n(7294),o=n(6010),a=n(5742),i=n(226);function s(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(4996),c=n(2263);function u(e){var t=e.title,n=e.description,o=e.keywords,i=e.image,s=e.children,u=function(e){var t=(0,c.Z)().siteConfig,n=t.title,r=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+r+" "+n:n}(t),d=(0,l.C)().withBaseUrl,f=i?d(i,{absolute:!0}):void 0;return r.createElement(a.Z,null,t&&r.createElement("title",null,u),t&&r.createElement("meta",{property:"og:title",content:u}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),o&&r.createElement("meta",{name:"keywords",content:Array.isArray(o)?o.join(","):o}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),s)}var d=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(d),s=(0,o.Z)(i,t);return r.createElement(d.Provider,{value:s},r.createElement(a.Z,null,r.createElement("html",{className:s})),n)}function p(e){var t=e.children,n=s(),a="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(f,{className:(0,o.Z)(a,i)},t)}},9688:(e,t,n)=>{"use strict";n.d(t,{i6:()=>m,Qc:()=>g,zX:()=>f,D9:()=>p,Ql:()=>h});var r=n(6528),o=n(4578);function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var i=n(9611);function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t,n){return l=s()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&(0,i.Z)(o,n.prototype),o},l.apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},c(e)}var u=n(7294),d=n(412).Z.canUseDOM?u.useLayoutEffect:u.useEffect;function f(e){var t=(0,u.useRef)(e);return d((function(){t.current=e}),[e]),(0,u.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function p(e){var t=(0,u.useRef)();return d((function(){t.current=e})),t.current}var m=function(e){function t(t,n){var o,a,i,s,l;return(l=e.call(this)||this).name="ReactContextError",l.message="Hook "+(null!=(o=null==(a=l.stack)||null==(i=a.split("\n")[1])||null==(s=i.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:s.groups.name)?o:"")+" is called outside the <"+t+">. "+(null!=n?n:""),l}return(0,o.Z)(t,e),t}(c(Error));function h(e){var t=Object.entries(e);return t.sort((function(e,t){return e[0].localeCompare(t[0])})),(0,u.useMemo)((function(){return e}),t.flat())}function g(e){return function(t){var n=t.children;return u.createElement(u.Fragment,null,e.reduceRight((function(e,t){return u.createElement(t,null,e)}),n))}}},8596:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>s});var r=n(7294),o=n(723),a=n(2263);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){var e=(0,a.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:o.Z,baseUrl:e})}),[e])}},2466:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>l,RF:()=>d});var r=n(7294),o=n(412),a=n(2389),i=n(9688);var s=r.createContext(void 0);function l(e){var t,n=e.children,o=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(s.Provider,{value:o},n)}function c(){var e=(0,r.useContext)(s);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var u=function(){return o.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=c().scrollEventsEnabledRef,o=(0,r.useRef)(u()),a=(0,i.zX)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=u();a(e,o.current),o.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[a,n].concat(t))}function f(){var e=(0,r.useRef)(null),t=(0,a.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var o=document.documentElement.scrollTop;(n&&o>e||!n&&o{"use strict";n.d(t,{HX:()=>r,os:()=>o});n(2263);var r="default";function o(e,t){return"docs-"+e+"-"+t}},12:(e,t,n)=>{"use strict";n.d(t,{WA:()=>l});n(7294),n(1688);var r="localStorage";function o(e){var t=e.key,n=e.oldValue,r=e.newValue,o=e.storage;if(n!==r){var a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}}function a(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}var i=!1;var s={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function l(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(e);var n=a(null==t?void 0:t.persistence);return null===n?s:{get:function(){try{return n.getItem(e)}catch(t){return console.error("Docusaurus storage error, can't get key="+e,t),null}},set:function(t){try{var r=n.getItem(e);n.setItem(e,t),o({key:e,oldValue:r,newValue:t,storage:n})}catch(a){console.error("Docusaurus storage error, can't set "+e+"="+t,a)}},del:function(){try{var t=n.getItem(e);n.removeItem(e),o({key:e,oldValue:t,newValue:null,storage:n})}catch(r){console.error("Docusaurus storage error, can't delete key="+e,r)}},listen:function(t){try{var r=function(r){r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}}catch(o){return console.error("Docusaurus storage error, can't listen for changes of key="+e,o),function(){}}}}}},4711:(e,t,n)=>{"use strict";n.d(t,{l:()=>a});var r=n(2263),o=n(6550);function a(){var e=(0,r.Z)(),t=e.siteConfig,n=t.baseUrl,a=t.url,i=e.i18n,s=i.defaultLocale,l=i.currentLocale,c=(0,o.TH)().pathname,u=l===s?n:n.replace("/"+l+"/","/"),d=c.replace(n,"");return{createUrl:function(e){var t=e.locale;return""+(e.fullyQualified?a:"")+function(e){return e===s?""+u:""+u+e+"/"}(t)+d}}}},5936:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(7294),o=n(6550),a=n(9688);function i(e){var t=(0,o.TH)(),n=(0,a.D9)(t),i=(0,a.zX)(e);(0,r.useEffect)((function(){n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6668:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});var r=n(2263);function o(){return(0,r.Z)().siteConfig.themeConfig}},8802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var o,a=e.split(/[#?]/)[0],i="/"===a||a===r?a:(o=a,n?function(e){return e.endsWith("/")?e:e+"/"}(o):function(e){return e.endsWith("/")?e.slice(0,-1):e}(o));return e.replace(a,i)}},4143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t].concat(e(t.cause)):[t]}},8780:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var o=n(8802);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(o).default}});var a=n(4143);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return a.getErrorCausalChain}})},6010:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to});const o=function(){for(var e,t,n=0,o="";n{"use strict";n.d(t,{lX:()=>w,q_:()=>C,ob:()=>p,PP:()=>A,Ep:()=>f});var r=n(7462);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;f--){var p=i[f];"."===p?a(i,f):".."===p?(a(i,f),d++):d&&(a(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var s=n(8776);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function p(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.Z)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=p(e,t,h(),w.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),h=l(n),g=0;g{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},5826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},2497:(e,t,n)=>{"use strict";n.r(t)},2295:(e,t,n)=>{"use strict";n.r(t)},4865:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){l(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&p(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=f(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},7418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,a){for(var i,s,l=o(e),c=1;c{Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}},4833:(e,t,n)=>{var r={"./prism-fortran":7915};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=4833},2703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:(e,t,n)=>{"use strict";var r=n(7294),o=n(7418),a=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n