Correct handling of third-body concentration in falloff reactions [issue #579] - #654
Correct handling of third-body concentration in falloff reactions [issue #579]#654yeanment wants to merge 2 commits into
Conversation
|
Closes #579. Thanks for submitting this! A bit swamped right now, but having this as a PR will make considering the fixes much easier when time allows. |
39aed08 to
e3f0954
Compare
…ies and a default efficiency of 0.
d3227fa to
7a0697b
Compare
|
Hi, @baperry2, I have revised the implementation for the code generations to specifically address third-body fall-off reactions with a single third-body species.
Implementation DetailThe commit addresses the issues raised above and the code now generates cleaner
Validation & ResultsTo verify the update, I conducted simulations of a planar unstretched flame with PeleLMeX, and the initial profile is computed using a Cantera solution. Both the original and updated implementations were tested under identical setups for a finite time interval.
Conclusion: The new model provides more reliable results, showing a distinct improvement in predicting the flame's progression compared to the original code in dealing with such reactions. |


This pull request aims to resolve the issues reported in #579 in handling of the three-body falloff reactions of type A + B + C <=> AB + C, where C represents a species like N2.
Specifically, I have made the following updates in my recent two commits:
if not (reaction.rate.type == "falloff"):in the block to avoid update of the reactant or product for normal three-body Arrhenius reactions.cw.writer(fstream, f"alpha = std::max(alpha, 1e-16);")to avoid float-point exceptions. However, I am not sure whether this will have a big influence on the convergencies.It is noted that I would like to reuse the existing code as much as possible. Therefore, the generated mechanism.H is not optimized, where a better implementation may be available. For instance, in the present implementation, the generated
Corrwrites likewhich is equivalent to
I'm not familiar with parsing simplification, so I just left it as is.