Commit graph

1209 commits

Author SHA1 Message Date
Ray Speth
ea88d4f9fb Add "get" functions to AnyMap
Simplify the common use case of checking for a key and using a default
value when it is missing.
2019-06-25 22:30:59 -04:00
Ray Speth
530adbb931 Add automatic conversions to vector<AnyValue> 2019-06-25 22:30:59 -04:00
Ray Speth
e5bd0b136f Allow AnyValue to convert implicitly from long int to double 2019-06-25 22:30:59 -04:00
Ray Speth
00f6b88fa4 [Input] Implement construction of AnyMap from YAML string/file 2019-06-25 22:30:59 -04:00
Ray Speth
e85e0e2108 Fix constness of some AnyMap functions 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
Bryan W. Weber
857bb0a769 Include Func1.h in zerodim.h
zerodim.h used to have Func1.h included indirectly, so make it explicit.
2019-06-17 10:29:20 -04:00
Steven DeCaluwe
ba8ac1d519 Mark ConstDensityThermo for deprecation.
The thermophase ConstDensityThermo instantiates a class with
constant density_mass  Such a model is of dubious physical
validity/applicability and has minimal foreseeable use cases.
This commit marks it for deprecation, and adds a message in
ctml_writer.py (where the model has the misleading alias
'incompressible_solid') refering the interested user to consider
appropriate alternate thermophase classes 'lattice' or
'IdealSolidSoln.'
2019-06-12 17:54:48 -04:00
Thanasis Mattas
6a42e5942e rearranging methods to aid src reading 2019-06-08 17:25:55 -04:00
Thanasis Mattas
ea3bb0af90 Some documentation corrections at xml.h 2019-06-08 17:25:55 -04:00
Ingmar Schoegl
5d62f3bacc added factories for FlowDevice and Wall objects 2019-05-28 19:21:28 -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
Ray Speth
d6d91f4d98 [Thermo] Fix updating state of PDSS_IonsFromNeutral objects
Setting T and P now updates the state of the underlying "neutral
molecule phase".

Also removed the unimplemented setState_TR method.
2019-03-06 19:50:16 -05:00
Ray Speth
aceb896f62 [Thermo] Fix BinarySolutionTabulatedThermo updates when only T changes
In the case where temperature changes but the mole fractions are the same, we
still need to apply the enthalpy and entropy offsets to the tabulated species.
2019-03-06 19:48:45 -05:00
Ray Speth
47005a5008 [Thermo] Fix overriding of IdealSolidSolnPhase::_updateThermo
Since IdealSolidSolnPhase::_updateThermo wasn't a virtual method, and
the signatures didn't match (const vs non-const), calls to this method
from IdealSolidSolnPhase weren't being overridden by
BinarySolutionTabulatedThermo::_updateThermo as expected.
2019-03-06 19:48:45 -05:00
Ray Speth
90d2ec41ca [Thermo] Eliminate redundant coefficient storage in ShomatePoly2 2019-02-25 11:06:12 -05:00
Ray Speth
b8367d6fe8 [Thermo] Eliminate redundant coefficient storage in NasaPoly2 2019-02-21 11:21:03 -05:00
Steven DeCaluwe
84b4147a99 Fixing return type of BinarySolutionTabulatedThermo::interp
The function `BinarySolutionTabulatedThermo::interp` now returns type
`std::pair<double, double>`, rather than `static double`
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
Manik Mayur
224ef720e6 Add BinarySolutionTabulatedThermo class 2019-02-20 21:39:22 -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
9f5dfbdb12 Document units of Margules interaction parameters 2019-02-04 16:38:40 -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
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
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
9aa507a098 [Kinetics] Make some member functions const 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
Ray Speth
c988f57e01 [Transport] Remove unused constants from WaterTransport.h 2018-11-11 22:17:20 -05:00
Ray Speth
1acb00bc99 [Transport] Remove unused private members of WaterTransport 2018-11-11 22:17:20 -05:00
bangshiuh
acd75e20fe [Transport] Add IonGasTransport::electricalConductivity 2018-11-07 16:11:23 -05:00
bangshiuh
7986046bdd [Python/Transport] Make mobilities accessible via Python interface
Also add test_mobility and test_update_temperature to TestIonTransport
2018-11-07 16:11:23 -05:00
bangshiuh
7f13f4d832 add O2/O2- collision data to deal with resonant charge transfer effect 2018-10-09 16:33:40 -04:00
g3bk47
1166c74127 add std:: to "inner_product" and "accumulate"
This only works because the "dot" function is always called with std::vector<T>::iterator as input so that "argument dependent lookup" introduces the std namespace to the function. If the dot function is called like this "dot(v.data(), v.data()+v.size(), v.data())", where "v" is a std::vector and the input are plain pointers, the compiler will not find "inner_product". The same is true for the use of "accumulate".
2018-09-14 13:56:48 -04:00
Ray Speth
426c2bc56e [Transport] Move calculations into WaterTransport class
Calculating viscosity and thermal conductivity in the WaterProps class
was just an unnecessary level of indirection.
2018-09-07 23:24:23 -04:00
Ray Speth
b0deb41708 [Transport] Make WaterTransport constructible using newTransportMgr
This makes it possible to specify the WaterTransport model in XML input files,
and to use the model from Python and Matlab.

Resolves #289
2018-09-07 23:24:23 -04:00
Ray Speth
f46df83841 [Thermo] Make WaterSSTP constructible using newPhase
This makes it possible to create a WaterSSTP phase using an XML input file, and
use this model from Python and Matlab.
2018-09-07 23:24:23 -04:00
Ray Speth
ef40d4418d [Doc] Fix some Doxygen warnings 2018-08-28 16:45:49 -04:00
Ray Speth
b7f3ab561b Fix compiler warnings issued by Visual Studio 2015 2018-08-28 16:45:49 -04:00
Ray Speth
fc7c85f8d1 [clib] Fix some size_t related compiler warnings 2018-08-28 16:45:49 -04:00
Ray Speth
833d79aeb6 Fix compiler warning about declaration of BandMatrix::PivData 2018-08-28 16:45:49 -04:00
Ray Speth
c4e89ac5da [Doc] Fix another error in SRI reaction docstring 2018-08-27 20:27:04 -04:00