RMG/Cantera compatibility for Plog reactions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia dal notebook Jupyter e dai file di input Chemkin/Cantera dell’esempio minimo allegato, quindi leggi issue #2288 per il contesto. Confronta le rappresentazioni separate delle reazioni duplicate e le rappresentazioni PLOG combinate alle pressioni e temperature indicate; il lavoro è completato quando la rappresentazione scelta supera la convalida di Cantera e preserva le velocità attese.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug Description
This isn't necessarily an RMG/cantera bug, it is just a difference of how reactions are interpreted in each.
For plog reactions, RMG represents multiple plog reactions in chemkin by marking them as "duplicates":
! Reaction index: Chemkin #8; RMG #5
HO2(5)+CH3(13)=O2(6)+CH4(15) 1.000e+00 0.000 0.000
PLOG/ 0.001 9.300e+10 0.000 0.000 /
PLOG/ 1.000 8.000e+10 0.000 0.000 /
PLOG/ 3.000 7.000e+10 0.000 0.000 /
PLOG/ 10.000 3.700e+12 0.000 12.518 /
PLOG/ 20.000 2.900e+12 0.000 11.922 /
PLOG/ 50.000 1.500e+12 0.000 13.909 /
PLOG/ 80.000 1.500e+11 0.000 1.987 /
PLOG/ 100.000 1.500e+11 0.000 1.987 /
PLOG/ 650.000 2.300e+11 0.200 4.968 /
PLOG/ 2000.000 3.700e+07 1.340 2.186 /
DUPLICATE
! Reaction index: Chemkin #9; RMG #5
HO2(5)+CH3(13)=O2(6)+CH4(15) 1.000e+00 0.000 0.000
PLOG/ 0.001 7.100e+05 1.800 1.133 /
PLOG/ 1.000 8.800e+05 1.770 0.954 /
PLOG/ 3.000 2.900e+05 1.900 0.397 /
PLOG/ 10.000 9.300e+07 1.100 0.000 /
PLOG/ 20.000 4.500e+07 1.200 0.000 /
PLOG/ 50.000 5.800e+06 1.500 0.000 /
PLOG/ 80.000 2.500e+05 1.900 0.000 /
PLOG/ 100.000 1.900e+05 1.940 0.000 /
PLOG/ 650.000 7.000e+05 1.700 0.298 /
PLOG/ 2000.000 0.000e+00 0.000 0.000 /
DUPLICATE
the above mechanism can be converted to a cantera yaml file, but attempting to use it in a cantera reactor will give the following message:
CanteraError:
*******************************************************************************
CanteraError thrown by addReactions:
*******************************************************************************
InputFileError thrown by PlogRate::validate:
Error on line 225 of ./chemkin_error.yaml:
Invalid rate coefficient for reaction 'CH3(13) + HO2(5) <=> CH4(15) + O2(6)'
at P = 2.0265e+08, T = 200.0
at P = 2.0265e+08, T = 500.0
at P = 2.0265e+08, T = 1000.0
at P = 2.0265e+08, T = 2000.0
at P = 2.0265e+08, T = 5000.0
at P = 2.0265e+08, T = 10000.0
| Line |
| 220 | - {P: 80.0 atm, A: 1.5e+11, b: 0.0, Ea: 1.987}
| 221 | - {P: 100.0 atm, A: 1.5e+11, b: 0.0, Ea: 1.987}
| 222 | - {P: 650.0 atm, A: 2.3e+11, b: 0.2, Ea: 4.968}
| 223 | - {P: 2000.0 atm, A: 3.7e+07, b: 1.34, Ea: 2.186}
| 224 | note: 'Reaction index: Chemkin #8; RMG #5'
> 225 > - equation: HO2(5) + CH3(13) <=> O2(6) + CH4(15) # Reaction 9
^
| 226 | duplicate: true
| 227 | type: pressure-dependent-Arrhenius
| 228 | rate-constants:
*******************************************************************************
*******************************************************************************
the PLOG/ 2000.000 0.000e+00 0.000 0.000 / line is what causes the error. Cantera evaluates the reactions separately at a number of temperatures and pressures as part of it's validation procedure. In order for this representation to be interpreted at all, the above line needs to be commented out.
This reaction can alternatively be represented as follows, which will yield no errors:
! Reaction index: Chemkin #8; RMG #5
HO2(5)+CH3(13)=O2(6)+CH4(15) 1.000e+00 0.000 0.000
PLOG/ 0.001 9.300e+10 0.000 0.000 /
PLOG/ 0.001 7.100e+05 1.800 1.133 /
PLOG/ 1.000 8.000e+10 0.000 0.000 /
PLOG/ 1.000 8.800e+05 1.770 0.954 /
PLOG/ 3.000 7.000e+10 0.000 0.000 /
PLOG/ 3.000 2.900e+05 1.900 0.397 /
PLOG/ 10.000 3.700e+12 0.000 12.518 /
PLOG/ 10.000 9.300e+07 1.100 0.000 /
PLOG/ 20.000 2.900e+12 0.000 11.922 /
PLOG/ 20.000 4.500e+07 1.200 0.000 /
PLOG/ 50.000 1.500e+12 0.000 13.909 /
PLOG/ 50.000 5.800e+06 1.500 0.000 /
PLOG/ 80.000 1.500e+11 0.000 1.987 /
PLOG/ 80.000 2.500e+05 1.900 0.000 /
PLOG/ 100.000 1.500e+11 0.000 1.987 /
PLOG/ 100.000 1.900e+05 1.940 0.000 /
PLOG/ 650.000 2.300e+11 0.200 4.968 /
PLOG/ 650.000 7.000e+05 1.700 0.298 /
PLOG/ 2000.000 3.700e+07 1.340 2.186 /
PLOG/ 2000.000 0.000e+00 0.000 0.000 /
The two representations (2 reactions with the 2000 atm rate commented out vs 1 reaction) yield different results for rates in cantera at 2000 atm (see minimal example for code used to generate this:)
rate not equal at pressure: 2000.0 and temperature 500
combined rate expression: 1007315.6839752827 kmol/cm^3/s ; separate rate expression : 2201080.556622974 kmol/cm^3/s
How To Reproduce
I have attached a minimal example with a jupyter notebook and chemkin/cantera input files.
Expected Behavior
I think it requires some thought, but I believe the "combined" method is how we want to represent reactions before we port them to Cantera.
Installation Information
Describe your installation method and system information.
- macOS 10.15.7
- Installed from source, with anaconda
- RMG version: 3.0.0-1208-gf8b136e26
Additional Context
this came up in #2288, you can refer to that for additional context.
see below for minimal example:
- Lingua principale
- Python
- Stelle
- 540
- Fork
- 266
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ReactionMechanismGenerator/RMG-Py
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
ReactionMechanismGenerator/RMG-Py#3014 ·
-
Eckart.calculate_tunneling_function: cancellation in 1 - ratio and missing cos branch for small barriersForse già presa @sectio-aurea-q l’ha presa 14 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
ReactionMechanismGenerator/RMG-Py#3019 ·
-
Arkane ORCA parser misclassifies oblique diatomic OH as a nonlinear rotor due to exact-zero inertia testForse già presa @Mohit-Ak l’ha presa 13 giorni fa. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 52/100
ReactionMechanismGenerator/RMG-Py#3016 ·
-
Inconsistent standard state reference pressure (eg. for entropy calculations). 1 bar or 1 atm?Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
ReactionMechanismGenerator/RMG-Py#3015 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
ReactionMechanismGenerator/RMG-Py#3008 · 2 commenti ·
Tutte le issue di ReactionMechanismGenerator/RMG-Py
Issue simili
-
flow-measurement measurement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 76/100
MichaelYcJo/SpecSeal#1366 ·
-
bug c/evals c/ui size:L
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Arize-ai/phoenix#17633 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TransformerLensOrg/TransformerLens#1980 ·
I maintainer di solito rispondono entro 1 giorno
-
Module: Solr Needs: Lead Needs: Triage Theme: Search Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
internetarchive/openlibrary#14284 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 69/100
SpaceCowMedia/commander-spellbook-backend#1292 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno