Commit graph

304 commits

Author SHA1 Message Date
Ray Speth
1cedf904df [Doc] Add all Python examples to the Sphinx docs 2013-08-22 21:46:27 +00:00
Ray Speth
8d7f48d031 [Cython] Minor reorganization of examples 2013-08-22 21:46:17 +00:00
Ray Speth
3d5ac35c6f [Test] Avoid exact comparisons of floating point numbers 2013-08-21 19:49:37 +00:00
Ray Speth
32ea4fd924 [SCons] Fix to skip Python startup messages
This fixes an issue when the Python interpreter prints startup messages that
appear before the expected output lines. Known to be a problem with the Anaconda
Python distribution.
2013-08-16 17:25:04 +00:00
Ray Speth
d60629ead5 [Cython] Fix syntax errors in MixMaster for Python 3
Backticks are not allowed in Python 3 (equivalent to repr)
2013-08-14 17:56:05 +00:00
Ray Speth
a22ceda566 [Scons] Fix build order dependencies for python modules 2013-08-14 17:55:51 +00:00
Ray Speth
dfe5945cd6 [Matlab] Add access to class FlowReactor 2013-08-02 23:17:54 +00:00
Ray Speth
ea3ac2fc91 [Test] Fix file name used for Cython pdep tests 2013-08-02 23:17:49 +00:00
Ray Speth
3fe2cd9bbb [Cython] Fix format strings for compatibility with Python 2.6 2013-08-02 23:17:45 +00:00
Ray Speth
c32b54a47d [ck2cti] Fix for reading files with no final 'END' keyword 2013-08-02 23:17:38 +00:00
Ray Speth
cc75faf402 [Matlab] Add support for additional reactor types
Matlab interface now supports ConstPressureReactor, IdealGasReactor, and
IdealGasConstPressureReactor.
2013-07-31 18:14:47 +00:00
Ray Speth
03786fd07b [Python] Add support for IdealGasReactor and IdealGasConstPressureReactor 2013-07-31 18:14:45 +00:00
Ray Speth
9b6354b0c0 [SCons] Fix generation of ctpath.m
Was failing because of dependency on dynamically-generated 'python_module_loc'
variable.
2013-07-31 18:14:42 +00:00
Ray Speth
615c3124fb [Reactor] Fix sensitivity parameter order for constant pressure reactors
This matches the behavior of Reactor, where the parameter order is
determined by the order of the reactions in the mechanism.
2013-07-30 15:57:37 +00:00
Ray Speth
8724bc9f04 [Cython] Fix generation of MSI installer when using Python 2.x
The old patch to distutils only worked on Python 3.x, since distutils
uses old-style classes which do not support property objects.
2013-07-29 01:38:01 +00:00
Ray Speth
f320290c51 [SCons] Fix Python module path in setup_cantera and post-install message
In particular, this fixes paths for Linux distros that put Python modules in
'lib64/pythonX.Y/site-packages'.

Also fixes the reported installation path for the Python module on Windows.
2013-07-29 01:37:57 +00:00
Ray Speth
5bd01da0fa Fix deprecation warnings in SOFC example 2013-07-26 21:33:54 +00:00
Ray Speth
c76ddefa5f Fix spelling errors 2013-07-26 21:33:50 +00:00
Ray Speth
6fbf5d35ed [Cython] Make critial / saturation properties available for all phase types
Any ThermoPhase class which overrides the appropriate methods will work,
and classes that don't will raise an exception.
2013-07-23 15:31:09 +00:00
Ray Speth
4d406f2ff4 [Doc] Update compilation instructions related to Cython module 2013-07-23 15:30:53 +00:00
Ray Speth
fa1d9e1ca9 [Cython] Use scipy when necessary to support older Python versions
Fixes an incompatibility with Python 2.6 and 3.1. Scipy is not
required when using Python 2.7 or 3.2+.
2013-07-23 15:30:51 +00:00
Ray Speth
346f9e196f [Cython] Use unittest2 when necessary to support Python 2.6 2013-07-23 15:30:47 +00:00
Ray Speth
ab7775e67e [Cython] Fix Python 2.6 compatibility issues with sys.version_info
The "major" attribute is a new feature in Python 2.7.
2013-07-18 22:39:26 +00:00
Ray Speth
0fddd6a129 [Thermo] Fix errors in setState_SPorSV
This corrects the behavior in cases where the correct temperature is below the
nominal minimum temperature for the phase.

Add test cases for this and analogous cases for the maximum temperature and
setState_HPorUV.

Fixes Issue 151.
2013-07-18 19:07:14 +00:00
Ray Speth
000e374b6c [ctml_writer] Fix a Python 2.6 compatibility issue
Python 2.6 needs some extra help when trying to execute code
containing Windows (CRLF) line endings.
2013-07-18 19:07:10 +00:00
Ray Speth
a20fd58000 [1D] Fix save/restore when mechanism size differs
The failures were caused when attempting to restore the tolerance vectors, which
have a value for each species. Since these tolerances are usually the same for
all species, the last value in the array can be used to extend the array to the
required length.

Also add some tests for this feature.
2013-07-18 00:04:13 +00:00
Ray Speth
5d6a97f89a [Cython/Examples] Update to use IdealGasReactor 2013-07-16 22:09:55 +00:00
Ray Speth
a616d4f55f [Test] Fix dependencies so Cython tests run after rebuilding 2013-07-16 22:09:53 +00:00
Ray Speth
8a232abc71 [Reactor] Add optimized IdealGasConstPressureReactor class
Like IdealGasReactor, this formulation uses the temperature as a state variable
to improve performance for the common use case of reactors containing ideal gas
mixtures.
2013-07-16 22:09:46 +00:00
Ray Speth
785d4f058e [Reactor] Add optimized IdealGasReactor class
This formulation of the reactor governing equations, with temperature as a state
variable, works better for ideal gas mixtures. This way, most of the Jacobian
components are derivatives at constant temperature, eliminating the need to
recompute the temperature-dependent part of the rate expressions when computing
these entries.
2013-07-16 22:09:40 +00:00
Ray Speth
c89b7f1c93 [Reactor] Change formulation of Reactor to support non-ideal phases
Expanding the time derivative of the total internal energy only works for ideal
phases, so for the more general case it is necessary to keep the internal energy
as the state variable and use an iterative method for setting the state.
2013-07-16 22:09:37 +00:00
Steven DeCaluwe
6321cf4c8e Removed calculatePsat from matlab toolbox, and overwrote 'satPressure' for MixtureFugacityTP
class to point to the calculatePsat function.  Removed 'const' declaration from satPressure
within the ThermoPhase class.
2013-07-15 17:43:45 +00:00
Ray Speth
1b9d23c120 [ck2cti] Fix parsing third-body reactions with no efficiencies 2013-07-08 01:35:36 +00:00
Ray Speth
f7fc700c8c [ck2cti] Fix third-body reactions with explicit reverse rate expressions 2013-07-08 01:35:33 +00:00
Ray Speth
a69d56ab28 [ck2cti] Check for duplicate thermo entries
By default, raise an exception.
With '--permissive', use the first entry found.
2013-07-08 01:35:30 +00:00
Ray Speth
5d26a264f4 [ck2cti] Add limited support for unterminated sections
Each section of the input file should end with 'END'. Other utilities that work
with these files don't always require this, so we allow unterminated sections
if the '--permissive' flag is used, otherwise these are considered errors.
2013-07-08 01:35:27 +00:00
Ray Speth
812ec6ef77 [ck2cti] Fix for mechanism files with in-line transport data 2013-07-08 01:35:23 +00:00
Ray Speth
e8ab4dda28 [ck2cti] Fix handling of thermo entries with end-of-line comments 2013-07-08 01:35:20 +00:00
Ray Speth
ceeea2ed21 [ck2cti] Improve messages for some input file errors 2013-07-08 01:35:18 +00:00
Ray Speth
f1e5183431 [ck2cti] Fix to allow species names starting with special characters 2013-07-08 01:35:15 +00:00
Ray Speth
2778267a43 [ck2cti] Fix reading files with "CR" (old Macintosh) line endings 2013-07-08 01:35:12 +00:00
Ray Speth
4f236a80fe [ck2cti] Fix reading empty THERMO sections 2013-07-08 01:35:10 +00:00
Ray Speth
08724c9ac3 [ck2cti] Translate "chemically activated" reactions
These are reactions with an additional set of Arrhenius parameters labeled
'HIGH' in the input file. They may also have a set of falloff function
parameters.
2013-07-06 21:44:10 +00:00
Ray Speth
27902b32e0 [ck2cti] Separate falloff functions from falloff reaction type
This is in preparation for adding support for chemically activated reactions,
which also use these falloff functions.
2013-07-06 21:44:07 +00:00
Ray Speth
da95339706 [ctml_writer] Add support for chemically activated reactions 2013-07-06 21:44:05 +00:00
Ray Speth
77ccab92bd [Kinetics] Implement evaluation of "chemically activated" reaction rates 2013-07-06 21:44:02 +00:00
Ray Speth
1cec7cc051 [Cython] Fix a couple cases where exceptions could escape 2013-07-06 21:43:58 +00:00
Steven DeCaluwe
06d239a40a Enabled use of the 'calculatePsat' function for MixtureFugacityTP thermo class
in the Matlab toolbox.
2013-07-03 15:44:52 +00:00
Ray Speth
bd8d257c5e [ctml_writer] Clean up reaction.build 2013-06-28 21:24:26 +00:00
Ray Speth
dd41d8ac90 [ctml_writer] Improve performance of XMLnode._write 2013-06-28 21:24:24 +00:00