Difference between revisions of "Photochemistry"
(Created page with "= Photochemistry = == Generic Model == === Compilation === Photochemistry in the generic model is largely independent of the and does not require to recompile it (just make...") |
|||
Line 5: | Line 5: | ||
=== Compilation === | === Compilation === | ||
Photochemistry in the generic model is largely independent of the and does not require to recompile it (just make sure that you have linked the ''LAPACK'' and ''BLAS'' libraries). | Photochemistry in the generic model is largely independent of the and does not require to recompile it (just make sure that you have linked the ''LAPACK'' and ''BLAS'' libraries). | ||
+ | |||
+ | === callphys.def === | ||
+ | In order to use photochemistry, you simply need to have the following line in '''callphys.def''': | ||
+ | photochem = .true. | ||
+ | |||
+ | === traceur.def === | ||
+ | All chemical species must be listed in [[The_traceur.def_Input_File|'''traceurs.def''']] ('''which needs to follow the modern layout'''). | ||
=== Reaction network === | === Reaction network === | ||
− | Besides the species- and | + | Besides the species- and reaction-specific data files ([[#Photolysis reaction|see below]]), you need one file: '''reactfile''' (located in the '''chemnetwork''' folder) for the reaction network. The first line of the file is ignored, then for each line, the syntax of the '''reactfile''' is as follows: |
− | + | * Columns 1-50 are reserved for reactants. Their names must match those given [[The_traceur.def_Input_File|'''traceurs.def''']], in particular, if you have both water vapour and water ice as tracers, named h2o_vap and h2o_ice respectively, the name to use for water vapour in chemical reaction is h2o_vap. Reactant species must be separated by any number of blank spaces. | |
− | + | * Columns 51-100 are reserved for products, with the same rules applying. Notice that in the case of a third body reaction, the third body appears only with the reactants. | |
+ | * Column 101 is an integer designating the type of reaction: 0 for photolysis, 1, 2 or 3 for other reactions, depending on their reaction rate formula. The four next spaces are blank. | ||
+ | * Column 106 and after are dedicated to parameters specific to each reaction type. | ||
+ | Note that lines can be commented out by starting them with the character "!". | ||
− | === | + | === Photolysis reaction === |
− | Photolysis reactions need two types of files: | + | Photolysis reactions are identified by a 0 at column 101 of the '''reactfile'''. They need two types of files (which need to be placed in '''datadir/cross_sections/'''): |
− | # cross sections | + | # cross sections (syntax: first line: wavelength in nm, second line cross section in cm<sup>2</sup>, first line is ignored) |
− | # yield rates | + | # yield rates (syntax: first line: wavelength in nm, second line: photodissociation yield, first line is ignored) |
+ | These data can be found in benchmark cases for common species (e.g. water), or on the following pages for more exotic ones: [https://www.uv-vis-spectral-atlas-mainz.org/uvvis/ Mainz spectral atlas], [https://phidrates.space.swri.edu/ phidrates], [https://home.strw.leidenuniv.nl/~moldata/ Leiden University]. | ||
+ | The parameters for photolysis reaction in the '''reactfile''' are given as follows, from column 106: an identifier character string starting with "j", an integer corresponding to the number of cross section files (one for each temperature range), the lower bound of each temperature range, the name of each cross section file, the name of the yield rate file. For example, the following line describes the photolysis of O<sub>2</sub> into two O atoms in the ground state: | ||
+ | o2 hv o o 0 jo2_o 4 150 200 250 300 O2_150.abs O2_200.abs O2_250.abs O2_300.abs o2_o.yld | ||
+ | In this case, 4 different cross section files exist, corresponding to the temperature range 150 K-200 K, 200 K-250 K, 250 K-300 K, >300 K. | ||
− | === Reaction rate | + | === Reaction rate formulae === |
− | There are three different formula for the reaction rate: | + | There are three different formula for the reaction rate. The chosen formula is by 1, 2, or 3 at column 51 or the '''reactfile'''. They read respectively: |
− | # the simple | + | # the simple <p>:<math>k=a\left(\frac{T}{T_0}\right)^ce^{\frac{b}{T} }[M]^d</math>Its parameters (to give in the '''reactfile''' in the same order, starting from column 106) are <math>a, b, c, T_0, d</math>.</p> |
− | # the strange | + | # the strange<p>:<math>k=ge^{-\frac{h}{T} }\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} }[M]^{d_{\text up} } }{1+\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M]^{d_{\text down} } }fc^{\frac{1}{1+\left[\log_{10}\left(\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M] \right) \right]^2 } }</math>Its parameters (to give in the '''reactfile''' in the same order, starting from column 106) are <math>k_0, n, a_0, k_\infty, m, b_0, T_0, f_c, g, h, d_{\text up}, d_{\text down}</math>.</p> |
− | # the stranger | + | # the stranger<p>:<math>k=ge^{-\frac{h}{T} }\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} }[M]^{d_{\text up} } }{1+\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M]^{d_{\text down} } }[F_{\text cent}]^X,</math>with <math>F_{\text cent}=1-ae^{-\frac{T}{T^{***} } }+ae^{-\frac{T}{T^* } }+ae^{-\frac{T^{**}}{T } }</math>, and :<math>X=\left[1+\left[\frac{\log_{10}\left(\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M] \right)+c }{N-d\left(\log_{10}\left(\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M] \right) \right)+c } \right]^2 \right]^{-1},</math>with <math>c=-0.4-0.67\log_{10}(F_{\text cent})</math>, <math>N=0.75-1.27\log_{10}(F_{\text cent})</math>, and <math>d=0.14</math>. |
+ | ::Its parameters (to give in the '''reactfile''' in the same order, starting from column 106) are <math>k_0, n, a_0, k_\infty, m, b_0, T_0, a, T^{***}, T^*, T^{**}, d_{\text up}, d_{\text down}</math>.</p> | ||
+ | For example, the following line describes the 3-body reaction CO+M=CO<sub>2</sub>+M, whose reaction rate is <math>k=2.2\times10^{-33}e^{-\frac{1780}{T} }[M]</math> (be careful, here <math>[M]</math> corresponds to the molecular density of the atmosphere, not that of the third body): | ||
+ | co o M co2 1 2.2e-33 -1780.0 0.0 1 1.0 |
Revision as of 10:40, 31 May 2023
Contents
Photochemistry
Generic Model
Compilation
Photochemistry in the generic model is largely independent of the and does not require to recompile it (just make sure that you have linked the LAPACK and BLAS libraries).
callphys.def
In order to use photochemistry, you simply need to have the following line in callphys.def:
photochem = .true.
traceur.def
All chemical species must be listed in traceurs.def (which needs to follow the modern layout).
Reaction network
Besides the species- and reaction-specific data files (see below), you need one file: reactfile (located in the chemnetwork folder) for the reaction network. The first line of the file is ignored, then for each line, the syntax of the reactfile is as follows:
- Columns 1-50 are reserved for reactants. Their names must match those given traceurs.def, in particular, if you have both water vapour and water ice as tracers, named h2o_vap and h2o_ice respectively, the name to use for water vapour in chemical reaction is h2o_vap. Reactant species must be separated by any number of blank spaces.
- Columns 51-100 are reserved for products, with the same rules applying. Notice that in the case of a third body reaction, the third body appears only with the reactants.
- Column 101 is an integer designating the type of reaction: 0 for photolysis, 1, 2 or 3 for other reactions, depending on their reaction rate formula. The four next spaces are blank.
- Column 106 and after are dedicated to parameters specific to each reaction type.
Note that lines can be commented out by starting them with the character "!".
Photolysis reaction
Photolysis reactions are identified by a 0 at column 101 of the reactfile. They need two types of files (which need to be placed in datadir/cross_sections/):
- cross sections (syntax: first line: wavelength in nm, second line cross section in cm2, first line is ignored)
- yield rates (syntax: first line: wavelength in nm, second line: photodissociation yield, first line is ignored)
These data can be found in benchmark cases for common species (e.g. water), or on the following pages for more exotic ones: Mainz spectral atlas, phidrates, Leiden University. The parameters for photolysis reaction in the reactfile are given as follows, from column 106: an identifier character string starting with "j", an integer corresponding to the number of cross section files (one for each temperature range), the lower bound of each temperature range, the name of each cross section file, the name of the yield rate file. For example, the following line describes the photolysis of O2 into two O atoms in the ground state:
o2 hv o o 0 jo2_o 4 150 200 250 300 O2_150.abs O2_200.abs O2_250.abs O2_300.abs o2_o.yld
In this case, 4 different cross section files exist, corresponding to the temperature range 150 K-200 K, 200 K-250 K, 250 K-300 K, >300 K.
Reaction rate formulae
There are three different formula for the reaction rate. The chosen formula is by 1, 2, or 3 at column 51 or the reactfile. They read respectively:
- the simple
\[k=a\left(\frac{T}{T_0}\right)^ce^{\frac{b}{T} }[M]^d\]Its parameters (to give in the reactfile in the same order, starting from column 106) are \(a, b, c, T_0, d\).
- the strange
\[k=ge^{-\frac{h}{T} }\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} }[M]^{d_{\text up} } }{1+\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M]^{d_{\text down} } }fc^{\frac{1}{1+\left[\log_{10}\left(\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M] \right) \right]^2 } }\]Its parameters (to give in the reactfile in the same order, starting from column 106) are \(k_0, n, a_0, k_\infty, m, b_0, T_0, f_c, g, h, d_{\text up}, d_{\text down}\).
- the stranger
\[k=ge^{-\frac{h}{T} }\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} }[M]^{d_{\text up} } }{1+\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M]^{d_{\text down} } }[F_{\text cent}]^X,\]with \(F_{\text cent}=1-ae^{-\frac{T}{T^{***} } }+ae^{-\frac{T}{T^* } }+ae^{-\frac{T^{**}}{T } }\), and \[X=\left[1+\left[\frac{\log_{10}\left(\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M] \right)+c }{N-d\left(\log_{10}\left(\frac{k_0\left(\frac{T}{T_0}\right)^ne^{\frac{a_0}{T} } }{k_\infty\left(\frac{T}{T_0}\right)^me^{\frac{b_0}{T} } }[M] \right) \right)+c } \right]^2 \right]^{-1},\]with \(c=-0.4-0.67\log_{10}(F_{\text cent})\), \(N=0.75-1.27\log_{10}(F_{\text cent})\), and \(d=0.14\).
- Its parameters (to give in the reactfile in the same order, starting from column 106) are \(k_0, n, a_0, k_\infty, m, b_0, T_0, a, T^{***}, T^*, T^{**}, d_{\text up}, d_{\text down}\).
For example, the following line describes the 3-body reaction CO+M=CO2+M, whose reaction rate is \(k=2.2\times10^{-33}e^{-\frac{1780}{T} }[M]\) (be careful, here \([M]\) corresponds to the molecular density of the atmosphere, not that of the third body):
co o M co2 1 2.2e-33 -1780.0 0.0 1 1.0