-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Duplicate reactions not being caught in ck2yaml #865
Comments
Thanks @tsikes! A PR would be good, thank you! |
The main issue here is that the better duplicate reaction check in C++ ( Ideally, |
@speth running yaml inputs through the C++ checkDuplicates seems like a must do; however, I also agree with what you said about transparency for tracking down problems with CK input files. Additionally, while the C++ checkDuplicates would fix problems 2-4, it would not fix problem 1 because the conversion itself breaks. I think doing both would work though. Edit: Nevermind, I assumed you were checking the information that was being sent from the yaml file. Your solution is much cleaner and succinct. I'll close my pull request. |
Several variations of duplicate reactions are not being caught when parsing chemkin mechanisms.
System information
Expected behavior
When given a duplicate reaction, an error should be thrown to inform the user.
Actual behavior
The old problem of r1.third_body being None and having no attribute upper crops up yet again.
The duplicate reactions are not flagged and the reactions are added.
The duplicate reactions are not flagged and the reactions are added.
The duplicate reactions are not flagged. This one I am not certain of but I believe that newer versions of Chemkin would flag this as an unmarked duplicate reaction?
To Reproduce
Steps to reproduce the behavior:
Attachments
duplicate-reactions.txt
Additional context
All of these issues are found in the check_duplicate_reactions function of ck2yaml.
I've fixed the first issue by checking that r1/r2 has the attribute upper before checking third body things.
I've fixed the second and third problems by ordering the reactants and products by name.
Finally the third I've fixed by checking if the reactant/product/pressure dep tuple named k exists in possible_duplicates as product/reactant/pressure dep.
If these solutions seem alright, I can do a pull request to resolve these bugs.
The text was updated successfully, but these errors were encountered: