Commit graph

392 commits

Author SHA1 Message Date
Ray Speth
3e3557e756 [Test] Add more tests of the VCS equilibrium solver
These tests are based on the 'plasma_equilibrium.py' example, and include
a fairly large number of phases, some of which are only present for certain
temperature ranges.
2014-05-27 02:54:02 +00:00
Ray Speth
217b396ec5 [Python] Fix to conversion of samples from Python 3 to Python 2
Some calls to the print function weren't being converted to print statements
correctly by 3to2, so now we use the alternative fix, which is to use the
backported print function.

Fixes Issue 216.
2014-05-23 22:46:59 +00:00
Ray Speth
2df0396879 [ck2cti] Relax formatting requirement for Chebyshev coefficients.
Allow coefficient data to begin on the same line as the declaration of the
order of the polynomial in each dimension.

Fixes Issue 219.
2014-05-07 21:57:34 +00:00
Ray Speth
d6a3ea4aa7 [ck2cti] Allow stoichiometric coefficients ending in decimal points
Fixes Issue 220.
2014-05-07 21:57:22 +00:00
Ray Speth
c621d5f9db [SCons] Fix dependency resolution for some Python files 2014-05-07 21:56:57 +00:00
Ray Speth
9cddf5aaed Add test to check that error messages from ctml_writer are propagated 2014-05-06 14:39:54 +00:00
Ray Speth
5cb1c787ad [CTI] Allow omitting third body in Chebyshev reaction equations 2014-05-06 14:39:01 +00:00
Ray Speth
87bea8ae30 [CTI] Relax formatting requirements for third bodies in reaction strings
Allow 'A + B (+M)' in addition to 'A + B (+ M)'
2014-05-06 14:38:50 +00:00
Steven DeCaluwe
710393308d Editing Pitzer's acentric factor initialization 2014-04-25 11:49:34 +00:00
Steven DeCaluwe
06a88b70eb Added gas-phse kinetics to RedlichKwongMFTP class 2014-04-25 11:49:32 +00:00
Ray Speth
f8ff70ed38 [ck2cti] Make 'PCHEB' and 'TCHEB' keywords case insensitive
Fixes Issue 213.
2014-04-08 19:39:16 +00:00
Ray Speth
53820ed4a3 [Test] Remove remnants of the old Python test suite 2014-04-08 16:27:19 +00:00
Ray Speth
051381d862 [Python] Allow setting composition of sliced Solution objects
The following syntax:

    >>> phase['H2','O2'].X = [1.0, 0.5]

Is equivalent to:

    >>> phase.X = 'H2:1.0, O2:0.5'
2014-04-08 16:26:47 +00:00
Ray Speth
d19f975940 [Python] Allow setting composition using a dict
The following syntax makes it easier to set the composition programmatically,
e.g. inside a for loop:

    phase.Y = {'H2':0.1, 'O2':0.4, 'AR':0.5}
2014-04-08 16:26:34 +00:00
Ray Speth
43546f870f fpValueCheck detects (invalid) decimal ponts in exponents 2014-04-02 15:26:31 +00:00
Ray Speth
4a6dd84f81 [Thermo] Check composition strings for invalid float literals 2014-04-02 15:26:20 +00:00
Ray Speth
50344cb34f [ck2cti] Improve error messages associated with missing input files 2014-03-27 01:29:50 +00:00
Ray Speth
9e8ae80d2d [ctml_writer] Direct error/debug messages to stderr
Since stdout may be used for writing the actual output file, direct all error
and debug messages to stderr, so that they can be shown to the user when
ctml_writer is invoked via ct2ctml_string.
2014-03-27 01:29:39 +00:00
Ray Speth
5b77bbb719 [1D] Add bounds checks to setRefineCriteria 2014-03-24 21:38:22 +00:00
Ray Speth
18c756b499 [1D/Cython] Add flame speed sensitivity analysis example 2014-03-24 04:03:49 +00:00
Ray Speth
df908229b1 [ctml_writer] Fix handling of units in some fields
When using Python 3, using -1 as the dummy value for density and site_density
causes probems, because the (ordered) comparison between a density specified
with units (as a tuple) and 0 is not allowed. Instead, use None as the
placeholder value.
2014-03-13 02:19:28 +00:00
Ray Speth
755164397d [ctml_writer] Improve error reporting
Print a more useful traceback for cases where exceptions are raised in ctml_writer.
2014-03-13 02:19:23 +00:00
Ray Speth
ec6b65513b [Python] Add multiprocessing example 2014-03-08 21:47:14 +00:00
Ray Speth
98c480c7c7 [Python] Fix docstring of Sim1D.restore
Resolves Issue 210.
2014-03-08 21:47:09 +00:00
Ray Speth
c5eb2f57dd [Python] Make Cantera objects explicitly non-picklable and uncopyable.
Attempting to copy or pickle Cantera objects with an underlying C++ object
previously led to unexpected errors. These operations will not raise excptions
indicating the unimplemented feature.

Resolves Issue 205.
2014-03-04 17:39:21 +00:00
Ray Speth
6e72f8930f [SCons] Fix Cython module compilation with MinGW 2014-02-24 03:25:30 +00:00
Ray Speth
3e073aae27 [SCons] Force relink of Python extension when necessary 2014-02-21 19:07:58 +00:00
Ray Speth
aad284cce7 [SCons] Fix library linking issues under Cygwin 2014-02-20 03:01:01 +00:00
Bryan W. Weber
3de3842e3c [MixMaster] Fix variable ambiguity in DataFrame.py.
Fix file not closed bug in importCSV. Import from XML is broken due
to missing XML module.
2014-02-19 22:45:00 +00:00
Ray Speth
771ff96e86 [MixMaster] Fixes to use Cython function names
DataFrame.importCSV and dataFrame.importData were still using function names
from the old Python module.
2014-02-14 16:40:58 +00:00
Ray Speth
377d3877f7 [MixMaster] Fix usage of numpy.zeros and numpy.ones 2014-02-14 16:40:54 +00:00
Ray Speth
03be898300 [ck2cti] Skip non-ASCII characters in input files 2014-02-06 22:58:53 +00:00
Ray Speth
eaceaf7b86 [SCons] Use SCons to compile the Cython extension
Fixes issues with mismatched compilers between the Cython extension and the
cantera library, especially on OS X. Improves build dependency resolution to
eliminate unnecessary recompilation of _cantera.cpp.
2014-01-31 23:15:17 +00:00
Ray Speth
d4a9ca0847 [SCons] Fix simultaneous compilation of Python 2 and Python 3 modules
Use separate SCons Environments so the 'py_include_dirs' variable (which
contains the Numpy include directory) can be distinct for each Python module.
2014-01-30 00:48:03 +00:00
Ray Speth
e59a7a7eeb [1D] Eliminate deprecated methods of Domain1D 2014-01-30 00:47:52 +00:00
Ray Speth
ff9584105b Do implicit CTI to XML conversions without generating .xml files
When instantiating a phase from a .cti file, do the conversion in memory,
without writing the XML representation to disk. This eliminates the unrequrested
XML files that Cantera normally generates, and also avoids errors when running
Cantera from a directory where the user does not have write permissons.
2014-01-30 00:47:37 +00:00
Ray Speth
3c703eb4ed [Cython/1D] Use 'Mix' transport if no transport model is provided 2014-01-24 20:40:32 +00:00
Ray Speth
c34877a96f [ck2cti] Fix support for species names containing '+' and '='
This addesses a parsing error that would occur if a mechanism contained both
'foo' and 'foo+', where reactions written as 'foo+bar' would be parsed as a
reaction with 'foo+' and 'bar'.

See Issue 182.
2014-01-24 20:40:26 +00:00
Ray Speth
a3d8684d94 [Samples] Explicitly set transport model to 'Mix' for clarity 2014-01-11 00:20:27 +00:00
Ray Speth
f3b1555a6b [Cython] By default, use same interpreter for mechanism conversions
Fixes failures when only the Python 3 module is present.
2014-01-09 23:12:03 +00:00
Bryan W. Weber
a689717a7a [Matlab] Add isothermalCompressibility and thermalExpansionCoeff functions
Resolves Issue 157.
2014-01-08 17:10:41 +00:00
Ray Speth
908b63fccd [Cython] Fix compilation issue when using Clang 2014-01-08 17:10:29 +00:00
Bryan W. Weber
1d1ad21840 [ck2cti] Fix for support of unterminated thermo sections
Fixes the case where the next section header contains a modifier, e.g. 'thermo
all' or 'reactions <units>'.

See Issue 199.
2014-01-06 18:47:02 +00:00
Bryan W. Weber
b5c2881f64 [ck2cti] Add extra info about handling of extra thermo parameters
See Issue 199.
2014-01-06 18:46:55 +00:00
Bryan W. Weber
e3ab2dbf8a [ck2cti] Improve handling of duplicate species
Warn when a species is given multiple times in the input list. Do not add the
duplicate species to speciesList.

Resolves Issue 199.
2014-01-06 18:46:49 +00:00
Bryan W. Weber
7deb45a840 [Matlab] Check for sparse arrays in the Solution 'set' function
Resolves Issue 140.
2014-01-06 18:46:43 +00:00
Bryan W. Weber
120c6e742c [Matlab] Add fwdRateConstants and revRateConstants functions
Resolves Issue 125.
2014-01-06 18:46:36 +00:00
Bryan W. Weber
16335a0932 [Matlab] Allow nAtoms to take string inputs for species and elements
Resolves Issue 159.
2014-01-06 18:46:30 +00:00
Ray Speth
3a308a041f [Matlab] Remove broken rxnEqs function
"ReactionEqn" is the working alternative. See Issue 118.
2014-01-06 18:46:25 +00:00
Bryan W. Weber
f8850963a0 Use b instead of n for temperature exponent
Resolves Issue 198.
2014-01-02 22:23:38 +00:00