Commit Graph

9916 Commits

Author SHA1 Message Date
Ray Speth
a8fa093fb8 Use C++11-style non-static data member initialization 2023-03-09 11:01:23 -06:00
Ray Speth
b8d07edba9 Use std::filesystem to get last modified time of input files 2023-03-09 11:01:23 -06:00
Ray Speth
184f4ddccf Use 'if constexpr' to simplify MultiRate specialization 2023-03-09 11:01:23 -06:00
Ray Speth
56c3a077f7 Make use of C++17 structured bindings to improve readability 2023-03-09 11:01:23 -06:00
Ray Speth
a6196d3744 Use std::set instead of std::map when the value is never used 2023-03-09 11:01:23 -06:00
Ray Speth
36a15fc685 Apply simplification due to no longer supporting g++ 4.7 2023-03-09 11:01:23 -06:00
Ray Speth
399e1cba3e Prevent infinite recursion in Solution callbacks 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
cc6489db3b [clib] Fix exception handling 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
7ffd9f9f9d Clarify deprecation warnings 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
a5a8c4bfd6 [clib] Prevent memory leaks in lookup table
As the storage m_table can contain duplicate entries referencing the
same object, all entries need to be stored in the reverse lookup table.
2023-03-06 18:02:07 -06:00
Ingmar Schoegl
fa6795238c [clib] Add reverse lookup table to SharedCabinet 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
0b0159a30d Rename Kinetics::addPhase to Kinetics::addThermo 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
4675ea029d [.NET] Add solution to sourcegen configuration 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
2617e20b11 [unittests] Implement gtest for 'test-oneD' 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
1f16bf247e [unittest] Implement gtest for 'test-clib'
Unit tests cover 'clib' from within C++ googletest code
- port test-clib to google tests
- rename pre-existing version to test-clib-demo
- add tests indirectly probing SharedCabinet
- add tests for Solution access routines
- add tests for ctonedim
2023-03-06 18:02:07 -06:00
Ingmar Schoegl
d84af4315c [Python] Update API 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
dd8dba2bca [test-problems] Replace legacy factory methods 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
85758763ff [unittests] Remove legacy factory methods 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
7efc12d4f0 [fortran] Switch to smart clib cabinets 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
ff9544f77e [clib] Adopt review comments 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
0c31f7e489 [Thermo] Shorten newThermoBase to newThermo 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
7c9ce80fdc [clib] Shorten solution_ prefix to soln_
Also:
- add soln_newInterface
- rename solution_newFromFile to soln_newSolution.
2023-03-06 18:02:07 -06:00
Ingmar Schoegl
57ea5e0f52 [clib] Construct ctonedim from smart pointers 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
ffebb8dcd3 [oneD] Enable Kinetics/Transport setters for smart pointers 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
6f8b151e72 [Kinetics] Used shared pointers in Kinetics::addPhase 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
12e6ca225b [Kinetics] Deprecate non-default constructors 2023-03-06 18:02:07 -06:00
Ingmar Schoegl
604f9dfcbc [Kinetics] Update factory constructors 2023-03-06 18:02:07 -06:00
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