Commit graph

807 commits

Author SHA1 Message Date
Bryan W. Weber
4829310f11 Add messages to the assertion statements in thermo.pyx
Fixes #335
2016-11-27 23:28:21 -05:00
Ray Speth
aa4d07f543 [Thermo] Allow discontinuous thermo warnings to be suppressed
Resolves #354
2016-11-26 00:57:23 -05:00
Ray Speth
8e6d53d18b Enable parsing of composition strings when species names contain colons 2016-11-25 18:19:38 -05:00
Ray Speth
1db103cd87 Fix Phase.species_index when species name contains a colon 2016-11-25 18:19:38 -05:00
Ray Speth
3300611379 Allow colons in species names in CTI phase definitions 2016-11-25 18:19:38 -05:00
Bryan W. Weber
05ad05c904 [ck2cti/Test] Add tests for explicit reverse reaction equal to zero 2016-11-25 18:18:38 -05:00
Bryan W. Weber
a9814a1216 [ck2cti] Don't include reactions with explicit reverse rate equal to zero 2016-11-25 18:18:38 -05:00
Bryan W. Weber
6b32c73eee [ck2cti] Use logging.error when a thermo entry can't be read.
This matches the use when a reaction line can't be read.
2016-11-25 18:18:38 -05:00
Bryan W. Weber
ce90a798c5 [ck2cti] Raise ValueError in compatible_quantities instead of Exception 2016-11-25 18:18:38 -05:00
Bryan W. Weber
990f995796 [ck2cti] Minor spacing updates to improve legibility 2016-11-25 18:18:38 -05:00
Bryan W. Weber
bed546ad92 [ck2cti] Remove unused isnumberlike function 2016-11-25 18:18:38 -05:00
Bryan W. Weber
e250d23435 [ck2cti] remove duplicate sys import 2016-11-25 18:18:38 -05:00
Ray Speth
6dc92b618f [Doc] Eliminate some Doxygen and Sphinx warnings 2016-11-14 17:43:45 -05:00
Ray Speth
170f1d0fad [1D/Python] Avoid unnecessary solve if first attempt succeeded 2016-11-12 16:15:38 -05:00
Ray Speth
4753ae4a86 [1D/Python] Add adjoint laminar flame speed sensitivity calculation
This is approximately an order of magnitude faster than the 'forward' method for
calculating these sensitivities. It also eliminates the need to adjust the
solver tolerances.
2016-11-12 14:48:01 -05:00
Ray Speth
ca8b101acc [1D] Add general support for calculating adjoint sensitivities 2016-11-12 14:48:01 -05:00
Ray Speth
2d623e893e [Python] Fix documentation for Sim1D.set_steady_callback 2016-11-11 23:06:35 -05:00
Ray Speth
5641fa83e9 [clib/Matlab] Add function for getting Cantera version 2016-11-11 23:06:35 -05:00
Ray Speth
828fba5611 [CTI] Improve error messages associated with problematic reactions 2016-11-11 23:06:35 -05:00
Bryan W. Weber
4fb0d52d4b [Test] Remove printed output from tests 2016-11-11 17:40:46 -05:00
Bryan W. Weber
06a739d26e [Test/1D] Add tests for max_grid_points 2016-11-11 17:40:46 -05:00
Bryan W. Weber
3fd46f7a1f [Cython/1D] Modify the auto solver so the minimal code is in the try block.
This ensures we only catch an error from a single solve call so it is handled properly.
2016-11-11 17:40:46 -05:00
Bryan W. Weber
c91bdee2e2 [Cython/1D] Raise an error if the auto solver exceeds the max number of grid points 2016-11-11 17:40:46 -05:00
Bryan W. Weber
a82dd5a483 [Cython/1D] Add Cython interface for getting/setting max_grid_points 2016-11-11 17:40:46 -05:00
Bryan W. Weber
4e1c45c2aa [Test] Fix typo in test_multiComponent 2016-11-10 15:16:10 -05:00
Bryan W. Weber
e235f69543 [Cython/Test] Make python tests portable 2016-11-10 15:16:10 -05:00
Bryan W. Weber
fc9270786f [Cython/Test] Add working directory attributes to CanteraTest class 2016-11-10 15:16:10 -05:00
Bryan W. Weber
ea4b3502c3 [Cython/Test] Install extra data files from main data directory 2016-11-10 15:16:10 -05:00
Bryan W. Weber
1cdc6b6d7e Add C-Lib and Matlab interface to getDataDirectories 2016-10-31 17:14:26 -04:00
Bryan W. Weber
d1c2ec48e7 Add function to get the data directories Cantera searches 2016-10-31 17:14:26 -04:00
Ray Speth
52727a9550 [1D] Eliminate unnecessary state variables from Inlet1D
We do not need to solve the trivial equations 'T = Tin' and 'mdot = mdot_in'.
2016-10-30 21:35:20 -04:00
Ray Speth
95764fdf6e [Reactor] Add tests for reactors using pure fluid phases 2016-10-23 17:17:28 -04:00
Ray Speth
3f3b96587b [Thermo] Fix finite-difference properties in two-phase region
These properties are actually infinite in the two-phase region, but attempting
to compute them by finite difference would incorrectly give a finite result, so
they need to be treated as a special case.
2016-10-21 13:28:51 -04:00
Ray Speth
a92245f683 [Thermo] Fix calculation of derivative properties of pure fluids
Calculating specific heat capacities (cp or cv) for states near the saturation
curve would give incorrect results if the finite difference method used points
within the saturation region. To avoid this, we now check the points used for
computing the properties and use values outside the saturation region to compute
the derivatives.

Fixes #273
2016-10-21 13:28:51 -04:00
Ray Speth
b1a1ce6e23 [Thermo] Fix pure fluid thermal expansion coefficient calculation 2016-10-19 19:51:31 -04:00
Ray Speth
5b1a4a60bb [Thermo] Fix silent failures in HP/UV/SV/SP convergence
In cases where the specified state was non-physical (i.e. corresponded to a
negative temperature), the iteration would exit when the temperature reached a
small enough value. Computing the error in temperature relative to the current
temperature avoids this problem.

Fixes #264
2016-10-19 10:58:22 -04:00
Ray Speth
89d0c5601f [Python] Add CanteraError class for execptions
Anything that raises a CanteraError in C++ will now raise CanteraError in
Python, instead of the more generic RuntimeError.

This change increases the required Cython version to 0.23 or newer.
2016-10-18 22:58:14 -04:00
Ray Speth
c16c15367f [Matlab] Fix ThermoPhase 'clear' method
This function was actually being directed into 'thermoget' and calling the
'newFromXML' method (on a non-existent XML tree) instead of calling the 'del'
method.
2016-10-18 11:21:42 -04:00
Ray Speth
994d7e9a53 [Doc] Adjust example docstrings to get better automatic summaries 2016-10-14 17:06:45 -04:00
Ray Speth
f17750e483 Make species names case-preserving instead of case-sensitive
This improves interoperability when working with mechanisms which use differing
conventions for naming species using uppercase or lowercase.
2016-10-13 18:40:03 -04:00
Ray Speth
5d7c8f393b [CTML] Remove unnecessary 'global' declarations 2016-10-13 18:40:03 -04:00
Ray Speth
ae6e7fdff7 Add license/copyright info to files that were missing it 2016-10-10 22:48:23 -04:00
Ray Speth
ecbfecd7fd Replace existing copyright notices with uniform copyright/license info 2016-10-10 22:19:01 -04:00
Bryan W. Weber
9bba45b01e Fix minor docs typo in Matlab enthalpy_mole 2016-10-04 11:34:04 -04:00
Ray Speth
8a86fed0ca [Python] Move composite classes out of Cython
This makes it easier to add more features to these composite classes without
increasing the size of the compiled Cython extension.
2016-09-19 18:57:19 -04:00
Ray Speth
11f6c2f993 Consolidate duplicate species checks in Phase::addSpecies 2016-09-10 21:45:24 -04:00
Ray Speth
e49f843797 [Python] Prevent adding species to in-use Thermo objects 2016-09-09 22:50:17 -04:00
Ray Speth
178b452a49 [Transport] Automatically reinitialize after change in number of species
This makes it possible for GasTransport objects to work reasonably well with
ThermoPhase objects that have had species added to them. The main changes
required are to make the initialization functions idempotent.
2016-09-09 22:50:17 -04:00
Ray Speth
1660167bd7 Allow adding species / reactions from Python
This enables the base functionality, but does not protect against any erroneous
usage.
2016-09-09 22:50:17 -04:00
Ray Speth
fe747f34c0 [ck2cti] Provide better error message for reactions with missing data
For falloff / chemically activated reactions (with "(+M)" appearing in the
reaction equation), check that the alternate rate expression has been
provided. Previously, this would only generate an inscrutable error when
importing the XML file.
2016-08-29 23:34:04 -04:00