Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Solution phase models might include PDep rates from libraries

Aperta
#1,872 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@hwpang ci sta già lavorando.

Dal 29/7/2020.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug
Bug Description

If a kinetic library has pressure-dependent rates, and this library is used in a simulation involving a LiquidReactor, some of these rates end up in the core, making RMG crash when it checks the model:

  File "/home/alongd/Code/RMG-Py/rmgpy/rmg/main.py", line 982, in execute
    self.check_model()
  File "/home/alongd/Code/RMG-Py/rmgpy/rmg/main.py", line 1202, in check_model
    p_min=self.Pmin, p_max=self.Pmax)
  File "rmgpy/reaction.py", line 1217, in rmgpy.reaction.Reaction.check_collision_limit_violation
  File "rmgpy/reaction.py", line 1250, in rmgpy.reaction.Reaction.check_collision_limit_violation
  File "rmgpy/kinetics/arrhenius.pyx", line 775, in rmgpy.kinetics.arrhenius.PDepArrhenius.get_rate_coefficient
  File "rmgpy/kinetics/arrhenius.pyx", line 785, in rmgpy.kinetics.arrhenius.PDepArrhenius.get_rate_coefficient
ValueError: No pressure specified to pressure-dependent PDepArrhenius.get_rate_coefficient().

Although this is a conflict in the user's definitions (use LiquidReactor and use a library with PDep expressions), I still think this is a bug, since we don't warn not to do so, and RMG should have caught that on time, either crashing with a helpful error message or dealing with it appropriately (see suggestion below).

How To Reproduce

Run a LiquidReactor simulation with the NOx2018 kinetic library including methanol in the initial species (so that OH + CH3 = CH3OH, for example, is taken from that library), or with one of the BurkeH2O2 kinetic libraries with H2 as a core species.

Expected Behavior

I would expect RMG to at least try taking the high pressure limit rate from a pdep expression, if available (we already have the functionality to do that: https://github.com/ReactionMechanismGenerator/RMG-Py/blob/master/rmgpy/data/kinetics/library.py#L150). If unavailable, we need to decide whether to crash with a helpful message, or warn the user while ignoring that library reaction.

Lingua principale
Python
Stelle
535
Fork
262
Merge medio
5g 6h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ReactionMechanismGenerator/RMG-Py

Tutte le issue di ReactionMechanismGenerator/RMG-Py

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.