Skip to content

Commit d07fa84

Browse files
authored
Merge pull request #168 from CalebBell/virial_fixes_2
Run CI on new updates
2 parents c8d243f + 66e88df commit d07fa84

76 files changed

Lines changed: 16284 additions & 3834 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
os: [windows-latest, ubuntu-latest, macos-13, macos-latest]
1818
architecture: ['x86', 'x64']
1919
exclude:
20+
- os: ubuntu-latest
21+
python-version: 3.7
2022
# Only test pypy on Linux
2123
- os: windows-latest
2224
python-version: pypy3.9
@@ -98,7 +100,7 @@ jobs:
98100
run: |
99101
# Taken from scipy
100102
sudo apt-get update
101-
sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev
103+
sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev libjpeg-dev zlib1g-dev libtiff-dev libfreetype6-dev liblcms2-dev libwebp-dev
102104
103105
- name: Install dependencies
104106
run: |

changelog.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@
1111
### Fixed
1212

1313

14+
## [0.4.2] - 2025-03-16
15+
16+
### Added
17+
- Unifac 2.0: Hayer, Nicolas, Thorsten Wendel, Stephan Mandt, Hans Hasse, and Fabian Jirasek. “Advancing Thermodynamic Group-Contribution Methods by Machine Learning: UNIFAC 2.0.” Chemical Engineering Journal 504 (January 15, 2025): 158667. https://doi.org/10.1016/j.cej.2024.158667.
18+
19+
- First pass implementation of Bondi group contribution method for estimating R and Q for UNIQUAC (and regressing new UNIFAC groups). Some definitions are unclear and/or hard to compute programatically.
20+
- More UNIFAC groups have SMARTS groups patterns assigned to them
21+
- Add functions for identifying which functional groups are in a chemical
22+
- Molecule graph structure functions `count_rings_by_atom_counts`, `identify_functional_group_atoms`, `identify_conjugated_bonds`
23+
- New Diky Joback implementation which improves predictions of ideal gas heat capacity, from: Elliott, J. Richard, Vladimir Diky, Thomas A. Knotts IV, and W. Vincent Wilding. The Properties of Gases and Liquids, Sixth Edition. 6th edition. New York: McGraw Hill, 2023.
24+
- Activity coefficient models have `missing_interaction_parameters` function added to return a list of compound interactions that are missing
25+
26+
### Changed
27+
- NISTUFSG CH=NOH previously had the group ID 309, but this duplicated another 309 group CH2(O)2, so it was reassigned 1309 in thermo https://github.com/CalebBell/thermo/issues/158
28+
- Reorganized the teperature dependent chemical property data additions to TDependentProperty objects so that data is added through generic methods, instead of hardcoding the method and attributes on the classes that the attributes are stored on. This positions thermo for adding new data sets easier in the future.
29+
- Renamed arguments `cross_B_model` to `B_mixing_rule` of `VirialGas` to avoid confusion with similar parameter in `VirialCSP`. and the same for `cross_C_model` to `C_mixing_rule`
30+
- Fix missing negative sign on `H_dep` of Virial model - this had impact on enthalpy derivatives, `G_dep`, and fugacity related terms as well. This was a serious bug and any `VirialCSP` calculations should be repeated because of it.
31+
- Clean up UNIFAC assignment tests
32+
- Fix inconsistency of using IAPWS name for multiple TDependentProperty methods
33+
1434
## [0.4.0] - 2024-11-10
1535

1636
### Changed

docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@
5858
'matplotlib.sphinxext.plot_directive',
5959
'sphinxcontrib.katex',
6060
'sphinx_sitemap',
61+
'sphinxcontrib.googleanalytics',
6162
]
62-
63+
googleanalytics_id = 'G-H82NH09HYY'
64+
6365
katex_css_path = \
6466
'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css'
6567
katex_js_path = 'katex.min.js'

docs/modules.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ API Reference
4343
thermo.group_contribution.joback
4444
thermo.group_contribution.fedors
4545
thermo.group_contribution.wilson_jasperson
46+
thermo.group_contribution.bondi

docs/property_objects.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ The low-temperature linearly extrapolated value is actually the same as before,
120120
To better understand what methods are available, the :obj:`valid_methods <thermo.utils.TDependentProperty.valid_methods>` method checks all available correlations against their temperature limits.
121121

122122
>>> ethanol_psat.valid_methods(100)
123-
['AMBROSE_WALTON', 'LEE_KESLER_PSAT', 'EDALAT', 'BOILING_CRITICAL', 'SANJARI']
123+
['AMBROSE_WALTON', 'LEE_KESLER_PSAT', 'EDALAT', 'BOILING_CRITICAL', 'EOS', 'SANJARI']
124124

125125
If the temperature is not provided, all available methods are returned; the returned value favors the methods by the ranking defined in thermo, with the currently selected method as the first item.
126126

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Bondi Group Contribution Method (thermo.group_contribution.fedors)
2+
==================================================================
3+
4+
.. automodule:: thermo.group_contribution.bondi

docs/tutorial_phases_and_flash.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ Obtain a heat capacity object, and select a source:
8282
>>> from thermo.heat_capacity import POLING_POLY
8383
>>> CpObj = HeatCapacityGas(CASRN='67-56-1')
8484
>>> CpObj.method = POLING_POLY
85-
>>> CpObj.POLING_coefs # Show the coefficients
86-
[4.714, -0.006986, 4.211e-05, -4.443e-08, 1.535e-11]
8785
>>> HeatCapacityGases = [CpObj]
8886

8987
Create a :obj:`ChemicalConstantsPackage <thermo.chemical_package.ChemicalConstantsPackage>` object which holds constant properties of the object, using a minimum of values:
@@ -109,7 +107,7 @@ Do a T-P flash:
109107

110108
>>> res = flasher.flash(T=300, P=1e5)
111109
>>> res.phase, res.liquid0
112-
('L', CEOSLiquid(eos_class=PRMIX, eos_kwargs={"Tcs": [512.5], "Pcs": [8084000.0], "omegas": [0.559]}, HeatCapacityGases=[HeatCapacityGas(CASRN="67-56-1", extrapolation="linear", method="POLING_POLY")], T=300.0, P=100000.0, zs=[1.0]))
110+
('L', CEOSLiquid(eos_class=PRMIX, eos_kwargs={"Tcs": [512.5], "Pcs": [8084000.0], "omegas": [0.559]}, HeatCapacityGases=[HeatCapacityGas(CASRN="67-56-1", extrapolation="linear", method="POLING_POLY", Tmin=50.0, Tmax=1000.0)], T=300.0, P=100000.0, zs=[1.0]))
113111

114112
Do a temperature and vapor-fraction flash:
115113

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ scipy>=1.6.0
33
pandas
44
coolprop
55
fluids>=1.1.0
6-
chemicals>=1.3.2
6+
chemicals>=1.3.3

requirements_docs.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ numpydoc
44
pint
55
nbsphinx
66
fluids>=1.1.0
7-
chemicals>=1.3.2
7+
chemicals>=1.3.3
88
IPython
99
ipython
1010
numba
@@ -17,5 +17,6 @@ sphinxcontrib-devhelp==1.0.2
1717
sphinxcontrib-htmlhelp==2.0.1
1818
sphinxcontrib-qthelp==1.0.3
1919
sphinxcontrib-serializinghtml==1.1.5
20+
sphinxcontrib.googleanalytics
2021
matplotlib
2122
mpmath

requirements_test_multiarch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sympy
22
fluids>=1.1.0
3-
chemicals>=1.3.2
3+
chemicals>=1.3.3
44
pytest
55
pint
66
IPython

0 commit comments

Comments
 (0)