-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Abstract
Following #63 (and based on comments in #79), a new framework for reaction factories and reaction rate evaluators (MultiRateBase) is now introduced with Cantera/cantera#982. Once fully implemented, the new framework will allow for a unified handling that avoids the rigid Rate1 templates, and eliminates the need for FalloffFactory, etc..
Motivation
Describe the need for the work being done:
- Simplify handling of reaction rates
- Replace hard-coded reaction rate implementation
- Simplify implementation of derivatives/Jacobians
- Improve API handling (take full advantage of
AnyMapserialization)
Description
An intermediate Reaction3 class allows for a clean deprecation of reaction types that use the old framework; until the transition is complete (Cantera 3.0?), both will remain fully functional. The refactoring is planned to involve multiple phases:
-
BulkKinetics: use existingMultiBulkRatesrate evaluator to handle replacement classes, and deprecate current approachesa. PR to replace everything except
FalloffReaction, i.e. createElementaryReaction3,ThreeBodyReaction3, ... see Refactor reaction rate evaluators cantera#995
b. PR’s to update infrastructure … see Proof-of-concept: Modify reaction rates in memory cantera#1051 (modification of rate parameters in memory), Reaction rate factories cantera#1061 (rate factories), Make rate constant calculation consistent with Kee, et al. cantera#1084 (resolve role ofM), Small fixes and improvements / sparse coefficient matrices cantera#1088 (remove some inconsistencies of API's)
c. PR to replaceFalloffReactionsand associatedFalloffandFalloffFactoryclasses, i.e.LindemannFalloff,TroeFalloff,SRIFalloff... see Wrap up GasKinetics cantera#1101 -
InterfaceKinetics: a newMultiInterfaceRatesrate evaluator will require some discussion prior to implementationa. PR to streamline ... see Preamble to InterfaceKinetics refactoring cantera#1184
b. Once everything is fully ported, deprecated classes (and associated handlers) can be removed and the'3'can be dropped from names of all replacement classes. ... see Refactor interface kinetics cantera#1181
References
The following issues/PR's are tagged as there may be synergies and/or repercussions
- extend modify_reaction to work correctly for interfaceReactions #8 - extend
modify_reactiontoInterfaceKinetics - Analytical Jacobian for Cantera #19 - analytical Jacobians
- Improve handling of electrochemical reactions #38/Implement Butler-Volmer for Electrochemical Reactions #44 - electrochemical reactions
- Dualism of InterfaceKinetics vs Reactor Networks (ReactorSurface)? #61 - dualism of
InterfaceKineticsand reactor networks - Make reactions extendable #63 - (closed) discussion of extendable reactions
- Make Python interface to reactions and reaction rates more intuitive #84 - make Python interface more intuitive
- Provide Jacobian to Sundials solvers #86 - Jacobians for Sundials solvers
- Support for Langmuir-Hinshelwood kinetics cantera#597 - (closed) Langmuir-Hinshelwood kinetics
- Discuss deprecating Butler-Volmer reaction types cantera#749 - (closed) deprecation of old electrochemical reaction types
- Make reactions extendable cantera#982 - (closed) implementation of the initial framework
- Enable serialization of Cantera objects cantera#984 - serialization
- Add Blowers Masel reaction to GasKinetics and InterfaceKinetics cantera#987 - Blowers Masel reactions
- Adding adaptive preconditioner functionality to Cantera cantera#1010 - preconditioning for Sundials solvers (formerly Adding adaptive preconditioner functionality to Cantera (draft) cantera#951)
- Sparse Jacobians for GasKinetics cantera#1089 - analytical Jacobians (formerly Refactor StoichManager for sparse Jacobian Calculations cantera#1081)