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

Allow mechanism to be used at conditions where it is valid (with positive rate expressions) #54

Open
rwest opened this issue Jul 3, 2020 · 2 comments
Labels
feature-request New feature request

Comments

@rwest
Copy link
Member

rwest commented Jul 3, 2020

Abstract
We could find and track a valid range of conditions (eg. T, maybe P) for a mechanism and allow it to be used within that range, but abort (or warn) when used outside it. Currently the validity is checked at a fixed list of temperatures, and if any of them fail the mechanism cannot be used.

Motivation
Cantera/cantera-website#77 illustrates a case when a user tries to use a published kinetic model for combustion, which includes a rate expression made out of a PLOG format which has the sum of two Arrhenius expressions. The published rate was intended to be used for combustion, i.e. high temperatures, but Cantera validates the mechanism at a fixed range of temperatures, including 500 K, finds it is invalid (the rate expression gives a negative reaction rate) and aborts. Even if the user had no intention of using it at 500 K. It seems a bit arbitrary; we don't ensure it's valid at 50K or 5K. There's currently no user-accessible work-around.
As well as PLOG reactions with multiple entries, same applies to DUPLICATE reactions when one has a negative A-factor.

Possible Solutions

Could figure out which temperatures the mechanism is valid at, and allow it to be used there, rather than just refusing to use it at all.
Does Cantera already do something like this for species enthalpies? i.e. if you specify a set of NASA polynomials from 300K to 1500K then try to evaluate something at 200K or 2000K what happens?

References

Cantera/cantera-website#77
Cantera/cantera-website#116

@speth
Copy link
Member

speth commented Jul 3, 2020

My reservation about doing something like this automatically is that it feels a bit like reading tea leaves. Thermo data and Chebyshev reaction types both have explicit data stating the valid temperature ranges that Cantera could (but often doesn't) use to limit calculation ranges. But for PLOG rates (or really, any other rate parameterization), input files don't provide any data indicating the valid temperature range. Just finding the range where the rate is not NaN doesn't seem sufficient to set these bounds.

I think it would be fair to allow the temperature range used for this check to be taken from the associated Kinetics object. This would take a bit of massaging of how we validate reactions, since currently individual reactions are validated independently of any Kinetics or ThermoPhase objects, and Kinetics objects don't have temperature bounds associated with them.

@rwest
Copy link
Member Author

rwest commented Jul 4, 2020

We could, in the Cantera yaml input, have an explicit statement of the valid range? Perhaps have an option in the CHEMKIN-to-yaml converter to suggest valid ranges (the reading of tea leaves part) as a convenience, but get the user to confirm what is actually intended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request
Projects
None yet
Development

No branches or pull requests

2 participants