Cantera / cantera-website

Official Cantera Website
https://cantera.org
Other
15 stars 26 forks source link

Add information on derivative calculation to science section #169

Closed ischoegl closed 1 year ago

ischoegl commented 2 years ago

The PR Cantera/cantera#1089 introduces the capability to calculate derivatives of reaction rate expressions. As noted there:

The Jacobian implemented in this PR is strictly for the source term; it does not consider constraints posed by the EoS, which can only be handled once additional assumptions inherent to a specific model are known (e.g. constant pressure / volume etc.). As such, results are different from a strictly numerical Jacobian, which includes additional terms due to the EoS closure. Note that these terms are implemented in the test suite where numerical / semi-analytical jacobians are compared.

Per @speth's review comment:

[...] it makes sense to me that these derivatives are calculated with other quantities held constant as the equations are written, independent of whether that satisfies the equation of state or the sum(X) = 1 constraint. I think it would be very useful to provide a bit of guidance to users on this point, that is, noting that they can calculate other derivatives using the chain rule and whatever equation they need to satisfy, and maybe providing an example of how to calculate a Jacobian at constant volume or at constant pressure.

Due to the number of access function introduced in various API's, it would make sense to collect corresponding information in the Science section of the website.

ischoegl commented 1 year ago

In view of Cantera/enhancements#178, detailed documentation is added to Doxygen directly (see PR Cantera/cantera#1563). This approach is in line with past practice of Cantera documentation.