-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Yaml writer bug after removing some originally duplicate reactions #1629
Comments
Thanks, @lavdwall for reporting the issue. I can reproduce, where
|
On closer inspection, the cantera/src/kinetics/Reaction.cpp Lines 196 to 202 in 90b4481
Reversing the order of operations (first write input, then overwrite with actual parameter values) breaks a surprising amount of logic. |
speth
added a commit
to speth/cantera
that referenced
this issue
Jul 26, 2024
speth
added a commit
to speth/cantera
that referenced
this issue
Jul 26, 2024
speth
added a commit
to speth/cantera
that referenced
this issue
Jul 27, 2024
speth
added a commit
to speth/cantera
that referenced
this issue
Jul 27, 2024
speth
added a commit
to speth/cantera
that referenced
this issue
Jul 27, 2024
ischoegl
pushed a commit
that referenced
this issue
Jul 29, 2024
Merged
5 tasks
pjsingal
pushed a commit
to pjsingal/cantera
that referenced
this issue
Sep 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In python: When doing mechanism reduction based on reaction rates of progress, it is possible that duplicate reactions in the original mechanism are no longer duplicate in the reduced mechanism. Those reactions can be identified and the "duplicate" property can be set to False. However, since this property change is not pushed to the underlying C++ object, when the reduced mechanism is written to a *yaml file using the YamlWriter, the originally duplicate reactions are still indicated as being duplicate, and reading the reduced mechanism gives an error.
Steps to reproduce
Taking GRI-3.0 as example, in which reaction 87 and 88 are duplicate. I will remove reaction 88 and set reaction 87 to non-duplicate, then write that "reduced" model to yaml. Importing this new reduced model gives an error.
Now read the new mechanism:
gas_reduced = ct.Solution('gri30_test_red.yaml')
Behavior
Gives the following error:
The text was updated successfully, but these errors were encountered: