Python Examples#

See also

To find examples covering a specific topic, see the index of example tags.

If you’re just getting started with Cantera, see our Python Tutorial for an introduction to the Cantera Python interface.

Thermodynamics#

Image

Mixing using Quantity objects

Mixing using Quantity objects
Image

Critical state properties

Critical state properties
Image

Converging-Diverging Nozzle

Converging-Diverging Nozzle
Image

Equilibrium with charged species and multiple condensed phases

Equilibrium with charged species and multiple condensed phases
Image

Rankine cycle

Rankine cycle
Image

Rankine cycle (with units)

Rankine cycle (with units)
Image

Adiabatic flame temperature including solid carbon formation

Adiabatic flame temperature including solid carbon formation
Image

EEDF calculation

EEDF calculation
Image

Sound speeds (with units)

Sound speeds (with units)
Image

Sound speeds

Sound speeds
Image

Isentropic, adiabatic flow (with units)

Isentropic, adiabatic flow (with units)
Image

Vapor Dome

Vapor Dome
Image

Equivalence ratio

Equivalence ratio
Image

Surface with coverage-dependent thermo

Surface with coverage-dependent thermo
Image

Non-ideal equations of state

Non-ideal equations of state

Kinetics#

Image

Viewing a reaction path diagram

Viewing a reaction path diagram
Image

Growth of diamond film using CVD

Growth of diamond film using CVD
Image

Shock-tube species profiles as a function of time

Shock-tube species profiles as a function of time
Image

Extracting a sub-mechanism

Extracting a sub-mechanism
Image

Mechanism reduction

Mechanism reduction
Image

Blowers-Masel reaction rates

Blowers-Masel reaction rates
Image

Jet-stirred reactor temperature and species profiles

Jet-stirred reactor temperature and species profiles
Image

Lithium Ion Battery Discharge Curve

Lithium Ion Battery Discharge Curve
Image

Custom reaction rates

Custom reaction rates
Image

Solid oxide fuel cell using elementary kinetics

Solid oxide fuel cell using elementary kinetics
Image

Interactive Reaction Path Diagrams

Interactive Reaction Path Diagrams

Transport#

Image

Porous media transport using the dusty gas model

Porous media transport using the dusty gas model
Image

Parallelizing transport property calculations

Parallelizing transport property calculations
Image

High-Pressure transport using two models

High-Pressure transport using two models

Reactor networks#

Image

Mixing two streams

Mixing two streams
Image

Continuously stirred tank reactor with periodic behavior

Continuously stirred tank reactor with periodic behavior
Image

Combustor residence time

Combustor residence time
Image

Constant-pressure, adiabatic kinetics simulation

Constant-pressure, adiabatic kinetics simulation
Image

Plasma Reactor

Plasma Reactor
Image

Reactors separated by a moving piston

Reactors separated by a moving piston
Image

Integrating constant pressure ignition using SciPy

Integrating constant pressure ignition using SciPy
Image

Constant-pressure, adiabatic kinetics simulation with sensitivity analysis

Constant-pressure, adiabatic kinetics simulation with sensitivity analysis
Image

Plug flow reactor with surface chemistry

Plug flow reactor with surface chemistry
Image

Acceleration of reactor integration using a sparse preconditioned solver

Acceleration of reactor integration using a sparse preconditioned solver
Image

Reactors with walls and heat transfer

Reactors with walls and heat transfer
Image

Soot precursor formation with time-varying mass flow rate

Soot precursor formation with time-varying mass flow rate
Image

Using ExtensibleReactor to implement wall inertia

Using ExtensibleReactor to implement wall inertia
Image

Plug flow reactor modeled as a chain of well stirred reactors

Plug flow reactor modeled as a chain of well stirred reactors
Image

Plug flow reactor: silicon nitride deposition

Plug flow reactor: silicon nitride deposition
Image

Plug flow reactor modeling approaches

Plug flow reactor modeling approaches
Image

Nanosecond Pulse Plasma Simulation

Nanosecond Pulse Plasma Simulation
Image

Continuously Stirred Tank Reactor

Continuously Stirred Tank Reactor
Image

Ignition delay time using the Redlich-Kwong real gas model

Ignition delay time using the Redlich-Kwong real gas model
Image

Diesel-type internal combustion engine simulation with gaseous fuel

Diesel-type internal combustion engine simulation with gaseous fuel
Image

One-dimensional packed-bed, catalytic-membrane reactor

One-dimensional packed-bed, catalytic-membrane reactor
Image

Reactor cascade model for reactive flows in inert porous media

Reactor cascade model for reactive flows in inert porous media

1D reacting flows#

Image

Flame speed as a function of equivalence ratio

Flame speed as a function of equivalence ratio
Image

Burner-stabilized flame including ionized species

Burner-stabilized flame including ionized species
Image

Burner-stabilized flame

Burner-stabilized flame
Image

Counterflow diffusion flame

Counterflow diffusion flame
Image

Opposed-flow premixed strained flame

Opposed-flow premixed strained flame
Image

Freely-propagating flame with charged species

Freely-propagating flame with charged species
Image

Laminar flame speed sensitivity analysis

Laminar flame speed sensitivity analysis
Image

Catalytic combustion of methane on platinum

Catalytic combustion of methane on platinum
Image

Detached flat flame stabilized at a stagnation point

Detached flat flame stabilized at a stagnation point
Image

Laminar flame speed calculation

Laminar flame speed calculation
Image

Burner-stabilized flame with imposed temperature profile

Burner-stabilized flame with imposed temperature profile
Image

Saving, loading, and restarting 1D calculations

Saving, loading, and restarting 1D calculations
Image

Symmetric premixed twin flame

Symmetric premixed twin flame
Image

Diffusion flame extinction strain rate

Diffusion flame extinction strain rate
Image

Diffusion flame unstable branch

Diffusion flame unstable branch
Image

Scaling of diffusion flames with pressure and strain rate

Scaling of diffusion flames with pressure and strain rate
Image

Flame Speed with Convergence Analysis

Flame Speed with Convergence Analysis

Gallery generated by Sphinx-Gallery