Skip to content

Commit

Permalink
Changed - Python changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebBell committed Jul 19, 2022
1 parent b0a0804 commit a87bffb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/test_flash_pure.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def test_Psat_plot(fluid, eos):
@pytest.mark.parametrize("fluid", pure_fluids)
@pytest.mark.parametrize("eos", eos_list)
@pytest.mark.parametrize("P_range", ['high', 'low'])
@pytest.mark.parametrize("solver", [GCEOS.volume_solutions])
@pytest.mark.parametrize("solver", [staticmethod(GCEOS.volume_solutions)])
def test_V_error_plot(fluid, eos, P_range, solver):
path = os.path.join(pure_surfaces_dir, fluid, "V_error")
if not os.path.exists(path):
Expand Down Expand Up @@ -957,8 +957,8 @@ def volume_solutions_mp(*args):
assert max_err < 1e-13



#test_V_error_plot('ethane', SRK, 'low')
# test_V_error_plot('oxygen', PRSV, 'high', staticmethod(eos_volume.volume_solutions_halley))
# test_V_error_plot('ethane', SRK, 'low')
#test_V_error_plot('hydrogen', PR, 'low')
#test_V_error_plot('decane', PR, 'low')
# test_V_error_plot('ethane', SRK, 'high')
Expand Down
3 changes: 2 additions & 1 deletion thermo/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,8 @@ def volume_errors(self, Tmin=1e-4, Tmax=1e4, Pmin=1e-2, Pmax=1e9,
kwargs['P'] = P
try:
obj = self.to(**kwargs)
except:
except Exception as e:
print('Failed to go to point, kwargs=%s with exception %s' %(kwargs, e))
# So bad we failed to calculate a real point
val = 1.0
if timing:
Expand Down

0 comments on commit a87bffb

Please sign in to comment.