- implement constructor that loads ThermoPhase, Kinetics, and Transport
from input files (wrapping factory class methods)
- logic for selection of transport manager follows Python object
- add convenience methods to type-cast frequently used classes
* 'name' corresponds to the YAML entry
* rename Solution keyword 'phaseid' to 'name' (instead of 'phase_id')
* rename ck2yaml argument '--id' to '--name' (instead of '--phase-id')
* ensure that C++ Phase::m_id is always the same as Phase::m_name
* rename C++ object to 'Solution' (from 'SolutionBase')
* remove 'phaseID' from 'Solution' ('id' remains assigned to 'Phase')
* remove 'type' from C++ object (no polymorphism anticipated)
* assign 'name' to 'Solution' (link back from 'Phase' until deprecated)
* clarify 'phase' as 'phase_id' in Python interface
* address various feedback in review comments
* Clarifies the meaning of ID
* Creates a PEP8 compliant attribute that does not conflict with
a built-in function name that is also consistent with the YAML entry.
* Change associated member function names in C++ SolutionBase
* Deprecate `ID` in Python (to be removed after Cantera 2.5)
* Add Base.h/Base.cpp with definition of SolutionBase
* Link C++ object into Cython interface
* Add unique_name and type attributes to Cython _SolutionBase
The water-IAPWS95 instantiates either WaterSSTP or PDSS_water objects,
both of which are intended for liquid phases only. Clarify the phase
name to liquid-water-IAPWS95 to allow a future phase that could
represent the full liquid<->vapor phase space.
Avoid NaN results in entropy_mole calculations when there are small negative
mass fractions. Consistent with the approach used elsewhere,
e.g. IdealGasPhase::getPartialMolarEntropies.
Further:
* revert unit tests to previous species definitions (some case mis-matches)
* remove non-essential comments
* opt to maintain case-sensitive species maps with lowercase as fallback
* store species information with case sensitive names
* retain lookup for non-case sensitive species names, e.g. Phase::speciesIndex
* implement flag that enforces case sensitive species names as a member
variable of Phase
* add exception handling for species that are not uniquely defined unless case
sensitive (e.g. Cs and CS in nasa.cti if cs is specified and case sensitivity
is not enforced)
* deprecate Phase::species(std::string&)
The "catching polymorphic type" warnings appear during compilation with GCC 8:
src/base/global.cpp: In function ‘void Cantera::setLogger(Cantera::Logger*)’:
src/base/global.cpp:28:19: warning: catching polymorphic type ‘class std::bad_alloc’ by value [-Wcatch-value=]
} catch (std::bad_alloc) {
^~~~~~~~~
src/equil/vcs_MultiPhaseEquil.cpp: In member function ‘int Cantera::vcs_MultiPhaseEquil::equilibrate_HP(doublereal, int, double, double, int, int, doublereal, int, int)’:
src/equil/vcs_MultiPhaseEquil.cpp:228:31: warning: catching polymorphic type ‘class Cantera::CanteraError’ by value [-Wcatch-value=]
} catch (CanteraError err) {
^~~
src/equil/vcs_MultiPhaseEquil.cpp: In member function ‘int Cantera::vcs_MultiPhaseEquil::equilibrate_SP(doublereal, double, double, int, int, doublereal, int, int)’:
src/equil/vcs_MultiPhaseEquil.cpp:354:31: warning: catching polymorphic type ‘class Cantera::CanteraError’ by value [-Wcatch-value=]
} catch (CanteraError err) {
^~~
This commit fix this warnings via caught by reference.
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.
In the atomic weights struct in Elements.cpp, ensure that there is no
space before the closing brace of an element and that there is one
space between the longest element name and a 3-digit weight.
Use data from the periodic table at
http://www.ciaaw.org/atomic-weights.htm and
https://iupac.org/wp-content/uploads/2018/12/IUPAC_Periodic_Table-01Dec18.pdf
Elements without any atomic weight in either table do not have a stable
isotope. These are deleted from elements.xml and have their atomic
weight set to -1.0 in Elements.cpp. Add elements after plutonium that
were not previously listed. None of these elements have stable
isotopes.
These elements are retained/added so their symbols, names, and atomic
numbers can still be retrieved and the mapping of atomic number to
index - 1 in the struct is maintained.
Modify the element weight lookup functions to throw errors when an
element with no weight is requested (i.e., the weight is -1.0 in the
struct).
* differentiated Valve::setValveCoeff from PressureController::setPressureCoeff
and introduced MassFlowController::setMassFlowCoeff for consistency.
* introduced FlowDevice::setTimeFunction and FlowDevice::setPressureFunction to
differentiate time-dependent and pressure-dependent functions.
* introduced arbitrary pressure dependence for PressureController
* deprecated FlowDevice::setFunction which is replaced by time and pressure
specific functions.
* introduced properties Valve.valve_coeff / PressureController.pressure_coeff /
MassFlowController.mass_flow_coeff in Cython interface and deprecated
Valve.set_pressure_coeff / PressureController.set_pressure_coeff
* deprecated corresponding function calls in clib interface
* deprecate FlowDevice.setParameters (which was only used by MATLAB interface)