Skip to content
This repository was archived by the owner on Jul 2, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions oil_library/oil_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
from itertools import groupby, chain
from future.moves.itertools import zip_longest

try:
from functools import lru_cache # it's built-in on py3
except ImportError:
from backports.functools_lru_cache import lru_cache # needs backports for py2

import numpy as np

from .models import Oil
Expand Down Expand Up @@ -190,7 +185,6 @@ def _component_density(self, sara_type=None):
def component_types(self):
return self._sara['type']

@lru_cache(2)
def vapor_pressure(self, temp, atmos_pressure=101325.0):
'''
water_temp and boiling point units are Kelvin
Expand Down
3 changes: 3 additions & 0 deletions oil_library/tests/test_oil_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ def test_sara(self):
dens for dens in self.s_dens)

assert np.allclose(self.op.mass_fraction.sum(), 1.0)
def test_vapor_pressure(self):
vp = self.op.vapor_pressure(273.)



def test_eq():
Expand Down