Commit graph

340 commits

Author SHA1 Message Date
Ingmar Schoegl
f67d9113db [Kinetics] issue warning for zero T2 Troe coefficient 2019-11-10 22:56:20 -05:00
Ingmar Schoegl
e2bfba328c [Kinetics] deprecate magic numbers for falloff reactions 2019-11-08 15:18:26 -05:00
Ingmar Schoegl
7c08e17f08 [Thermo] deprecate Phase::id and Phase::setID
* Merge usage of 'id' and 'name' in the context of Phase objects
* Raise deprecation warnings for Phase::id and Phase::setID
2019-10-23 13:45:29 -04:00
Ray Speth
69f33a8631 [Input] Check that Chebyshev coefficient matrix is rectangular 2019-09-27 17:11:18 -04:00
Paul
c4aff04418 Updated URL in references to Cantera's license. 2019-09-23 22:02:33 -04:00
band-a-prend
1606ce1565 Remove m_iter variable and deprecate setIterator function
Remove m_iter variable and deprecate setIterator function
because only Newton (CV_NEWTON) iteration method is used.
2019-08-09 18:08:47 -04:00
band-a-prend
6a8d7f7de3 Fix building Cantera against Sundials 4.x library
The changelog of Sundials 4.0.0 states:

"With the introduction of SUNNonlinSol modules, the input parameter iter
to CVodeCreate has been removed along with the function CVodeSetIterType
and the constants CV_NEWTON and CV_FUNCTIONAL.
Similarly, the ITMETH parameter has been removed from the Fortran interface
function FCVMALLOC. Instead of specifying the nonlinear iteration type
when creating the CVODE(S) memory structure, CVODE(S) uses
the SUNNONLINSOL_NEWTON module implementation of a Newton iteration by default."

so the appropreate conditional changes are added to control
the code execution via CT_SUNDIALS_VERSION preprocessor variable
to omit the parameters of Sundials solver that are no longer required.
2019-08-09 18:08:47 -04:00
Ray Speth
44c5094bb2 [Input] Implement 'skip-undeclared-third-bodies' option in YAML format 2019-06-25 22:30:59 -04:00
Ray Speth
53faf54ceb [Thermo] Add ThermoPhase.standardConcentrationUnits method
This method returns the units of the concentration-like terms appearing
in rate expressions, and are needed in order to convert rate constants
from user-specified input units to Cantera's MKS+kmol system.
2019-06-25 22:30:59 -04:00
Ray Speth
0b04881b8d [Input] Handle "declared-species" option for adding reactions from YAML 2019-06-25 22:30:59 -04:00
Ray Speth
69371e5751 [Python] Implement Reaction constructors from YAML files/strings 2019-06-25 22:30:59 -04:00
Ray Speth
8eb52a7afb [Input] Create ElectrochemicalReaction objects from YAML definitions 2019-06-25 22:30:59 -04:00
Ray Speth
672b55a72f Add AnyValue::getMapWhere function 2019-06-25 22:30:59 -04:00
Ray Speth
d77a5979a8 [Input] Provide context for more errors in YAML processing 2019-06-25 22:30:59 -04:00
Ray Speth
0d1196bd46 [Input] Create InterfaceKinetics and InterfaceReaction objects from YAML 2019-06-25 22:30:59 -04:00
Ray Speth
b0209bdf37 [Input] Store additional reaction data in 'input' map 2019-06-25 22:30:59 -04:00
Ray Speth
6a8c378846 [clib] Add functions for creating objects directly from input files
These methods work with YAML, CTI, and XML input files.
2019-06-25 22:30:59 -04:00
Ray Speth
3028c14a10 Improve setting of default energy and pressure units
Only treat activation energies as a special case, rather than all molar
energies. Units of activation energy can be set either explicitly or by setting
units for energy and quantity. Only the case where activation energies are given
as temperatures needs to be specified explicitly.

Allow setting of default energy units, which allows calories to be used.

Also add dyn/cm^2 as an option for pressure units.
2019-06-25 22:30:59 -04:00
Ray Speth
6dac1b0409 [Input] Allow mapping for Arrhenius parameters, and use this as the default
Pressure-dependent Arrhenius reactions now use a list of mappings instead
of a more complicated nested list structure.
2019-06-25 22:30:59 -04:00
Ray Speth
fdfbc58a1e [Input] Search current directory for referenced YAML input files 2019-06-25 22:30:59 -04:00
Ray Speth
d7734e3f19 [Input] Allow "=" as a delimiter for reversible reactions in YAML 2019-06-25 22:30:59 -04:00
Ray Speth
f0dc990764 Create a complete Kinetics object from a YAML input file 2019-06-25 22:30:59 -04:00
Ray Speth
0264c66f79 Add const version of AnyMap operator[]
Reduces the need to use the at() function
2019-06-25 22:30:59 -04:00
Ray Speth
84fa231ea2 [Input] Read local 'units' definitions in reaction and thermo entries
Move 'convert' functions that work with missing keys to AnyMap class.
2019-06-25 22:30:59 -04:00
Ray Speth
aef101fee7 [Input] Parse YAML entries for Chebyshev reactions 2019-06-25 22:30:59 -04:00
Ray Speth
7a97ff9917 Add optional length check when converting AnyValue to vector 2019-06-25 22:30:59 -04:00
Ray Speth
b54ea8bd82 [Input] Parse YAML entries for Plog reactions 2019-06-25 22:30:59 -04:00
Ray Speth
cb31c297cf [Input] Parse YAML entries for falloff and chemically activated reactions 2019-06-25 22:30:59 -04:00
Ray Speth
8b502d4065 [Input] Parse YAML entries for three body reactions 2019-06-25 22:30:59 -04:00
Ray Speth
de80f06887 [Input] Parse YAML entries for elementary reactions 2019-06-25 22:30:59 -04:00
Ray Speth
ed24198e63 Add option to compile yaml-cpp or use system library 2019-06-25 22:30:59 -04:00
Nick
848a3bf0e3 Add InterfaceKinetics.advance_coverages integrator options to the cython interface, and test 2019-04-10 22:14:27 -04:00
Nick
d2cb02f254 add integrator parameters to the InterfaceKinetics::advanceCoverages & ImplicitSurfChem constructor to allow users to modfiy 2019-04-10 22:14:27 -04:00
g3bk47
471041a27a Additional check for Troe coefficients being zero
This will prevent floating point exceptions (sometimes enabled by third-party
codes) in case c[1] or c[2] are zero but will not change the current behaviour
if c[1] and c[2] are not zero.
2019-03-18 14:39:50 -04:00
Ray Speth
6c82b61c3d [Kinetics] Always use temperature of "reacting" phase
This is always the lowest-dimensional phase, e.g. surface or edge for
heterogeneous systems.
2019-03-05 15:03:48 -05:00
Ray Speth
19577abfbe Deprecate rarely-used vector functions 2018-12-14 11:27:24 -05:00
Ray Speth
6f45b241b5 Remove code deprecated in Cantera 2.4 2018-12-14 11:27:24 -05:00
Ray Speth
9aa507a098 [Kinetics] Make some member functions const 2018-12-02 23:54:04 -05:00
Ray Speth
e4362d37e7 [Kinetics] Check for non-existent species in reaction orders
When the nonreactant_orders option was enabled, specifying reactant orders for
species which were not present in the phase previously resulted in out-of-bounds
memory access.
2018-08-28 16:40:43 -04:00
Ray Speth
6d22be2a6b Mark unused/untested classes as deprecated
Deprecated thermo classes: Adsorbate, MetalSHEelectrons, MineralEQ3,
MolarityIonicVPSSTP, PhaseCombo_Interaction

Deprecated kinetics classes: AqueousKinetics

Deprecated transport classes: LTPSpecies, LiquidTranInteraction,
LiquidTransport, LiquidTransportData, LiquidTransportParams, SimpleTransport,
SolidTransport, SolidTransportData, Tortuosity

See #267
2018-02-15 23:50:11 -05:00
Evan McCorkle
713b9cc23c Wrapped common uses of boost string algorithms.
- Limits propagation of boost header and namespace.
2017-10-25 09:30:22 -04:00
Ray Speth
1b97c49d8d [Thermo] Make species size local to SurfPhase 2017-10-05 22:58:19 -04:00
Ray Speth
4c489c175d [Kinetics] Fix duplicate reaction check to handle unchanged species 2017-08-02 16:46:24 -04:00
Ray Speth
513b43200c [Kinetics] Fix indexing error in Kinetics::checkDuplicates 2017-08-02 16:46:24 -04:00
Tilman Bremer
b41038f84b stylevalue 'setlinewidth' is deprecated, replaced it together with the whole style argument by 'penwidth' 2017-07-11 18:59:03 -04:00
Steven DeCaluwe
04be9888ed Update importKinetics to identify unspecified electrochemical reactions
Add test coverage for beta default value for electrochem reactions
2017-07-06 18:14:09 -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
5a0fb579a8 [Kinetics] Prevent double counting in reaction path diagrams
This fixes the double counting that occurs in reactions like:

    H + HO2 => 2 OH

Fixes #377
2017-02-12 22:32:39 -05:00
Ray Speth
3093e6e6d4 [Kinetics] Restore old handling of repeated species in path diagrams
Fixes an error introduced in 37f71bd9 which caused these reactions to be
ignored. However, flux calculations for reactions such as H + HO2 -> 2 OH are
still incorrect.
2017-02-12 22:32:39 -05:00
Ray Speth
0d982c8f58 Fix use of 'scale' and 'OneWayFlow' options in ReactionPathDiagram
Fixes #378
2017-02-12 22:32:39 -05:00