-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Abstract
I am working on implementing analytical Jacobian for Cantera to replace the finite difference Jacobian computed internally by SUNDIALS.
Motivation
Jacobian matrix can be computed analytically for chemical kinetics. Analytical Jacobian improves the accuracy when compared to the finite difference Jacobian computed with forward difference scheme especially for stiff kinetics. With a good implementation, it can also reduce the computational expense when compared to the finite difference Jacobian.
Description
To obtain the analytical Jacobian, derivatives of the production rates w.r.t. species mass fractions and state variables are computed. Based on the governing equations of a reactor model, derivatives corresponding to the Jacobian can be computed from the computed derivatives of the production rates. An API for the end user to enable/disable analytical Jacobian is added.
Alternatives
Analytical Jacobian can also be obtained by using auto-differentiation packages. Such packages introduce additional dependencies and the fundamental classes of Cantera need to rewritten to account for auto-differentiation. Instead, the current implementation adds additional member variables and methods to the existing classes to compute the required derivatives without touching existing methods.
References