These changes make it unnecessary to copy header files around during the build process, which tends to confuse IDEs and debuggers. The headers which comprise Cantera's external C++ interface are now in the 'include' directory. All of the samples and demos are now in the 'samples' subdirectory.
46 lines
1.2 KiB
Python
Executable file
46 lines
1.2 KiB
Python
Executable file
"""Gas mixtures.
|
|
|
|
These functions all return instances of class Solution that represent
|
|
gas mixtures.
|
|
|
|
"""
|
|
# for pydoc
|
|
import solution, constants
|
|
|
|
from constants import *
|
|
from Cantera.solution import Solution
|
|
|
|
#import _cantera
|
|
import os
|
|
|
|
def IdealGasMix(src="", id = "", loglevel = 0):
|
|
"""Return a Solution object representing an ideal gas mixture.
|
|
|
|
src --- input file
|
|
id --- XML id tag for phase
|
|
"""
|
|
return Solution(src=src,id=id,loglevel=loglevel)
|
|
|
|
|
|
def GRI30(transport = ""):
|
|
"""Return a Solution instance implementing reaction mechanism
|
|
GRI-Mech 3.0."""
|
|
if transport == "":
|
|
return Solution(src="gri30.cti", id="gri30")
|
|
elif transport == "Mix":
|
|
return Solution(src="gri30.cti", id="gri30_mix")
|
|
elif transport == "Multi":
|
|
return Solution(src="gri30.cti", id="gri30_multi")
|
|
|
|
|
|
def Air():
|
|
"""Return a Solution instance implementing the O/N/Ar portion of
|
|
reaction mechanism GRI-Mech 3.0. The initial composition is set to
|
|
that of air"""
|
|
return Solution(src="air.cti", id="air")
|
|
|
|
|
|
def Argon():
|
|
"""Return a Solution instance representing pure argon."""
|
|
return Solution(src="argon.cti", id="argon")
|
|
|