flame_fixed_T.py """ A burner-stabilized, premixed methane/air flat flame with multicomponent transport properties and a specified temperature profile. Requires: cantera >= 3.0 Keywords: combustion, 1D flow, burner-stabilized flame, premixed flame, plotting
The conversion utility ck2yaml is run as a shell command (using the exclamation mark ! magic shortcut). The YAML files produced with this notebook are close re-recreations of input files that are already included with Cantera; _demo is added to differentiate from the original YAML files: GRI-Mech 3.0 derived: gri30_demo.yaml.
Prerequisites# The first step in installing the Cantera Python module using pip is to make sure you have a compatible version of Python installed and are able to run pip from the command line. Packages for Cantera 3.0.0 are available for Python versions 3.8, 3.9, 3.
This is an index of Python examples included with Cantera. Cantera's Python examples can be downloaded by clicking the "Source" link at the top of each example page. Table of
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Mixing two streams. #. Since reactors can have multiple inlets and outlets, they can be used to implement mixers, splitters, etc. In this example, air and methane are mixed in stoichiometric proportions. Due to the low temperature, no reactions occur. Note that the air stream and the methane stream use different reaction mechanisms, with
A simplistic approach to mechanism reduction which demonstrates Cantera's features for dynamically manipulating chemical mechanisms. Here, we use the full GRI 3.0
lithium_ion_battery.py. (Source) """ This example calculates the cell voltage of a lithium-ion battery at given temperature, pressure, current, and range of state of charge (SOC). The thermodynamics are based on a graphite anode and a LiCoO2 cathode, modeled using the 'BinarySolutionTabulatedThermo' class.
flame_initial_guess.py. (Source) """ A freely-propagating, premixed methane-air flame. Examples of saving and loading a flame and restarting with different initial guesses. Requires: cantera >= 3.0 Keywords: combustion, 1D flow, flame speed, premixed flame, saving output """ import sys from pathlib import Path import cantera as ct try: import
This example can, for example, be used to iterate to a counterflow diffusion flame to an awkward pressure and strain rate, or to create the basis for a flamelet table. Requires: cantera >= 3.0, matplotlib >= 2.0 Keywords: combustion, 1D flow, extinction, diffusion flame, strained flame, saving output, plotting """ from pathlib import Path
sound_speed_units.py. (Source) """ Compute the "equilibrium" and "frozen" sound speeds for a gas. Uses the pint library to include customized units in the calculation. Requires: Cantera >= 3.0.0, pint Keywords: thermodynamics, equilibrium, units """ import cantera.with_units as ctu import numpy as np # This sets the default output format of the
combustor.py. (Source) """ Calculate steady-state solutions for a combustor, modeled as a single well-stirred reactor, for different residence times. We are interested in the steady
To install the Cantera Python module, first activate your virtual environment, if you're using one. Then, run the command: Linux / macOS: python3 -m pip install cantera. Windows:
mechanism_reduction.py. (Source) """ A simplistic approach to mechanism reduction which demonstrates Cantera's features for dynamically manipulating chemical mechanisms. Here, we use the full GRI 3.0 mechanism to simulate adiabatic, constant pressure ignition of a lean methane/air mixture. We track the maximum reaction rates for each reaction
The specific problem simulated is the partial oxidation of methane over a platinum catalyst in a packed bed reactor. This example solves the DAE system directly, using the FlowReactor class and the SUNDIALS IDA solver, in contrast to the approximation as a chain of steady-state WSRs used in surf_pfr_chain.py. Requires: cantera >= 3.0.0 Keywords
Última actualización el Jueves, 16 de Marzo de 2023 15:16. El Viceministerio de Minas y Energía pone a disposición del público en general la información pertinente al registro de canteras del Paraguay. El listado corresponde a las canteras activas e inactivas dentro del territorio nacional, la compilación de estos datos está a cargo del
The specific problem simulated is the partial oxidation of methane over a platinum catalyst in a packed bed reactor. To avoid needing to solve a DAE system, the PFR is approximated as a chain of successive WSRs. See surf_pfr.py for a more advanced implementation that solves the DAE system directly. Requires: cantera >= 3.0 Keywords: catalysis
adiabatic_flame.py. (Source) """ A freely-propagating, premixed hydrogen flat flame with multicomponent transport properties. Requires: cantera >= 3.0 Keywords: combustion, 1D flow, premixed flame, multicomponent transport, saving output """ from pathlib import Path import cantera as ct # Simulation parameters p = ct.one_atm # pressure [Pa] Tin
Reactors and Reactor Networks. #. In Cantera, a reactor network represents a set of one or more homogeneous reactors and reacting surfaces that may be connected to each other and to the environment through devices representing mass flow, heat transfer, and moving walls. The system is generally unsteady – that is, all states are functions of time.
cantera_test.py:. """ Compute the "equilibrium" and "frozen" sound speeds for a gas Requires: cantera >= 2.5.0 Keywords: thermodynamics, equilibrium """ import cantera as ct import math def equilSoundSpeeds(gas, rtol=1.0e-6, max_iter=5000): """ Returns a tuple containing the equilibrium and frozen sound
Start by opening an interactive Python session, for example by running IPython. Import the Cantera Python module and NumPy by running: >>> importcanteraasct>>>
Start by opening an interactive Python session, for example by running IPython. Import the Cantera Python module and NumPy by running: import cantera as ct import numpy as
This program should be run from the command line first to convert any CK files you plan to use into Cantera format (YAML format). (New in Cantera 2.5) Usage: Each of the terms in square brackets is an option that can be passed on the command line to ck2yaml. --input: This is the chemistry input file, containing a list of all the element names
isentropic.py """ Isentropic, adiabatic flow example-calculate area ratio vs. Mach number curve Requires: cantera >= 2.5.0, matplotlib >= 2.0 Keywords: thermodynamics, compressible flow, plotting """ import cantera as ct import math import numpy as np def soundspeed ( gas ): """The speed of sound.
custom2.py. (Source) """ Solve an ignition problem where the normal reactor governing equations are extended with additional equations implemented in Python. This demonstrates an approach for solving problems where Cantera's built-in reactor models are not sufficient for describing the system in question. Unlike the 'custom.py' example, in this
The implemented equations make use of Cantera's extensible reactor models. Therefore, Cantera version 2.6.0 or higher is required. The porous media burner considered in this example is a cylindrical tube filled three different porous materials: a porous ceramic made from a Yttria-stabilized Zirconia Alumina (YZA) section with length of 2 inches
The most frequently used class in Cantera is the Solution. It can represent a mixture of gases, a liquid solution, or a solid solution and provides access to the solution’s