Skip to content

Commit

Permalink
Merge e6bf7ca into efb34eb
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebBell committed Nov 12, 2021
2 parents efb34eb + e6bf7ca commit 32e2687
Show file tree
Hide file tree
Showing 8 changed files with 396 additions and 39 deletions.
1 change: 1 addition & 0 deletions chemicals/numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
'rachford_rice.Rachford_Rice_polynomial_5',
'rachford_rice.Rachford_Rice_solution_polynomial',
'rachford_rice.Rachford_Rice_numpy_err_fprime2',
'rachford_rice.Rachford_Rice_solution_Leibovici_Neoschil',
'rachford_rice.Li_Johns_Ahmadi_solution',
'rachford_rice._Rachford_Rice_analytical_3',
'rachford_rice.flash_inner_loop',
Expand Down
246 changes: 225 additions & 21 deletions chemicals/rachford_rice.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy
scipy
pandas
fluids>=1.0.9
fluids>=1.0.11
2 changes: 1 addition & 1 deletion requirements_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ scipy
numpydoc
pint
nbsphinx
fluids>=1.0.9
fluids>=1.0.11
IPython
ipython
numba
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ numpy
scipy
pandas
sympy
fluids>=1.0.9
fluids>=1.0.11
pytest
pytest-cov
coveralls
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Education',
Expand All @@ -61,7 +62,7 @@
version = '1.0.12',
description = 'Chemical properties component of Chemical Engineering Design Library (ChEDL)',
author = 'Caleb Bell',
install_requires=['fluids>=1.0.9', 'scipy', 'numpy', 'pandas'],
install_requires=['fluids>=1.0.11', 'scipy', 'numpy', 'pandas'],
extras_require = {
'Coverage documentation': ['wsgiref>=0.1.2', 'coverage>=4.0.3']
},
Expand Down
9 changes: 8 additions & 1 deletion tests/test_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,11 @@ def test_rachford_rice():
assert_close(VF, VF_new)
assert_close1d(xs, xs_new)
assert_close1d(ys, ys_new)

LF_new, VF_new, xs_new, ys_new = chemicals.numba.Rachford_Rice_solution_Leibovici_Neoschil(zs=zs, Ks=Ks)
assert_close(VF, VF_new, rtol=1e-14)
assert_close1d(xs, xs_new, rtol=1e-14)
assert_close1d(ys, ys_new, rtol=1e-14)

zs = [0.1, 0.2, 0.3, 0.4]
Ks = [1.0161456228504933, 1.001260709063004, 0.9882448742560694, 1.0237689436500155]
chemicals.numba.rachford_rice.flash_inner_loop(np.array(zs), np.array(Ks), guess=0.8556936118217484)
Expand All @@ -487,6 +491,9 @@ def test_rachford_rice():
# test_rachford_rice()





@mark_as_numba
def test_Rachford_Rice_solutionN():
ns = [0.204322076984, 0.070970999150, 0.267194323384, 0.296291964579, 0.067046080882, 0.062489248292, 0.031685306730]
Expand Down
170 changes: 157 additions & 13 deletions tests/test_rachford_rice.py

Large diffs are not rendered by default.

0 comments on commit 32e2687

Please sign in to comment.