-
Notifications
You must be signed in to change notification settings - Fork 227
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
ZeroDivisionError in solver computeRateDerivative() #1420
Comments
I think I met the same problem when I try to use the simulate module in RMG-Py/scripts (Simulation and Sensitivity/Uncertainty Analysis):
|
@alongd Hello, Alon. I meet the same issue as below: Traceback (most recent call last): Did you find a way to solve this problem? Thanks! |
Hi @AH9316, it's been a while since I reported this, I think that the status is still of an open issue, I don't recall we resolved this. |
Hi, @alongd. We find the reason cause this error in my case. In order to make you understand, let me recall what we have done. Purpose: To import a gasoline mechanism into RMG database and use it as a ‘seedmechanism’ to run RMG simulation with addition of other fuel components. The objective is to obtain a final mechanism with cross reactions between gasoline and other fuel components. Problem: The gasoline mechanism has the keyword ‘REV’ which expresses reversible reactions. Upon importing this into the database, RMG doesn’t recognize the ‘REV’ keyword, which means, the imported mechanism only has forward reactions. Solution to this problem: In order to solve this problem, we change the original gasoline mechanism by manually separating reversible reactions into forward and backward reactions, thus avoiding the ‘REV’ keyword. Subsequently, we import this modified gasoline mechanism into the RMG database with both forward and backward reactions in the imported mechanism. New problem: When we run RMG simulation with this modified imported gasoline mechanism, we meet this error: ZeroDivisionError: float division. By checking each reaction, we narrowed down this problem to the following set of reactions shown below: To illustrate how we separate a reaction into forward and backward reactions: Solution for new Problem: Due to the ‘ZeroDivision’ error we obtained when we separate the above set of reactions, we decided to maintain it as the same in the original gasoline mechanism and rather separate other reversible reactions into forward and backward reactions before importing this new modified mechanism into the database. With this new modified imported mechanism, we can run RMG simulation successfully without any ‘ZeroDivison’ error. Upon obtaining the final ‘chem.inp’ from RMG, we append the reversible Arrhenius parameters for the above reactions. Other problem: 1) RMG still cannot handle reactions with more than 3 products, so when we run RMG simulation with the new modified imported mechanism, we comment out any such reaction in the reaction.py file located in the kinetic/library directory; for example “C14H14+O<=>C6H5CH2J+C6H6+CO+H”. I attach the original gasoline mechanism below: I hope this is helpful to improve RMG software. Thanks! |
This is in Python 2.7 and we stand no chance of reproducing it. Closing as stale. |
Running the long nitrogen test (unmerged) crashes with:
Adding debug prints gave zero values in some kr, kf, C entries:
The text was updated successfully, but these errors were encountered: