Cantera/CTI Files/Phases
From charlesreid1
Contents
Theory of Phases
One of the most important rules about phases is the Gibbs phase rule (http://en.wikipedia.org/wiki/Phase_rule). This rule states that the number of degrees of freedom that must be specified for a gas to have a fixed thermodynamic state is given by the formula:
where:
- F is the number of degrees of freedom,
- C is the number of components
- P is the number of phases
Note, however, that the Gibbs phase rule only applies to one particular gas state. If we're looking at two locations at either end of a geometry with non-uniform thermodynamic states, or if we're looking at differential volumes of gas and solid catalyst, the Gibbs phase rule only applies to each individual location separately, independently.
There is more information over at the Chemical Equilibrium page, which has some lecture notes.
Phase Specification
Each phase that is used in a problem must be specified in the input file.
Multiple types of phases have multiple types of input file entries.
Any phase must specify the following information:
- Phase type
- Phase name
- Elements in phase
- Species in phase
- Reactions in phase
- Kinetics model in phase
- Transport model in phase
- Initial state of phase
- Phase options
Generally phases are specified according to the following schema:
phase_type( name = [...], elements = [...], species = [...], reactions = [...], transport = [...], initial_state = [...], options = [...] )
Specifying Phase Properties
Phase Type
The valid phase types for a CTI file are each defined as classes in the file ctml_writer.py
. Each object uses a more generic phase object as a base class. The valid phase types are:
- ideal_gas - an ideal gas mixture
- stoichiometric_solid - A solid compound or pure element. Stoichiometric solid phases contain exactly one species, which always has unit activity. The solid is assumed to have constant density. Therefore the rates of reactions involving these phases do not contain any concentration terms for the (one) species in the phase, since the concentration is always the same.
- stoichiometric_liquid - An incompressible stoichiometric liquid. Currently, there is no distinction between stoichiometric liquids and solids.
- metal - A metal.
- semiconductor - A semiconductor.
- incompressible_solid - An incompressible solid.
- lattice - (no description)
- lattice_solid - A solid crystal consisting of one or more sublattices.
- liquid_vapor - fluid with a complete liquid/vapor equation of state. This entry type selects one of a set of predefined fluids with built-in liquid/vapor equations of state. The substance_flag parameter selects the fluid. See purefluids.py for the usage of this entry type.
- redlich_kwong - A fluid with a complete liquid/vapor equation of state. This entry type selects one of a set of predefined fluids with built-in liquid/vapor equations of state. The substance_flag parameter selects the fluid. See purefluids.py for the usage of this entry type.
- ideal_interface - A chemically-reacting ideal surface solution of multiple species.
- edge - A 1D boundary between two surface phases.
Phase Name
The name of a phase
Examples
ideal_gas(name = "gas", elements = "O H C N Ar", species = """gri30: H2 H O O2 OH H2O HO2 H2O2 C CH CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O CH2OH CH3O CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH AR N2""", transport = 'Mix', reactions = 'gri30: all', options = ['skip_undeclared_elements', 'skip_undeclared_species'], initial_state = state(temperature = 300.0, pressure = OneAtm, mole_fractions = 'CH4:0.095, O2:0.21, AR:0.79') )
ideal_gas(name = "gas", elements = "O H C N Ar", species = """gri30: H2 H O O2 OH H2O HO2 H2O2 C CH CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O CH2OH CH3O CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH AR N2""", transport = 'Mix', reactions = 'gri30: all', options = ['skip_undeclared_elements', 'skip_undeclared_species'], initial_state = state(temperature = 300.0, pressure = OneAtm, mole_fractions = 'CH4:0.095, O2:0.21, AR:0.79') )
ideal_interface(name = "Pt_surf", elements = " Pt H O C ", species = """ PT(S) H(S) H2O(S) OH(S) CO(S) CO2(S) CH3(S) CH2(S)s CH(S) C(S) O(S) """, phases = "gas", site_density = 2.7063e-9, reactions = "all", initial_state = state(temperature = 900.0, coverages = 'O(S):0.0, PT(S):0.5, H(S):0.5') )
Flags
Cantera all pages on the wiki related to the Cantera combustion microkinetics and thermodynamics (a.k.a. "thermochemistry") software.
Cantera · Cantera Outline · Category:Cantera
Outline of Cantera topics: Cantera Outline · Cantera Outline/Brief Understanding Cantera's Structure: Cantera Structure Cantera from Matlab: Using_Cantera#Matlab Cantera from Python: Using_Cantera#Python Cantera from C++: Using_Cantera#C++ Cantera + Fipy (PDE Solver): Fipy and Cantera/Diffusion 1D Cantera Gas Objects: Cantera/Gases Cantera 1D Domains, Stacks: Cantera_One-D_Domains · Cantera_Stacks Cantera Gas Mixing: Cantera_Gas_Mixing
Topics in Combustion: Diffusion: Cantera/Diffusion · Cantera/Diffusion Coefficients Sensitivity Analysis: Cantera/Sensitivity Analysis Analysis of the Jacobian Matrix in Cantera: Jacobian_in_Cantera Chemical Equilibrium: Chemical_Equilibrium Kinetic Mechanisms: Cantera/Kinetic_Mechanisms Reactor Equations: Cantera/Reactor_Equations Differential vs. Integral Reactors: Cantera/Integral_and_Differential_Reactors Effect of Dilution on Adiabatic Flame Temperature: Cantera/Adiabatic_Flame_Temperature_Dilution
Topics in Catalysis: Cantera for Catalysis: Cantera_for_Catalysis Steps for Modeling 0D Multiphase Reactor: Cantera_Multiphase_Zero-D Reaction Rate Source Terms: Cantera/Reaction_Rate_Source_Terms Surface coverage: Cantera/Surface_Coverage Surface reactions: Cantera/Surface_Reactions
Cantera Input Files: Chemkin file format: Chemkin CTI files: Cantera/CTI_Files · Cantera/CTI_Files/Phases · Cantera/CTI_Files/Species · Cantera/CTI_Files/Reactions
Hacking Cantera: Pantera (monkey patches and convenience functions for Cantera): Pantera Extending Cantera's C API: Cantera/Extending_C_API Extending Cantera with Python Classes: Cantera/Adding Python Class Debugging Cantera: Cantera/Debugging_Cantera Debugging Cantera from Python: Cantera/Debugging_Cantera_from_Python Gas Mixing Functions: Cantera_Gas_Mixing Residence Time Reactor (new Cantera class): Cantera/ResidenceTimeReactor
Resources: Cantera Resources: Cantera Resources Cantera Lecture Notes: Cantera_Lecture
Category:Cantera · Category:Combustion Category:C++ · Category:Python Flags · Template:CanteraFlag · e |
Installing Cantera notes on the wiki related to installing the Cantera thermochemistry software library.
Cantera Installation: Mac OS X 10.5 (Leopard): Installing_Cantera#Leopard Mac OS X 10.6 (Snow Leopard): Installing_Cantera#Snow_Leopard · Cantera2 Config Mac OS X 10.7 (Lion): Installing_Cantera#Lion Mac OS X 10.8 (Mountain Lion): Installing_Cantera#Mountain_Lion Ubuntu 12.04 (Precise Pangolin): Installing_Cantera#Ubuntu Windows XP: Installing_Cantera#Windows_XP Windows 7: Installing_Cantera#Windows_7
Cantera Preconfig: In old versions of Cantera, a preconfig file was used to specify library locations and options. Mac OS X 10.5 (Leopard) preconfig: Cantera_Preconfig/Leopard_Preconfig Mac OS X 10.6 (Snow Leopard) preconfig: Cantera_Preconfig/Snow_Leopard_Preconfig Mac OS X 10.8 (Mountain Lion) preconfig: Cantera_Config/MountainLion_SconsConfig Ubuntu 12.04 (Precise Pangolin) preconfig: Cantera_Config/Ubuntu1204_SconsConfig Flags · Template:InstallingCanteraFlag · e |