Commit graph

6932 commits

Author SHA1 Message Date
Steven DeCaluwe
8169c26271 Updates to ctml_writer.py associated with BinarySolutionTabulatedThermo class.
-Removes option to read tabulated thermo from an external csv file (this is now
handled from within cti or xml).
-Renames `rateCoeff` keyword to the more appropriate `rate_coeff_type`, and fixing
keyword order so that this new keyword is listed last.
-Removes `else` statement from `if isinstance(self._standardState, standardState)
-Removes unused `_pure` attribute from `IdealSolidSolution` and
`BinarySolutionTabulatedThermo`
-Changes default on `tabulated_species` keyword to `None`.
-Removing superfluous `standardState:_build` from ctml_writer.py
- Removes unnecessary conc_dim() definition in `table` class.
- Removes unnecessary units defintion for mole fractions in `table` class.
- Improves grammar in error message for case when thermo table is
not provided for `tabulated_species`.
2019-02-20 21:39:22 -05:00
Steven DeCaluwe
11271d90b2 Fixing unit conversion of tabulated data in BinarySolutionTabulatedThermo
Previously the model imported the tabulated data assuming it was given
in J, mol, K units, and ignoring any user input in the cti file, w/r/t
units.  This fixes that, by amending the `getFloatArray` calls in
thermo/BinarySolutionTabulatedThermo.cpp
2019-02-20 21:39:22 -05:00
Steven DeCaluwe
366d1942ef Updating keyword order in ctml_writer.py species::__init__
The keyword `standardState` was added to species::__init__ in
ctml_writer.py.  This moves this keyword entry to the end of the
list of keywords, so that species instances of the class do not
need to reorder their keyword order.
2019-02-20 21:39:22 -05:00
Steven DeCaluwe
05fdd356f2 Updates to BinarySolutionTabulatedThermo and test file.
-Fixes small typo id incclude/cantera/base/utilities.h docstring
-Removes `m_formGC` from BinarySolutionTabulatedThermo class, and
instead utilizes version and functionality inherited from parent
class `IdealSolidSolnPhase`.
-Moves samples/matlab/lithium_ion_battery/lithium_ion_battery.cti
to data/inputs/lithium_ion_battery.cti
-Fixes typo in test/data/BinarySolutionTabulatedThermo.cti
-Updates expected_result values in several test cases in
test/thermo/BinarySolutionTabulatedThermo_Test.cpp
2019-02-20 21:39:22 -05:00
Steven DeCaluwe
ae555fb063 Add description for BinarySolidSolutionTabulatedThermo class 2019-02-20 21:39:22 -05:00
Steven DeCaluwe
3c9bbc4ec9 Fix IdealMolalSolution::standardConcentration
Standard concentrations in the IdealMolalSolution phase depend on
a user-specified m_formGC parameter, where m_formGC=0 results in a
standard concentration of 1.0, m_formGC = 1 is supposed to result in
a standard concentration for species k  equal to 1 divided by the
molar volume of species k, and m_formGC = 2 is supposed to result in
a standard concentration equal to 1 divided by the molar volume of the
solvent species (which is species 0).

Current behavior is that m_formGC = 1 and m_formGC = 2 *both* result
in a standard concentration of 1 divided by molar vlume of the solvent.

This commit fixes how this is handled, cleans up the switch statement
(the three cases were written somewhat inconsistently), and throws
an error if m_formGC is set < 0 or > 2.
2019-02-20 21:39:22 -05:00
Manik Mayur
b8d5eb405a Add MATLAB example files for BinarySolutionTabulatedThermo class 2019-02-20 21:39:22 -05:00
Jamie
a7449c6cc8 Add tests for BinarySolutionTabulatedThermo class 2019-02-20 21:39:22 -05:00
Manik Mayur
224ef720e6 Add BinarySolutionTabulatedThermo class 2019-02-20 21:39:22 -05:00
Ray Speth
d04fd8cc39 [ck2cti] Show name of species with undefined elements in error message 2019-02-18 18:39:15 -05:00
CyberDrudge
aa9721dbe9
Use Cantera Error in leftover examples
Update diffusion_flame_batch.py and diffusion_flame_extinction.py
to use CanteraError where appropriate. Define a new
FlameExtinguished exception to distinguish between extinction and
other failures. This allows things like OSErrors to still be
raised to the user while dealing with exceptions we can handle.
Closes #569.
2019-02-18 13:38:50 -05:00
CyberDrudge
9d4c0eda03
Fix typo in Matlab documentation for cp_mass
Fixes #590
2019-02-17 08:12:53 -05:00
lavdwall
cb5620996c Add solvePseudoSteadyStateProblem() in cython interface 2019-02-11 13:46:48 -05:00
Ray Speth
e3424d8ed4 [ck2cti] Fix over-zealous detection of section 'end' labels 2019-02-04 18:49:45 -05:00
Ray Speth
33e198f7e5 [Thermo] Generalize check for missing Redlich-Kwong coefficients
A check in the "updateAB" function will be executed regardless of how the phase
is instantiated.
2019-02-04 18:49:45 -05:00
Ray Speth
f385f48190 [CI] Change Codecov to use Linux build instead of macOS
Something changed such that the macOS Travis builds are no long able to upload
coverage data to Codecov. However, uploading from the Linux builds instead seems
to work fine.
2019-02-04 18:49:45 -05:00
Ray Speth
ebb93cb5a2 [Thermo] Fix setting of temperature-dependent Redlich-Kwong parameters
Using negative values to indicate unspecified parameters doesn't work, since
either constant in "a = a0 + a1*T" can be negative and still produce a positive
value for "a". Instead, NaN can be used for this purpose.
2019-02-04 18:49:34 -05:00
Ray Speth
3ff5d87b81 [Doc] Fix descriptions and units of coverage dependency parameters 2019-02-04 16:38:40 -05:00
Ray Speth
46b7cf180a [SCons] Make dependency on copying Eigen headers explicit
SCons seems to miss this dependency sometimes, resulting in confusing failures
while trying to compile DenseMatrix.cpp.
2019-02-04 16:38:40 -05:00
Ray Speth
dc09040274 [Samples] Fix compilation of Blasius BVP sample with 'scons samples' 2019-02-04 16:38:40 -05:00
Ray Speth
1ec9ce2c01 [1D/samples] Fix C++ flame speed example
Fixes a regression introduced in 6f45b241.
2019-02-04 16:38:40 -05:00
Ray Speth
35be561d99 [Matlab] Eliminate unnecessary copy-constructor-like option 2019-02-04 16:38:40 -05:00
Ray Speth
9f5dfbdb12 Document units of Margules interaction parameters 2019-02-04 16:38:40 -05:00
CyberDrudge
d9b95b2efb
[Examples] Fix refinement check in ic_engine.py
The previous refinement check didn't work because the loop never
reached n2 == 4. Replace is checks with == checks.
2019-02-01 17:03:31 -05:00
CyberDrudge
05eaa0a5e4
[Examples] Use CanteraError in ic_engine.py
Related to #569, swap catching bare Exception for the
more specific CanteraError
2019-02-01 17:03:21 -05:00
Ray Speth
4b3bb8f8fc [Thermo] Fix incorrect documentation in the PDSS class
PDSS objects do not interact with the MultiSpeciesThermo object for a phase,
but at most a single SpeciesThermoInterpType object.
2019-01-23 16:43:44 -05:00
Ray Speth
27c64b76f8 [Thermo] VPStandardStateTP does not use reference thermo objects
Since VPStandardStateTP and derived classes do not use the reference state
thermodynamic properties in the m_spthermo object, we can just install
placeholder objects there, and eliminate the wrapper clas STITbyPDSS.
2019-01-23 16:43:44 -05:00
Ray Speth
311ae76510 [Thermo] Allow species without thermo data
In some models, SpeciesThermoInterpType objects on individual species are not
used. Instead of requiring the specification of placeholder thermo data, this
allows the base SpeciesThermoInterpType class to be used, which will throw an
exception if it is inadvertently used.
2019-01-23 16:43:44 -05:00
Ray Speth
af56138e14 [Thermo] Clean up implementation of MaskellSolidSolnPhase
Eliminate several member variables which shadow variables of the
VPStandardState class, and actually contained the same information
calculated a different way.
2019-01-23 16:43:44 -05:00
Ray Speth
4d5cd502a2 [Input] Improve error message for Chemkin files with unrecognized sections 2019-01-10 15:17:33 -05:00
Ray Speth
cbe763836e [Input] Fix file name in error message for errors in surface mechanisms 2019-01-10 15:17:33 -05:00
Ray Speth
1bb081d769 [CI] Pin to SCons 3.0.1 to prevent AppVeyor from skipping tests
With SCons 3.0.3 on AppVeyor, the 'scons test' command exits immediately without
any output.
2019-01-10 15:17:33 -05:00
Ray Speth
a347ad36c4 [Input] Fix handling of skipped species in NASA9 input files
Fixes #582
2019-01-10 15:17:33 -05:00
Ray Speth
d56b6205fa [Input] Improve detection of invalid lines in reaction entries
Previously, lines which did not contain a reaction equation or a known keyword
and did not contain any slashes would be silently skipped. This caused reactions
mistakenly written using '->' as the arrow to be ignored without warning.

Fixes #583
2019-01-10 15:17:33 -05:00
Ray Speth
b633544477 [Python/1D] Retain user-specified products in counterflow premixed flame
When using the 'auto' solver option, user-provided arguments to
set_initial_guess were not being saved for subsequent calls to set_initial_guess
within Sim1D.solve, causing the solution to always be for equilibrated products.
2019-01-09 11:44:03 -05:00
arghdos
e3230801c9 Expose getting/setting of max-steps to python interface & test 2019-01-07 22:33:03 -05:00
Ray Speth
19577abfbe Deprecate rarely-used vector functions 2018-12-14 11:27:24 -05:00
Ray Speth
6a859215f8 Replace timesConstant with C++11 lambda 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
Steven DeCaluwe
0257c4868e Adding test suite coverage for critcal property lookups in RedlichKwongMFTP 2018-12-11 11:08:47 -05:00
Steven DeCaluwe
68a89d0322 Adding critProperties database for RedlichKwongMFTP
Adds capability for RedlichKwongMFTP to read a database of critical properties
for Tc and Pc of common species, so that users do not need to input pureFluidParameters
for every single species, thereby reducing burden during creation of new cti files.

For any species where pureFluidParameters are not provided by the user, function
getCoeffs scans the database looking for matches.  Any unmatched species will throw
an error.  Currently only scans by species name string, and is only intended for
common species with well-known critical properties.

Current operation is quite slow if the table is consulted for a large number of
species.  In the future, should also implement the capability to write the updated
pureFluidParameters back into the xml file, so the user only has to perform the lookup
once.
2018-12-11 11:08:47 -05:00
Ray Speth
27d9b6413a [CTML] Remove parsing of vestigial "allow_discontinuous_thermo" option 2018-12-02 23:54:52 -05:00
Ray Speth
442433ad37 [Doc] Note that setting blas_lapack_libs does not make Eigen optional 2018-12-02 23:54:52 -05:00
Ray Speth
9aa507a098 [Kinetics] Make some member functions const 2018-12-02 23:54:04 -05:00
Ray Speth
84535483f9 Check for additional invalid string-to-double conversions 2018-12-02 23:54:04 -05:00
decaluwe
3e9b0e0c07 Updating include/cantera/RedlichKwongMFTP.h to reflect new tests.
Text in the header file previously commented that the RedlichKwongMFTP
thermo class had no test suite coverage and was at risk for deprecation.
As this is no longer the case, this PR removes that language.
2018-12-01 00:00:18 -05:00
Bryan W. Weber
1b5f0f4fe9 Update AUTHORS list with authors from all Cantera organization repos 2018-11-30 23:58:32 -05:00
Nick
9f3dc70949 [SCons] Use RPATH for linking shared libraries
Prevents issues with missing shared libraries at runtime on non-Windows
systems. Can be disabled by setting the SCons flag 'use_rpath_linkage=n'.
2018-11-30 23:52:36 -05:00
Nick Curtis
c93bddf9a0
Fix #578 2018-11-29 20:31:49 -05:00
Steven C. DeCaluwe
ded7c674e6
Fixing my name
Capital C, y'all...
2018-11-16 15:01:48 -07:00