Cantera / cantera

Chemical kinetics, thermodynamics, and transport tool suite
https://cantera.org
Other
624 stars 350 forks source link

Expose partial molar thermo properties to MATLAB #1761

Closed ischoegl closed 3 months ago

ischoegl commented 3 months ago

Changes proposed in this pull request

Expose partial molar thermo properties to MATLAB, and remove mislabeled reference state enthalpies_RT. The fix sidesteps the discussion of "standard state" vs "reference state" nomenclature of #522, and instead focuses on quantities that are relevant to the actual state. Added properties are:

If applicable, fill in the issue number this pull request is fixing

Closes #522

If applicable, provide an example illustrating new features this pull request is introducing

>> gas = Solution('h2o2.yaml');
>> gas.TPX = {300, OneAtm, 'H2:1,O2:1'};
>> gas.equilibrate('HP');
>> gas.partialMolarEnthalpies

ans =

   1.0e+08 *

    0.8545    2.7231    3.0389    0.9457    1.2587   -1.1919    1.4706    0.4063    0.5432    0.8945

>> gas.partialMolarEnthalpies * gas.X'

ans =

   6.6029e+04

>> gas.H

ans =

   6.6029e+04

Checklist

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 59.52381% with 17 lines in your changes missing coverage. Please review.

Project coverage is 73.13%. Comparing base (9d0e54a) to head (682bde8). Report is 31 commits behind head on main.

Files Patch % Lines
src/clib/ct.cpp 59.52% 17 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1761 +/- ## ======================================= Coverage 73.12% 73.13% ======================================= Files 381 381 Lines 54175 54217 +42 Branches 9226 9224 -2 ======================================= + Hits 39615 39650 +35 - Misses 11600 11607 +7 Partials 2960 2960 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.