Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ValueError: No pressure specified" when checking collision limits with surfaceReactor #1635

Closed
rwest opened this issue Jun 19, 2019 · 1 comment
Labels
abandoned abandoned issue/PR as determined by actions bot Complexity: Low stale stale issue/PR as determined by actions bot Topic: Catalysis Type: Bug

Comments

@rwest
Copy link
Member

rwest commented Jun 19, 2019

Bug Description

At the end of running a job with surface chemistry, RMG crashed when doing the collision limit checks:

Performing final model checks...
Traceback (most recent call last):
  File "rmgpy/kinetics/arrhenius.pyx", line 739, in rmgpy.kinetics.arrhenius.PDepArrhenius.getRateCoefficient
ValueError: No pressure specified to pressure-dependent PDepArrhenius.getRateCoefficient().
Exception ValueError: ValueError('No pressure specified to pressure-dependent PDepArrhenius.getRateCoefficient().',) in 'rmgpy.reaction.Reaction.getRateCoefficient' ignored
Traceback (most recent call last):
  File "rmgpy/kinetics/arrhenius.pyx", line 739, in rmgpy.kinetics.arrhenius.PDepArrhenius.getRateCoefficient
ValueError: No pressure specified to pressure-dependent PDepArrhenius.getRateCoefficient().
Exception ValueError: ValueError('No pressure specified to pressure-dependent PDepArrhenius.getRateCoefficient().',) in 'rmgpy.reaction.Reaction.getRateCoefficient' ignored
Traceback (most recent call last):
  File "rmgpy/kinetics/arrhenius.pyx", line 739, in rmgpy.kinetics.arrhenius.PDepArrhenius.getRateCoefficient
ValueError: No pressure specified to pressure-dependent PDepArrhenius.getRateCoefficient().
Exception ValueError: ValueError('No pressure specified to pressure-dependent PDepArrhenius.getRateCoefficient().',) in 'rmgpy.reaction.Reaction.getRateCoefficient' ignored
Traceback (most recent call last):
  File "/Users/rwest/Code/Cat/RMG-Py/rmg.py", line 181, in <module>
    main()
  File "/Users/rwest/Code/Cat/RMG-Py/rmg.py", line 166, in main
    cProfile.runctx(command, global_vars, local_vars, stats_file)
  File "/Users/rwest/anaconda/envs/rmg230/lib/python2.7/cProfile.py", line 49, in runctx
    prof = prof.runctx(statement, globals, locals)
  File "/Users/rwest/anaconda/envs/rmg230/lib/python2.7/cProfile.py", line 140, in runctx
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/main.py", line 934, in execute
    self.check_model()
  File "/Users/rwest/Code/Cat/RMG-Py/rmgpy/rmg/main.py", line 1148, in check_model
    p_min=self.Pmin, p_max=self.Pmax)
  File "rmgpy/reaction.py", line 1233, in rmgpy.reaction.Reaction.check_collision_limit_violation
  File "rmgpy/reaction.py", line 1266, in rmgpy.reaction.Reaction.check_collision_limit_violation
  File "rmgpy/kinetics/arrhenius.pyx", line 729, in rmgpy.kinetics.arrhenius.PDepArrhenius.getRateCoefficient
  File "rmgpy/kinetics/arrhenius.pyx", line 739, in rmgpy.kinetics.arrhenius.PDepArrhenius.getRateCoefficient
ValueError: No pressure specified to pressure-dependent PDepArrhenius.getRateCoefficient().

This is mentioned in #1590 and cfgoldsmith#61 but here are more details and hopefully some clues on how to fix it.

How To Reproduce

Features of the input file that I think are relevant:

  • No pressure dependence block
  • surfaceReactors (which have an initialPressure of 1.0 bar)
  • reactionLibraries = [('Surface/CPOX_Pt/Deutschmann2006', False),('BurkeH2O2inN2',False),('FFCM1(-)',False),('NOx2018',False)],
  • seedMechanisms = [],
  • generatedSpeciesConstraints( allowed=['reaction libraries'],)

Expected Behavior

It wouldn't crash

What I think is the problem

My guess is that although RMG was told to generate new reactions without pressure dependence module, a pressure dependent PDepArrhenius reaction is coming in via one of the gas phase reaction libraries (as it should), but because the reactor model is a surfaceReactor not a simpleReactor, it doesn't have an attribute P but instead has initialP:

cdef class SimpleReactor(ReactionSystem):
    cdef public ScalarQuantity P
cdef class SurfaceReactor(ReactionSystem):
        cdef public ScalarQuantity initialP

So that one or both of these lines don't know what pressures to use:

  • "rmgpy/rmg/main.py", line 1148, in check_model
  • "rmgpy/reaction.py", line 1233, in rmgpy.reaction.Reaction.check_collision_limit_violation

Installation Information

Describe your installation method and system information.

  • Mac OS X
  • built from source, in an anaconda environment, using the 2.4.0 tagged commits from github
The current git HEAD for RMG-Py is:
	caebd4895dfaee296b6562b28f89e6c350422cca
	Fri Jun 14 18:30:27 2019 -0400
The current git HEAD for RMG-database is:
	08b8214e8b4c869411f498cb50acb76b012520b4
	Fri Jun 14 18:15:05 2019 -0400
@github-actions
Copy link

This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Jun 21, 2023
@github-actions github-actions bot added the abandoned abandoned issue/PR as determined by actions bot label Jul 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned abandoned issue/PR as determined by actions bot Complexity: Low stale stale issue/PR as determined by actions bot Topic: Catalysis Type: Bug
Projects
None yet
Development

No branches or pull requests

1 participant