Cantera Outline: Difference between revisions
From charlesreid1
| Line 154: | Line 154: | ||
** pandas | ** pandas | ||
* Numerics (outside of Cantera) | * Numerics (outside of Cantera) | ||
* Optimization | |||
=Optimization= | =Optimization= | ||
Revision as of 22:12, 27 March 2014
Overview of Cantera
- Capabilities
- High level division of Cantera's capabilities
- Zero-D, One-D, phase objects, numerics
- Division of capabilities should roughly follow how Cantera source code is divided
- Apps - utilities for converting between Chemkin and Cantera file formats, parsing input files, comparing output files, etc.
- Base - more utilities for array storage, printing and logging, XML file parsing, Cantera errors/exceptions,
- Clib - code for C API
- Converters
- Equil
- Fortran - code for Fortran API
- Kinetics - classes for getting/setting/calculating reaction network quantities (net production rate source terms, reaction rate parameters, etc.)
- Matlab - code for Matlab API
- Numerics - classes for solving ordinary differential equations, evaluating Jacobians, Newton methods, constructing and solving matrices, etc.
- OneD - classes relating to one-dimensional simulations (domains, stacks, one-dimensional flame simulations, etc.)
- Python - code for Python API
- Spectra
- Thermo
- TPX
- Transport
- ZeroD - classes relating to zero-dimensional Reactors (Reactor, Wall, etc.)
Cantera for Engineers
Introduction to what Cantera does/can do
Bridge (introduction to Cantera) with (thermodynamics/gas properties) stuff
"Applied" Cantera
- Introduce the pieces
- Will learn more about how these different pieces WORK later
- Brief introduction to how to use them, how to use them with Python
Thermodynamics
- Somewhere in our algorithm, looping over domain (or for the single reactor control volume), and we're saying, "update thermo and transport parameters" - focus on how this is being done, what classes its using, what capabilities are available
- Phase objects
- Cantera/Gases - information about gas phase objects in Cantera
- Cantera/Surfaces - information about surface phase objects in Cantera
- Single phase gas calculations
- Temperature/power calculations
- Basic Python numerics + simple Cantera gas stuff
- Isenthalpic valve drops
- Plain reactors: piston-cylinder problems
- Cantera/Phase Equilibrium Solvers for determining gas equilibrium state (e.g., you set U, you get T)
- Introductory CHEE type calculations
- Solving simple matrix systems, using Cantera's MW/density/properties functionality
Kinetics
- Discussion of kinetics
- Cantera/Reaction Rate Source Terms
Reaction rate source terms, separate from reactors
- Cantera/Reaction Rate Source Terms
- Cantera/Kinetic Mechanisms
Kinetic mechanisms- Theory of chemical reactions
- Definitions of quantities involved in chemical reactions
- Theoretical information needed (by Cantera) to define reaction mechanisms
- Cantera/CTI Files Specification of reaction kinetics in CTI files (useful info here: http://www.et.byu.edu/~tom/classes/641/Cantera/InputFile/definingphases.pdf)
- Cantera/CTI Files/Phases Specification of phases
- Cantera/CTI Files/Species Specification of species
- Cantera/CTI Files/Reactions Specification of reactions
- Specification of reaction kinetics in XML files
- Cantera/Kinetic Mechanisms
- Cantera kinetics examples
- Cantera/Simple Reaction
A very simple reaction - Cantera/Simple Reaction Network A very simple reaction network
- Cantera/Complex Reaction Network A more complex reaction network
- Cantera/Simple Reaction
- Single phase kinetics
- Source code abstraction
- Examples of obtaining reaction rates
- Graphene - how to really USE this information
- Multiphase surface kinetics
- Cantera/Surface Coverage
Surface coverage, site density, formulation of approach - Source code abstraction - Walls vs. SurfPhase vs. (etc.)
- Cantera/Surface Coverage
- Cantera kinetics examples
Transport
- BSL
- Mass transfer
- Cantera/Diffusion
Mixture vs. multicomponent diffusion - Cantera/Diffusion Coefficients - Diffusion coefficient models
- Mass transfer coefficients
- Cantera/Diffusion
- Heat transfer
- Heat diffusivity
- Heat transfer coefficients
- Momentum transfer
- General discussion: non-dimensional analysis, how it relates to Cantera
- Prandtl matlab examples - comparing transport properties (Prandtl number) for mixture-averaged and multicomponent models
Reactor Design
- Description of generic Cantera reactors, canonical CHE reactor types
- Cantera/Reactor Equations
General Cantera reactor equations - Cantera/Integral and Differential Reactors
Integral vs. differential reactors - Cantera/Isothermal and Nonisothermal Reactors
Isothermal vs. non-isothermal reactors - Heterogeneous vs. homogeneous
- Transport effects in reactors
- Fogler, Froment/Bischoff, Belfiore
Cantera Numerics
- Cantera/Structure
Structure of Cantera: "numerics" layer and "constitutive equations" layer
- Ordinary differential equations
- Cantera formulation, reactor equations
- ODE as primary problem type being solved in Cantera
- Cantera numerics, ODE solver sophistication
- Have ALREADY shown, with a simple Fipy time integrator, that Sundials has a lot of sophistication... that sophistication is NECESSARY for kinetics/reaction equations
- Surface coverage equations
- Surface species treated as control volume properties
- Packaged up into the Reactor's solution vector
- The Green's Function hack that makes a boundary condition into part of the domain
- Partial differential equations
- Cantera solutions to one-dimensional systems
- Assumptions being made for each problem type (axisymmetric, stagnation, etc.)
- Assorted numerical topics
- Newton's method
- Linear algebra
- Jacobians - Sandia report with definitions of Jacobians
- Initial value problems
- Boundary value problems
- Advanced boundary conditions
- Strategies for coupling Cantera with CFD
- Cantera/Fipy PFR
external numerical library for solving spatial boundary value problem - Interfacing with Chemkin-like programs (Fluent)
- Constructing your own numerical ODE/PDE solver
- Scipy: simple kinetic equation integration using Scipy
- Fipy: simple diffusion problem, coupling with Cantera
- Fipy: more complex reactor equation(s) and coupling with Cantera
- Cantera/Fipy PFR
Using Cantera with Python
- Strategies for object-oriented Python, particularly as applied to physics problems
- Strategies for combining Python-related libraries/modules/utilities with Cantera
- matplotlib
- numpy
- itertools
- pandas
- Numerics (outside of Cantera)
- Optimization
Optimization
- Not going into too much depth
- Optimizing kinetic parameters to fit data
- Optimizing other variables to maximize reactor performance
Mechanics
- Cantera/Debugging Cantera
Debugging Cantera - Cantera/Debugging Cantera from Python
Debugging Cantera from Python
- Cantera/Extending_C_API
Hacking, extending C API