Cantera Lecture
From charlesreid1
Cantera Overview
Cantera is a code written in C++ that can be used to perform chemical kinetic and thermodynamic calculations.
The way it does this is by providing the user with a set of building blocks, and allowing the user to piece these building blocks together to form complex kinetic/thermodynamic systems or networks
Users can interface with Cantera through C++, or through the other interfaces:
- Matlab toolbox
- Python
- Fortran
Cantera Objects
Reservoir - fixed state
- the state of the reservoir never changes
- used to impose fixed upstream/inlet conditions
- chemistry is frozen - so no reactions will take place
Reactor - canonical chemical reactor
- contains some mixture of species
- has a set of characteristics
- e.g. T, V, P, composition, enthalpy, density, MW, etc...
Fluids - gases or liquids
Chemical Mechanisms - external files "fed" to Cantera
- chemical mechanisms specify two things:
- species
- reactions
- all thermodynamic data for species is specified (e.g. heat capacity as a polynomial function - "NASA coefficients")
- all thermodynamic data for chemical reactions (pre-exponential factors, activation energies, etc.)
Walls - separate reactors
- can have heat transfer via the usual mechanisms - convection, conduction, radiation
- can have a set heating rate (a constant, or a function of time)
- can move - due to a pressure difference, a displacement rate expression, etc.)
Flow controllers - control flow... 3 types
- Mass flow controller - maintains a fixed mass flowrate
- Valves - the mass flowrate is a function of $ \Delta P $
- Pressure flow controller - maintains a fixed $ P $ in the reactor (think of this as a pressure relief valve)
Matlab Examples
Batch Reactor Example
How might we combine the above Cantera objects to make a batch reactor?
e.g. where would the reactor go? Where would the flow controllers go?
Any reservoirs needed? No
Any flow controllers needed? No
Reactor State 1 --> Reactor State 2
We want to know what happens when the reactor is changing from state 1 to state 2
Constant volume reactor:
- How to create a reactor?
- What is the volume of the reactor if we don't specify it?
- How do we specify a volume for the reactor?
| |||||||||||||||||||||||