Jacobian in Cantera
From charlesreid1
The Jacobian matrix is constructed in Cantera by the one-dimensional domain. The hierarchy is described in the file http://files.charlesmartinreid.com/Cantera_Flames.pdf
Each domain creates a 1D domain.
Background Info
Jacobian Matrix
Cantera Classes
Entire Domain Objects
OneDim:
- located in
/path/to/cantera/Cantera/src/oneD/OneDim.cpp - contains multiple 1D domains
- used to solve multiple domain problems
Sim1D:
- located in
/path/to/cantera/Cantera/src/oneD/Sim1D.h - extended version of OneDim class (stores more information)
Single Domain Objects
Domain1D:
- located in
/path/to/cantera/Cantera/src/oneD/Domain1D.cpp - represents a single 1D domain
- actually creates the Jacobian for each point in the domain
- this class is a base class
Domain1D is a base class extended by the following classes:
- StFlow - 1D flow domain that satisfies 1D similarity solution for reacting,axisymmetric flows
- located in
/path/to/cantera/Cantera/src/oneD/StFlow.h - all derivative types also located in StFlow.h
- derivative types:
- AxiStagnFlow
- FreeFlame
- OneDFlow
- located in
- Bdry1D - base class for boundaries between 1D domains
- located in
/path/to/cantera/Cantera/src/oneD/Inlet1D.h - all derivative types also located in
Inlet1D.h - derivative types:
- Inlet1D
- Symm1D
- Outlet1D
- OutletRes1D
- Surf1D
- ReactingSurf1D
- located in
- Solid1D - class for 1D reacting solids
- located in
/path/to/cantera/Cantera/src/oneD/Solid1D.h
- located in
- Surf1D - class for 0D surface
- located in
/path/to/cantera/Cantera/src/oneD/Surf1D.h
- located in
NOTE: given that StFlow is the most relevant type of 1D domain for a discussion of Jacobians, I will focus only on it.
Each 1D domain knows about neighboring domains (see the Domain1D::linkleft() and Domain1D::linkright() methods, as well as the Domain1D::locate() method).
Each 1D domain also knows what OneDim container contains it (stored in the m_container variable).
Jacobian Objects
MultiJac
- located in
/path/to/cantera/Cantera/src/oneD/MultiJac.cpp - Jacobian evaluator object
Jacobian Calculation
There is a MultiJac object contained in each 1D domain object (i.e. Domain1D base class), but there is also one associated with the collection of all 1D domains (i.e. OneDim base class). Only the Jacobian object in the OneDim class is actually utilized to solve the Jacobian (it appears to me that the Jacobian contained in all Domain1D classes are never used).
In the OneDim class, the Jacobian is stored in the variable m_jac.
