Commit graph

835 commits

Author SHA1 Message Date
bangshiuh
1057d20731 [1D] Fix IonFlow docstrings and simplify testIonFlame 2017-05-16 13:55:40 -04:00
bangshiuh
e2f718c65b [1D/Python] Add IonFlow to Python interface, with example and test 2017-05-16 13:55:40 -04:00
Jeff Santner
2a38b0a765 Allow user to set flame location
A very small change that allows the user to set the initial location of the flame. The original hard-coded values for "locs" are retained as the default, but the user can now modify locs.
2017-05-12 22:57:29 -04:00
Ray Speth
52dbe8c007 [1D] Correct handling of boundary conditions when energy equation is disabled 2017-03-29 18:46:30 -04:00
Steven DeCaluwe
51f419fbad Enabling charge-transfer/electrochemical surface reactions
The previous formulation will only consider a rection as electrochemical
if a beta value is supplied for that reaction *and* the reaction is an
'edge_reaction.'  This is problematic for two reasons: (1) many/most
charge-transfer reactions of interest occur at two-phase boundaries (see,
for example, Li-ion batteries and PEM fuel cells), not the three-phase-
boundary-like edges (which are most relevant for SOFCs).  (2) determining
whether a reaction is electrochemical or not should not rely at all upon
user input - the program itself should check to see whether charge is
transferred between phases, and the appropriate steps should be taken
during rate-of-progress calcuations.

This commit addresses the former issue.  Currently, if a charge-transfer
reaction is written as a surface_reaction, the code does not apply the
voltage correction to the forward rate.  By default, then, the entire
voltage correction is applied to the reverse reaction, which is the same
as setting beta = 0; not a good 'default' behavior (beta = 0.5 is a more
appropriate default).  With this change, surface reactions can now be
supplied with a beta value in cti or xml formats, and will be recognized
as a charge transfer reaction.

Longer term, it would be better to change the constructor routines such
that charge transfer is automatically detected and handled, rather than
relying upon user-specified flags.
2017-02-25 19:13:38 -05:00
Ray Speth
a02753ae79 [Test/ck2cti] Test pdep reactions with custom units 2017-02-20 19:14:12 -05:00
Richard West
7b7aea2038 Preserve units in PLOG entries in ck2cti
When converting chemkin into cti using ck2cti, the units were not preserved
in PLOG (pdep_arrhenius) reactions. Now they are.
2017-02-20 19:02:36 -05:00
Ray Speth
70e10632d4 [SCons] Fix implicit dependencies on 'build' step
The 'install' and 'test' targets had some undeclared dependencies on the 'build'
target, such that running 'scons install' or 'scons test' without having first
run 'scons build' would result in incomplete installation or test failures,
respectively.

Fixes #432.
2017-02-17 11:51:12 -05:00
Ray Speth
0249ce89b8 [Test] Add tests for 'OneWayFlow' and 'scale' reaction path options 2017-02-12 22:32:39 -05:00
Ray Speth
092e00744b [Kinetics] Add test that reaction path fluxes are correct 2017-02-12 22:32:39 -05:00
Ray Speth
7673f7cb52 Remove code deprecated in Cantera 2.3.0 2017-02-12 19:22:33 -05:00
Ray Speth
ed8de04e5b [Python] Fix setting mass/mole fractions for single-species phases 2017-01-31 17:41:50 -05:00
Ray Speth
6a52908d85 [Python/1D] Make current solution residuals accessible 2017-01-31 16:58:24 -05:00
Bryan W. Weber
c982f50421
[Matlab/Doc] Fix docs for enthalpies_RT function 2017-01-25 07:41:43 -05:00
Ray Speth
0fd2f7c4d0 [Kinetics] Check for unmatched duplicate reactions
Reactions which are marked as duplicates but have no matching reactions are
considered errors.

Fixes #389
2017-01-23 14:34:18 -05:00
Ray Speth
7979a2b52a Add Matlab function for checking git commit 2017-01-23 14:33:31 -05:00
Ray Speth
8e89bbb8d2 Add methods for accessing the git commit used when compiling 2017-01-20 22:43:56 -05:00
Ray Speth
886d7b7cdc Move MixMaster into a separate Python module and Git repository
MixMaster has been moved to https://github.com/Cantera/mixmaster
2017-01-20 16:16:32 -05:00
Ray Speth
4b974219b5 [SCons] Fix installation location for Debian Python packages 2017-01-12 20:23:58 -05:00
Bryan W. Weber
983b2cc015 [Matlab/Doc] Fix typos in docs for some ThermoPhase getters
These actually return scalars, although the docstrings
said they returned vectors
2017-01-03 21:57:06 -05:00
Santosh Shanbhogue
3593fad14a Fix ct2ctml when string passed as 'source' argument
Make ct2ctml create a temp cti file for a large source argument

Fixes #416
2016-12-29 22:06:27 -05:00
EmilAtz
1e08d7499c Deprecation of MatLab importPhase function
Addition of comments in importPhase to warn for function deprecation.
2016-12-21 15:39:54 -05:00
Ray Speth
2284bc9186 [Transport] Fix transport geometry flag check for charged species
Electrons should not be counted when determining the number of atoms in a
molecule and the corresponding allowable molecular geometries.
2016-12-17 19:09:37 -05:00
Bryan W. Weber
2024d0f08a [SCons] Fix calling 3to2 on Windows with conda 3to2 package
Fixes #408
2016-12-09 20:13:22 -05:00
Santosh Shanbhogue
d1df40af87 Separate transport data from comments in parseTransportData 2016-12-09 19:59:52 -05:00
Santosh Shanbhogue
3f382e2590 Add test to catch superflous entries in a tranport file 2016-12-09 19:59:52 -05:00
Santosh Shanbhogue
06578612eb Identify species with bad transport entries 2016-12-09 19:59:52 -05:00
Bryan W. Weber
c7db81f33c [Doc] Document the ReactorSurface class in Python
Fixes #407
2016-12-09 19:51:46 -05:00
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