You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Figure out how to export the database that MCM has into our format
The MCM web developer has been kind enough to respond to some questions for us: wacl-york/mcm-web#337
Note
There is an existing branch with some exploratory work, including useful SQL statements linked to this issue. There is a folder, etc with a python script and the mcm database
etc
├── data
│ └── mcm.db
└── translate_mcm.py
Acceptance Criteria
All 17224 reactions available in MCM can be run in music box. The total count of each type is below
Implement a new photolysis rate whose rate is determined by this equation
$J=l\cos(X)^m\exp(-n\sec(X))$
$l$, $m$, and $n$ all come from the mcm database
These rates can still have a scaling factor as many rates are just one rate times a multiple of another
$X$ is the solar zenith angle. So, add solar zenith angle as an option for both initial and evolving conditions
The table below shows the two general categories. Multiples are rates like J<22>*0.5 which are a multiple of a base photolysis rate. Non multiples would be like J<22> which can be calculated directly from the equation above
Photolysis Type
Count
Multiples
319
Non Multiples
2804
Total
3123
Tokenized
Tokenized rates are tricky. Many likely match rate types we already have but maybe only after being rearranged. To get the final rate, all tokens need to eventually be replaced. MCM has some code that may help here
All equations are written in compliance with FACSIMILE
Maybe we could reduce all of the equations to equations after replacing all tokens and simplify them with sympy somehow?
If we can't get down to our set of equations, we could add another reaction type that allows equations to be placed into our configuration and we could parse and evaluate them with muparser
Null is generally going to fall mostly under our arrhenius types, but some will need to be one of the other types
Some reactions use concentrations of other species that aren't listed in the list of reactants. When forming the reactions, use them as reactants
For example, this reaction rate 5.6D-34*N2*(TEMP/300)@(-2.6)*O2 translates to this equation: $5.6\cdot10^{-34} \cdot [\mathbf{N2}] (\frac{\mathbf{TEMP}}{300})^{-2.6} \cdot [\mathbf{O2}]$
The reaction, (from the mcm database) is O -> O3. To put this into our format, we could write this as O + O2 + N2 -> O3. It would be an arrhenius reaction with D set to 300 and B set to -2.6
There are three general forms of reactions here. Temperature dependent will be the most annoying to parse and look like this 5.6D-34*N2*(TEMP/300)@(-2.6)*O2, but could also include EXP. RO2 dependent look like 1.30D-12*0.6*RO2 and would only need to have RO2 added as a rectant (it does't already exist as a reactant) and could use the arrhenius type, or maybe the user defined reaction type with a constant value. Non RO2 Dependent seem to be constant valued reaction rates like 5.85D-12 and can again use the user defined reaction rate.
Null Type
Count
Temperature Dependent
763
RO2 Dependent
2488
Non RO2 Dependent
4394
Total
7645
The text was updated successfully, but these errors were encountered:
I like your ideas and they make sense to me. (sympy looks an interesting tool). A couple questions I have:
Would it be straightforward to translate some of their reactions into the corresponding reactions in our taxonomy? With an example, 5.6D-34*N2*(TEMP/300)@(-2.6)*O2 -> O + O2 + N2 -> O3, you mentioned that you got that from their database. Was it easy to figure it out?
Is this task specific to music-box? We talked about supporting parser for multiple configurations in the musica. Might musica be responsible for parsing work?
@boulderdaze all of the equations are easily accessible from their database. Everything but the tokenized reactions will be easy to translate
This is really a one time task that will generate a configuration. We still need to think about our parsing stuff overall. We do have a task to handle parsing in musica, but that's sort of separate from this since first we need a configuration. Also, the photolysis stuff may be a new way to do this for us and would require an update in music box.
Figure out how to export the database that MCM has into our format
The MCM web developer has been kind enough to respond to some questions for us: wacl-york/mcm-web#337
Note
There is an existing branch with some exploratory work, including useful SQL statements linked to this issue. There is a folder,
etc
with a python script and the mcm databaseAcceptance Criteria
Ideas
Photolysis Reactions
J<22>*0.5
which are a multiple of a base photolysis rate. Non multiples would be likeJ<22>
which can be calculated directly from the equation aboveTokenized
https://github.com/wacl-york/mcm-web/blob/5c9b29445672ea5e92f226118ba928edc9311b4a/lib/mcm/db.rb#L124-L181
Null
5.6D-34*N2*(TEMP/300)@(-2.6)*O2
translates to this equation:5.6D-34*N2*(TEMP/300)@(-2.6)*O2
, but could also includeEXP
. RO2 dependent look like1.30D-12*0.6*RO2
and would only need to haveRO2
added as a rectant (it does't already exist as a reactant) and could use the arrhenius type, or maybe the user defined reaction type with a constant value. Non RO2 Dependent seem to be constant valued reaction rates like5.85D-12
and can again use the user defined reaction rate.The text was updated successfully, but these errors were encountered: