Commit graph

510 commits

Author SHA1 Message Date
Ray Speth
d6f7fd855a [Python] Add access to SpeciesThermo(InterpType) objects 2015-04-20 18:34:36 -04:00
Ray Speth
71f912d211 [Python] Add basic access to Species objects 2015-04-17 19:06:43 -04:00
Ray Speth
258fb8ed57 [Matlab] Add missing 'clear' functions
Without these functions, it was impossible to use these classes
without leaking memory. Even with these functions, the memory is
released only when these functions are explicitly called, as
old-style Matlab classes have no notion of a destructor.

Fixes #252.
2015-04-11 10:54:52 -04:00
Ray Speth
2161060743 [Matlab] Fix clear(Reactor) to delete the reactor instead of copying 2015-04-10 23:44:55 -04:00
Ray Speth
ecb6242b79 Fix spelling errors 2015-04-08 19:36:55 -04:00
Ray Speth
eb18f34f47 [Python] Fix class docstrings of composite classes
These were being hidden by incorrectly placed __slots__ attributes (the
docstring must appear first).
2015-04-07 17:58:26 -04:00
Ray Speth
a981622981 [Python] Add transport_model override option to Solution constructor
This keyword argument allows the transport model specified in a CTI/XML file to
be overridden when creating the object. Can be used to speed up Solution
initialization by specifying 'transport_model=None', which is especially useful
for large mechanisms where transport initialization scales as species number
squared.
2015-04-07 17:58:26 -04:00
Ray Speth
79b3a8ae39 [ck2cti] Allow arbitrary reactant stoichiometries
There is no reason to disallow more than 3 reactants
2015-04-07 17:58:26 -04:00
Ray Speth
57856254f7 Change Python module URL to point to cantera.org 2015-03-10 22:41:49 +00:00
Ray Speth
eca79a5332 [Examples/1D] Use uniform initial grids in flame simulation examples 2015-02-28 00:24:32 +00:00
Ray Speth
5534c15bc5 [Examples] Use IdealGasConstPressureReactor in sensitivity example 2015-02-28 00:24:25 +00:00
Ray Speth
ff3a1cc385 [Cython/Reactor] Fix setting reactor name through the constructor
This parameter wasn't being passed from Reactor to ReactorBase
2015-02-28 00:24:22 +00:00
Ray Speth
72e0d650b4 [ck2cti] Automatically add the 'negative_A' flag where necessary 2015-02-26 00:13:39 +00:00
Ray Speth
74f1cf05b1 [ck2cti] Narrow implicit end-of-section test
Assume that the new section label must be the first word on a line
2015-02-26 00:13:34 +00:00
Ray Speth
afb5b13eb4 [Python/Reactor] Use constant pressure reactor instead of adding Wall
This shows the preferred method for simulating a constant pressure reactor,
rather than using a Wall with a high expansion rate coefficient which introduces
unnecessary stiffness to the problem.
2015-02-20 23:43:38 +00:00
Ray Speth
10b73473f9 [Test] Add tests for elemental mass/mole fraction and mixture fraction 2015-02-17 23:24:00 +00:00
Thomas Fiala
faf222ca57 [1D/Python] Add method for calculating mixture fraction in diffusion flames 2015-02-17 23:23:57 +00:00
Thomas Fiala
4bc4fda90c Add C++ and Cython support for computing elemental mass/mole fractions 2015-02-17 23:23:51 +00:00
Thomas Fiala
6b5b8e7735 [1D] Add convenience functions for heat release rate 2015-02-16 17:24:34 +00:00
Ray Speth
170d50676a [Doc] Document definition of the sensitivity coefficient 2015-02-12 04:04:55 +00:00
Ray Speth
86393cda42 [ck2cti] Allow conversion of standalone species thermo databases
This is useful when the species definitions are going to be used to define
phases in other input files.
2015-01-22 00:04:28 +00:00
Ray Speth
bade514587 [1D] Fix up getters/setters/default values for radiation values 2015-01-15 21:15:18 +00:00
Andreas Rücker
49c963143e [1D] Add simple radiation model for flames
Implements the radiation model of Liu & Rogg (1991). Optically thin limit,
gray-gas approximation using Planck mean absorption coefficients. Considers
emissions from CO2 and H2O, with the temperature-dependent absorption
coefficients calculated using polynomial fits to results from RADCAL
(Grosshandler, 1993).
2015-01-15 21:15:15 +00:00
Ray Speth
9f6c9e3a46 [ck2cti] Fix reading some input files containing non-unicode characters
In Python 3, attempting to convert some mechanisms would give errors like the
following:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 348:
invalid start byte
2015-01-12 19:55:37 +00:00
Ray Speth
e94ec95988 [Python] Specify python executable to be used in shebang line for scripts
This fixes a bug in the Windows installer where the path to python.exe on the
machine where the installer is built is used, and also allows us generate
different shebang lines for the Python 2 and Python 3 modules.

Fixes Issue 247.
2015-01-06 23:37:30 +00:00
Ray Speth
ac6f7fefdf [Python] Clarify properties of class Mixture which can be set 2014-12-12 01:37:00 +00:00
Ray Speth
0e51465722 [Doc] Describe specification of reaction orders in CTI files 2014-12-05 23:33:42 +00:00
Ray Speth
3812215ce2 [Doc/Python] Add docstrings for some 1D methods and properties 2014-12-05 23:33:22 +00:00
Ray Speth
d76b67f5fb [ck2cti] Check for formatting errors in elemental composition
Formatting errors (e.g. values in incorrect columns) result in an empty
elemental composition. Raise an exception if this occurs.
2014-12-05 23:33:20 +00:00
Ray Speth
5958578c40 [Kinetics] Check for negative and non-reactant reaction orders
Allow non-reactant orders for electrochemical reactions

Allow negative orders specifically requested, e.g. by setting the
'negative_orders' option in the CTI definition of the reaction.
2014-11-15 00:47:25 +00:00
Ray Speth
c8ecedb140 [Test] Make reaction equation test independent of species ordering 2014-11-11 00:12:21 +00:00
Ray Speth
53fb3bd341 [Test] Prevent infinite loop in TestSofcKinetics
If an infinite loop occurs in the Newton solver, it indicates a problem, but
this way the test will finish (and fail).
2014-11-11 00:12:19 +00:00
Ray Speth
8c934ab678 [Equil] Implement equilibrate as a method of MultiPhase
This differs from the current equilibrate method in that it can use either of
the multiphase equilibrium solvers.
2014-11-08 00:53:42 +00:00
Ray Speth
e16e998dd7 [Equil] Implement equilibrate as a method of ThermoPhase
The Cython interface now calls this equilibrate function.

Unlike the free function 'equilibrate', this new equilibrate method actually
does what the documentation describes regarding the 'solver' argument. This
means that there are cases where failures of the MultiphaseEquil solver were
previously being hidden by a subsequent successful solution using the ChemEquil
solver. These tests have been marked as known failures.
2014-11-08 00:53:39 +00:00
Ray Speth
24c509f539 [Kinetics] Fix some cases where duplicate reactions were not detected
Also add several tests which check that the various kinds of duplicate
reactions are being identified as errors or allowed as intended.
2014-11-07 02:15:03 +00:00
Ray Speth
5ca49efff1 [ck2cti] Adjust number of species per line dynamically 2014-10-29 23:32:04 +00:00
Ray Speth
7c6ef9d3c4 [ck2cti] Eliminate trailing whitespace in species list 2014-10-29 23:32:01 +00:00
Ray Speth
2e23362206 [ck2cti] Remove 'reaction' section label when there are no reactions 2014-10-29 23:31:58 +00:00
Ray Speth
c1b64968a6 [ck2cti] Keep full precision of NASA 9-coefficient thermo data
The 9-coefficient format keeps 10 digits for each coefficient, compared to 9 for
the 7-coefficient format.
2014-10-29 15:36:31 +00:00
Ray Speth
da35e24151 [SCons] Re-cythonize after changes to header files 2014-10-29 15:36:28 +00:00
Ray Speth
424a04bffc [Test] Limit number of lines printed after failed test comparison 2014-10-17 23:44:59 +00:00
Ray Speth
4457b4297c [Doc] Describe syntax for specifying coverage dependencies 2014-10-08 16:54:21 +00:00
Bryan W. Weber
9ed87e857c [Cython] Allow None when setting the quality of a PureFluid
Allow None as an option for the quality as well as the
temperature and pressure when setting the state of a PureFluid.
Completes r3213.
2014-10-08 12:42:15 +00:00
Bryan W. Weber
7c60182142 Allow None when setting the state of a PureFluid
Allow None as an option when setting the temperature and quality or
pressure and quality of a PureFluid. This mimics similar functionality
for Solutions.
2014-10-08 12:37:41 +00:00
Ray Speth
b0085eb58e [CTI] Check for correct number of coverage parameters
This detects errors such as providing two sets of coverage parameters as a
single list, rather than as a list with separate entries for each set of
coverage parameters.
2014-09-29 19:13:21 +00:00
Ray Speth
de9928977c [ck2cti] Preserve mechanism header comment block 2014-09-24 23:17:47 +00:00
Ray Speth
a3bba51f06 [ck2cti] Preserve comments in the REACTIONS section 2014-09-24 23:17:44 +00:00
Ray Speth
21e9892909 [Transport] Fix handling of default value for acentric_factor
If acentric_factor isn't specified in the CTI, don't include it when generating
the XML.
2014-09-23 02:20:57 +00:00
Ray Speth
8b4c5336ba [Cython/Reactor] Add Reactor keyword argument 'volume' 2014-09-23 02:20:55 +00:00
Ray Speth
f14cd6d471 [Cython/Reactor] Raise exception for unrecognized keyword arguments 2014-09-23 02:20:53 +00:00