Commit Graph

9889 Commits

Author SHA1 Message Date
Ingmar Schoegl
125a440b9c [clib] Add Reactor::insert to clib
Also add service functions for testing cabinet sizes
2023-03-06 18:02:07 -06:00
Ingmar Schoegl
827ebb38ef [clib] Switch ThermoCabinet to smart pointers 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
f3e840dcbe [Thermo] Add factory methods returning shared_ptr 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
25b3ce392b [clib] Switch KineticsCabinet to smart pointers 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
9c2348cf67 [Kinetics] Change smart pointer type for newKinetics 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
3323ee27e7 [clib] Switch TransportCabinet to smart pointers 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
be392931fa [Transport] Deprecate legacy factory constructors 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
e362a12bea [clib] Implement methods using SolutionCabinet 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
df5ba187e0 [clib] Implement SharedCabinet using shared_ptr list 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
34989299d2 [test-problems] Fix clib-test.c
Mole fractions have to be set before T and P; otherwise, the pressure
changes. Before the change, the pressure was significantly lower than
5 atm. Also fix incorrect use of 'kin_newFromFile', which causes
unintended linkages to default objects that do not raise exceptions
but may lead to erroneous results.
2023-03-06 18:02:07 -06:00
Ray Speth
7f04d839f3 [Input] Handle options for setting molar volume in PDSS_ConstVol
PDSS_ConstVol now converts 'density' and 'molar-density' fields from
the 'equation-of-state' field, making it consistent with other phases
that support these options.
2023-03-04 18:26:44 -05:00
Ray Speth
4ff5950aba Fix some documentation for RedlichKisterVPSSTP 2023-03-04 18:26:44 -05:00
Ray Speth
9dd54e4346 Remove unnecessary member variables from RedlichKisterVPSSTP 2023-03-04 18:26:44 -05:00
Ray Speth
accfb55d14 Avoid need for mutable members of RedlichKisterVPSSTP 2023-03-04 18:26:44 -05:00
Ray Speth
9d40c054c1 Deprecate unused functions of GibbsExcessVPSSTP 2023-03-04 18:26:44 -05:00
Ray Speth
5b8e9579cd Add more thorough test cases for RedlichKisterVPSSTP
Test phase with non-zero excess entropy, and with multiple
interactions defined.
2023-03-04 18:26:44 -05:00
Ray Speth
2b6cd462ae [Thermo] Simplify RedlichKisterVPSSTP::getPartialMolarCp
The terms involving d(log(gamma))/dT and d^2(log(gamma))/dT cancel out,
so there's not reason to calculate them.
2023-03-04 18:26:44 -05:00
Ray Speth
0d441325f8 [Thermo] Fix cv calculation in RedlichKisterVPSSTP
Partially resolves #1320
2023-03-04 18:26:44 -05:00
Ray Speth
c563597bc1 [Thermo] Fix enthalpy/entropy calculations in RedlichKisterVPSSTP
Derivatives of the activity coefficients were being calculated incorrectly,
leading to bad values for enthalpies, entropies, and specific heat
capacities.

Partially resolves #1320
2023-03-04 18:26:44 -05:00
Ray Speth
537b484af6 Fix implementation of SurfPhase.partialMolarEntropies
Fixes #1313
2023-03-04 18:26:44 -05:00
Ray Speth
03b7e6b5d4 Protect against inf in SurfPhase::getChemPotentials
Fixes #1314
2023-03-04 18:26:44 -05:00
Ray Speth
c3eb05c844 Fix mole fractions near pure-species limit in BinarySolutionTabulatedThermo
Fixes behavior when the tabulated species mole fraction has become 1.0 to within
machine precision, while the other species mole fraction is not quite zero.
2023-03-03 23:14:15 -05:00
Ray Speth
f19bd3f77d [Thermo] Use current partial molar volumes in BinarySolutionTabulatedThermo
Previously, calculations of partial molar enthalpies, entropies, and chemical
potentials were using the pure-species molar volumes rather than the ones
calculated by inverting the tabulated mixture molar volume.
2023-03-03 23:14:15 -05:00
Ray Speth
8658c1bcdf [Thermo] Add missing pressure term to IdealSolidSolnPhase::gibbs_mole 2023-03-03 23:14:15 -05:00
Ray Speth
597d6e907d Fix interpolation of partial molar volumes in BinarySolutionTabulateThermo
Calculate partial molar volumes based on linearly interpolated dV/dXtab
rather than linearly interpolating the partial molar volumes themselves,
which does not satisfy the identity Vm == sum(vm[k]*X[k]).
2023-03-03 23:14:15 -05:00
Ray Speth
4a49ed891e Fix serialization of BinarySolutionTabulatedThermo
Tabulated molar volumes were not being included in YAML output
2023-03-03 23:14:15 -05:00
Ray Speth
c54e429472 Add callbacks for synchronizing with C++ Solution members
Objects that need to hold pointers to the members of a C++ Solution,
like the Python Solution object or StFlow, can register a callback
with the Solution that will be called if any of the thermo/kinetics/transport
objects change.

Fixes #1409
2023-02-27 19:49:38 -06:00
Ray Speth
6392724bd0 Fix setuptools warning about package data
Setuptools started giving the warning:

"Installing 'cantera.test' as data is deprecated, please list it in
`packages`."

for the data, test, and examples directories.
2023-02-24 19:32:34 -05:00
Ray Speth
98eb6dadd7 [SCons] Avoid compiler warnings from non-Cantera headers 2023-02-24 19:32:34 -05:00
Ray Speth
e39d1e85be Fix warning from implicit type conversion in format string 2023-02-24 19:32:34 -05:00
Ray Speth
26fcb399e3 Fix warnings about sprintf from Apple Clang
Starting in macOS 13.2, the use of sprintf started generating
deprecation warnings, even though it's not deprecated by the C++ standard.
2023-02-24 19:32:34 -05:00
Ray Speth
5810a2abe4 Fix some compiler warnings 2023-02-24 19:32:34 -05:00
Ray Speth
bf7d079f8a [CI] Run with _GLIBCXX_ASSERTIONS enabled 2023-02-24 19:32:34 -05:00
Ray Speth
e494c0a926 Fix issues identified by _GLIBCXX_ASSERTIONS macro
Resolves #1430
2023-02-24 19:32:34 -05:00
Gandhali Kogekar
924bdf3ff3 Removing another redundant line 2023-02-17 15:05:49 -06:00
Gandhali Kogekar
4958ba9220 Cleaning up the redundant line inside the for loop 2023-02-17 15:05:49 -06:00
Ingmar Schoegl
3d434130bd Bump version to 3.0.0a4 2023-02-16 13:31:06 -05:00
Ingmar Schoegl
7cf69d2933 Update Copyright information 2023-02-16 13:31:06 -05:00
Ingmar Schoegl
97d4755e25 Fix author order 2023-02-16 13:31:06 -05:00
Ingmar Schoegl
1c9c63c353 [SCons] Check for pytest when running scons test
Addendum to #1434; update ensures that checks are run for all tests of
the test suite that involve pytest.
2023-02-16 13:31:06 -05:00
Ingmar Schoegl
ba76a7be0a [dotnet] Replace 'RP' by 'DP' 2023-02-10 19:27:26 -06:00
Ingmar Schoegl
474dc293e5 [matlab] Redirect RP setter to thermo_set_DP 2023-02-10 19:27:26 -06:00
Ingmar Schoegl
b20cfec0fc [clib] Add set_thermo_TD/DP 2023-02-10 19:27:26 -06:00
Ingmar Schoegl
84153559b7 [Thermo] Rename setState_RP to setState_DP
Also deprecate full state setters.
2023-02-10 19:27:26 -06:00
Ingmar Schoegl
8a81299ff5 [Thermo] Deprecate setState_TRX/Y 2023-02-10 19:27:26 -06:00
Ingmar Schoegl
3113f2554d [Thermo] Rename setState_TR to setState_TD 2023-02-10 19:27:26 -06:00
Sergey Torokhov
0ce1a1b516 [Scons] Remove "install" target from "check_for_pytest"
The `check_for_pytest` depends on `check_for_ruamel_yaml`
the pytest package is required on `install` phase and it results in
the Cantera installation fail if pytest absent
even if tests were not required.

This patch swap `check_for_pytest` and `check_for_ruamel_yaml`
dependency order.

The explicit `test-python-convert`, `test-python` targets are dropped
from `check_for_ruamel_yaml` because the `check_for_pytest`
includes `target.startswith("test-python")`.

Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
2023-02-10 18:50:19 -06:00
Ray Speth
808023c0fa [SCons] Trim set of symbols exported in cantera_shared.dll 2023-02-02 18:33:16 -06:00
Ray Speth
b66a249581 Handle multiple versions of Python extensions 2023-02-02 18:33:16 -06:00
Ray Speth
1c5595e16c [SCons] Consolidate addition of build/lib to search path 2023-02-02 18:33:16 -06:00